From 68de2fb60433fcd4ce90fc3b00a073867dd21768 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sun, 24 Jul 2022 10:02:35 +1000 Subject: [PATCH] Scaffold out a tv section --- v2/content/tv/_index.md | 10 ++++++++++ v2/content/tv/example.md | 12 ++++++++++++ v2/sass/tv.scss | 16 ++++++++++++++++ v2/templates/layout.html | 1 + v2/templates/tv.html | 37 +++++++++++++++++++++++++++++++++++++ v2/templates/video.html | 14 ++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 v2/content/tv/_index.md create mode 100644 v2/content/tv/example.md create mode 100644 v2/sass/tv.scss create mode 100644 v2/templates/tv.html create mode 100644 v2/templates/video.html diff --git a/v2/content/tv/_index.md b/v2/content/tv/_index.md new file mode 100644 index 0000000..eedb794 --- /dev/null +++ b/v2/content/tv/_index.md @@ -0,0 +1,10 @@ ++++ +title = "MooreTech" +template = "tv.html" +sort_by = "date" +paginate_by = 50 # TODO: add the page links to the section template ++++ + +TODO: Some intro text about what this is and how to watch. + + diff --git a/v2/content/tv/example.md b/v2/content/tv/example.md new file mode 100644 index 0000000..0c243d2 --- /dev/null +++ b/v2/content/tv/example.md @@ -0,0 +1,12 @@ ++++ +title = "Example TV Post" +description = "Video description" +date = 2022-07-24T09:41:48+10:00 + +[extra] +# updated = 2021-10-01T10:44:43+10:00 ++++ + + {{ TODO: video_embed shortcode }} + +This is an example tv post. diff --git a/v2/sass/tv.scss b/v2/sass/tv.scss new file mode 100644 index 0000000..9f35aab --- /dev/null +++ b/v2/sass/tv.scss @@ -0,0 +1,16 @@ +.article-video { + clear: left; +} +.article-video h3 { + font-size: 1.25em; + font-weight: 500; + + a:link, a:visited { + border-bottom: none; + } +} + +.video-thumbnail { + float: left; + margin: 0 1em 1em 0; +} diff --git a/v2/templates/layout.html b/v2/templates/layout.html index b548dc8..3365ee3 100644 --- a/v2/templates/layout.html +++ b/v2/templates/layout.html @@ -5,6 +5,7 @@ {% block title %}{% endblock %} + {% block metadata %}{% endblock %} diff --git a/v2/templates/tv.html b/v2/templates/tv.html new file mode 100644 index 0000000..37a2c69 --- /dev/null +++ b/v2/templates/tv.html @@ -0,0 +1,37 @@ +{% extends "layout.html" %} + +{% block title %}{{ section.title }} - {{ config.title }}{% endblock %} + +{% block body %} +

👨‍💻 {{ config.title }}

+ +

Custom TV section template

+ + + +
+

{{ section.title }}

+ + {{ section.content | safe }} + + {# {% for page in section.pages %} #} + {# {% include "article.html" %} #} + {# {% endfor %} #} + +

Recent Videos

+ + {% for page in paginator.pages %} + {% include "video.html" %} + {% endfor %} +
+{% endblock %} diff --git a/v2/templates/video.html b/v2/templates/video.html new file mode 100644 index 0000000..6454bc4 --- /dev/null +++ b/v2/templates/video.html @@ -0,0 +1,14 @@ +
+ +

{{ page.title }}

+ + +
+ {{ page.description | safe }} +
+