mirror of
https://github.com/wezm/wezm.net.git
synced 2024-11-18 12:52:47 +00:00
Scaffold out a tv section
This commit is contained in:
parent
8724d5daa5
commit
68de2fb604
6 changed files with 90 additions and 0 deletions
10
v2/content/tv/_index.md
Normal file
10
v2/content/tv/_index.md
Normal file
|
@ -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.
|
||||
|
||||
|
12
v2/content/tv/example.md
Normal file
12
v2/content/tv/example.md
Normal file
|
@ -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.
|
16
v2/sass/tv.scss
Normal file
16
v2/sass/tv.scss
Normal file
|
@ -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;
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ config.base_url }}/screen.css" type="text/css" charset="utf-8" />
|
||||
<link rel="stylesheet" href="{{ config.base_url }}/tv.css" type="text/css" charset="utf-8" />
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ config.base_url }}/rss.xml" title="Wesley Moore" />
|
||||
{% block metadata %}{% endblock %}
|
||||
</head>
|
||||
|
|
37
v2/templates/tv.html
Normal file
37
v2/templates/tv.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block title %}{{ section.title }} - {{ config.title }}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1 class="logo"><a href="{{ config.base_url }}/" class="no-border hover-underline">👨💻 {{ config.title }}</a></h1>
|
||||
|
||||
<p>Custom TV section template</p>
|
||||
|
||||
<nav>
|
||||
{% for ancestor in section.ancestors %}
|
||||
{% set section = get_section(path=ancestor) %}
|
||||
{% if section.path == "/" %}
|
||||
<a href="{{ config.base_url }}{{ section.path }}" class="no-border hover-underline">Home</a>
|
||||
{% else %}
|
||||
<span class="breadcrumb-sep">/</span>
|
||||
<a href="{{ config.base_url }}/{{ section.path }}" class="no-border hover-underline">{{ section.title }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</nav>
|
||||
|
||||
<main class="{{ section.extra.main_class | default(value="") }}">
|
||||
<h2>{{ section.title }}</h2>
|
||||
|
||||
{{ section.content | safe }}
|
||||
|
||||
{# {% for page in section.pages %} #}
|
||||
{# {% include "article.html" %} #}
|
||||
{# {% endfor %} #}
|
||||
|
||||
<h2>Recent Videos</h2>
|
||||
|
||||
{% for page in paginator.pages %}
|
||||
{% include "video.html" %}
|
||||
{% endfor %}
|
||||
</main>
|
||||
{% endblock %}
|
14
v2/templates/video.html
Normal file
14
v2/templates/video.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<article class="article-video" id="{{page.slug }}">
|
||||
<a href="{{ page.permalink }}"><img class="video-thumbnail" src="https://placekitten.com/250/141"></a>
|
||||
<h3><a href="{{ page.permalink }}">{{ page.title }}</a></h3>
|
||||
<div class="post-metadata">
|
||||
<div class="date-published">
|
||||
<svg class="date-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" version="1.1" x="0px" y="0px"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M38.6172116,78.6191533 L47.8030928,78.6191533 L47.8030928,69.4332721 L38.6172116,69.4332721 L38.6172116,78.6191533 Z M24.8586734,78.6191533 L34.0445546,78.6191533 L34.0445546,69.4332721 L24.8586734,69.4332721 L24.8586734,78.6191533 Z M66.1332478,64.2656288 L75.319129,64.2656288 L75.319129,55.0797476 L66.1332478,55.0797476 L66.1332478,64.2656288 Z M52.3757498,64.2656288 L61.561631,64.2656288 L61.561631,55.0797476 L52.3757498,55.0797476 L52.3757498,64.2656288 Z M38.6172116,64.2656288 L47.8030928,64.2656288 L47.8030928,55.0797476 L38.6172116,55.0797476 L38.6172116,64.2656288 Z M24.8586734,64.2656288 L34.0445546,64.2656288 L34.0445546,55.0797476 L24.8586734,55.0797476 L24.8586734,64.2656288 Z M66.1332478,49.9110641 L75.319129,49.9110641 L75.319129,40.7251829 L66.1332478,40.7251829 L66.1332478,49.9110641 Z M52.3757498,49.9110641 L61.561631,49.9110641 L61.561631,40.7251829 L52.3757498,40.7251829 L52.3757498,49.9110641 Z M38.6172116,49.9110641 L47.8030928,49.9110641 L47.8030928,40.7251829 L38.6172116,40.7251829 L38.6172116,49.9110641 Z M24.8586734,49.9110641 L34.0445546,49.9110641 L34.0445546,40.7251829 L24.8586734,40.7251829 L24.8586734,49.9110641 Z M13.1607434,90.8382164 L87.7337471,90.8382164 L87.7337471,30.2016227 L13.1607434,30.2016227 L13.1607434,90.8382164 Z M13.1617836,26.0408793 L87.7347873,26.0408793 L87.7347873,16.2662529 L13.1617836,16.2662529 L13.1617836,26.0408793 Z M73.5237682,12.1055095 L73.5237682,5 L69.3630249,5 L69.3630249,12.1055095 L31.5314656,12.1055095 L31.5314656,5 L27.3707222,5 L27.3707222,12.1055095 L9,12.1055095 L9,95 L91.8955307,95 L91.8955307,12.1055095 L73.5237682,12.1055095 Z" fill="currentColor"/></g></svg>
|
||||
<time datetime="{{ page.date }}">{{ page.date | date(format="%d %B %Y") }}</time>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="post-body">
|
||||
{{ page.description | safe }}
|
||||
</div>
|
||||
</article>
|
Loading…
Reference in a new issue