diff options
| author | Jieiku | 2022-03-27 19:19:28 -0700 |
|---|---|---|
| committer | Jieiku | 2022-03-27 19:19:28 -0700 |
| commit | 2ef7c0ec1ff976b807691fea23eaaf5ea1e93bc9 (patch) | |
| tree | 33dda7250a49739153f501dbdec7c26792d87964 /templates | |
| download | abridge-2ef7c0ec1ff976b807691fea23eaaf5ea1e93bc9.tar.gz abridge-2ef7c0ec1ff976b807691fea23eaaf5ea1e93bc9.tar.bz2 abridge-2ef7c0ec1ff976b807691fea23eaaf5ea1e93bc9.zip | |
init
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/404.html | 18 | ||||
| -rw-r--r-- | templates/base.html | 128 | ||||
| -rw-r--r-- | templates/categories/list.html | 12 | ||||
| -rw-r--r-- | templates/categories/single.html | 8 | ||||
| -rw-r--r-- | templates/contact.html | 16 | ||||
| -rw-r--r-- | templates/index.html | 17 | ||||
| -rw-r--r-- | templates/macros/macros.html | 7 | ||||
| -rw-r--r-- | templates/macros/page.html | 3 | ||||
| -rw-r--r-- | templates/macros/social.html | 23 | ||||
| -rw-r--r-- | templates/page.html | 40 | ||||
| -rw-r--r-- | templates/pages.html | 2 | ||||
| -rw-r--r-- | templates/posts.html | 5 | ||||
| -rw-r--r-- | templates/robots.txt | 4 | ||||
| -rw-r--r-- | templates/shortcodes/audio.html | 7 | ||||
| -rw-r--r-- | templates/shortcodes/gif.html | 7 | ||||
| -rw-r--r-- | templates/shortcodes/image.html | 7 | ||||
| -rw-r--r-- | templates/shortcodes/img.html | 42 | ||||
| -rw-r--r-- | templates/shortcodes/katex.html | 1 | ||||
| -rw-r--r-- | templates/shortcodes/quote.html | 6 | ||||
| -rw-r--r-- | templates/shortcodes/video.html | 7 | ||||
| -rw-r--r-- | templates/shortcodes/vm.html | 3 | ||||
| -rw-r--r-- | templates/shortcodes/yt.html | 3 | ||||
| -rw-r--r-- | templates/tags/list.html | 11 | ||||
| -rw-r--r-- | templates/tags/single.html | 8 |
24 files changed, 385 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..1857f55 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{# Title #} +{% block title %}<title>Sorry! the page doesn't exist</title>{% endblock title %} +{% block current_url %} +<meta property="og:url" content="{{ get_url(path='/') }}"> +<meta name="twitter:url" content="{{ get_url(path='/') }}"> +{% endblock current_url %} +{# Page heading #} + +{% block content %}<div> + +<h1>404 Error</h1> +<h2>Sorry</h2> +<p>The requested page does not exist or has been moved to another address.</p> +<p>Please go back to <a href="{{ get_url(path="/", trailing_slash=true) }}">home</a>.</p> + +</div>{% endblock content %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..83f5278 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,128 @@ +{% import "macros/social.html" as social_macros %} +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + + {% block title %}<title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.title }}</title>{% endblock title %} + + {% block description %} + {% if page.description %} + <meta name="description" content="{{ page.description }}" /> + <meta name="twitter:description" content="{{ page.description }}"> + <meta property="og:description" content="{{ page.description }}"> + {% else %} + <meta name="description" content="{{ config.description }}" /> + <meta name="twitter:description" content="{{ config.description}}"> + <meta property="og:description" content="{{ config.description }}"> + {% endif %} + {% endblock description %} + + {% if page.extra.keywords %} + <meta name="keywords" content="{{ page.extra.keywords }}, {{ config.extra.keywords }}"> + {% else %} + <meta name="keywords" content="{{ config.extra.keywords }}"> + {% endif %} + + <meta name="author" content="{{ config.extra.author }}"> + <meta name="copyright" content="{{ config.title }}"> + + {% if config.extra.google %}<meta name="google-site-verification" content="{{ config.extra.google | safe }}">{% endif %} + {% if config.extra.bing %}<meta name="msvalidate.01" content="{{ config.extra.bing | safe}}">{% endif %} + <meta name="referrer" content="no-referrer-when-downgrade"> + <meta name="robots" content="index, follow"> + <meta name="googlebot" content="index,follow"> + <meta name="HandheldFriendly" content="True"> + <meta name="mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-status-bar-style" content="default"> + + {% block css %}<link rel="stylesheet" href="{{ get_url(path="abridge.css", trailing_slash=false, cachebust=true) }}">{% endblock css %} + <link rel="shortcut icon" href="/favicon.png" sizes="16x16" type="image/png"/> + <link rel="canonical" href="{{ get_url(path="/") }}"> + {% if config.generate_feed %}<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path="atom.xml") }}">{% endif %} + {% block ogp_head %} + + {% if page.title %} + <meta property="og:title" content="{{ page.title }} | {{ config.title }}"> + <meta name="twitter:title" content="{{ page.title }} | {{ config.title }}"> + {% else %} + <meta property="og:title" content="{{ config.title }}"> + <meta name="twitter:title" content="{{ config.title }}"> + {% endif %} + + <meta property="og:site_name" content="{{ config.title }}"> + <meta property="og:locale" content="en_US"> + <meta property="og:type" content="website"> + <meta property="og:updated_time" content="{{ now() }}">{% endblock ogp_head %} + + {% block current_url %}<meta property="og:url" content="{{ current_url | safe }}"> + <meta name="twitter:url" content="{{ current_url | safe }}">{% endblock current_url %} + + {% if config.extra.social.twitter %} + <meta name="twitter:site" content="@{{ config.extra.social.twitter }}"> + <meta name="twitter:creator" content="@{{ config.extra.social.twitter }}"> + {% endif %} + + {% if page.extra.thumbnail %} + <meta name="twitter:card" content="summary_large_image"> + <meta name="twitter:image" content="{{ get_url(path=page.path ~ page.extra.thumbnail, trailing_slash=false) }}"> + <meta property="og:image" content="{{ get_url(path=page.path ~ page.extra.thumbnail, trailing_slash=false) }}"> + {% elif page.extra.static_thumbnail %} + {%if page.extra.static_thumbnail is matching("^http[s]?://") %} + <meta name="twitter:card" content="summary_large_image"> + <meta name="twitter:image" content="{{ page.extra.static_thumbnail }}"> + <meta property="og:image" content="{{ page.extra.static_thumbnail }}"> + {% else %} + <meta name="twitter:card" content="summary_large_image"> + <meta name="twitter:image" content="{{ get_url(path=page.extra.static_thumbnail, trailing_slash=false) }}"> + <meta property="og:image" content="{{ get_url(path=page.extra.static_thumbnail, trailing_slash=false) }}"> + {% endif %} + {% elif config.extra.default_og_image %} + <meta name="twitter:card" content="summary_large_image"> + <meta name="twitter:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}"> + <meta property="og:image" content="{{ get_url(path=config.extra.default_og_image, trailing_slash=false) }}"> + {% elif config.extra.banner %} + <meta name="twitter:card" content="summary_large_image"> + <meta name="twitter:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}"> + <meta property="og:image" content="{{ get_url(path=config.extra.banner, trailing_slash=false) }}"> + {% else %} + <meta name="twitter:card" content="summary"> + {% endif %} + +{% block extra_head %}{% endblock extra_head %} +</head> +<body> +{% block header %}<header> + <nav> + <header> + <h1><a href="{{ get_url(path="/", trailing_slash=true) }}">{{ config.extra.textlogo | safe }}</a></h1> + </header> + <div overflow> + <ul> + {% for i in config.extra.menu %}<li><h2><a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a></h2></li>{% endfor %} + </ul> + </div> + </nav> + {% if config.extra.sitedesc %}{% if config.description %}<div>{{ config.description }}</div>{% endif %}{% endif %} + <hr> +</header>{% endblock header %} +<main>{% block content %} +{% endblock content %} +</main> +{% block footer %}<footer> + <hr> + <center> + <p>{{ social_macros::social_links(social_config=config.extra.social) }}</p> + {# Copyright #}<p>Copyright © 2019-{{ now() | date(format="%Y") }} {{ config.title }}</p> + <p>{% for i in config.extra.menu_footer %}<a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a> {% endfor %}</p> + {# Optional footer credit #} + {% if config.extra.footer_credit %} + <p>Powered by <a href="https://www.getzola.org/">Zola</a> and <a href="https://github.com/jieiku/abridge/">Abridge</a></p> + {% endif %} + </center> +</footer>{% endblock footer %} +</body> +</html> diff --git a/templates/categories/list.html b/templates/categories/list.html new file mode 100644 index 0000000..89bbc23 --- /dev/null +++ b/templates/categories/list.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block content %} + <div> + <center> + <h1>{{ terms | length }} Categories</h1> + <p>{% for term in terms -%}[<a href="#{{ term.name }}">{{ term.name }}</a>] {%- endfor %}</p> + </center> + {% for term in terms -%}<h2 id="{{ term.name }}"><a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2> + {% for page in term.pages -%}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + {% endfor -%}{% endfor -%} +</div>{% endblock content %} diff --git a/templates/categories/single.html b/templates/categories/single.html new file mode 100644 index 0000000..d5fe5b7 --- /dev/null +++ b/templates/categories/single.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} + <div> + <h2>{{ term.name }}</h2> + {% for year, posts in term.pages | group_by(attribute="year") %}<h3>{{ year }}</h3> + {% for page in posts %}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + {% endfor %}{% endfor %}</div>{% endblock content %} diff --git a/templates/contact.html b/templates/contact.html new file mode 100644 index 0000000..bf37d2d --- /dev/null +++ b/templates/contact.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block content %} +<div> +<p>Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!</p> +<form name="contact" method="POST"> + <p><label>Name</label> + <input type="text" placeholder="Name" id="name" required data-validation-required-message="Please enter your name."></p> + <p><label>Email Address</label> + <input type="email" placeholder="name@example.com" id="email" required data-validation-required-message="Please enter your email address."></p> + <p><label>Message</label> + <textarea rows="5" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea></p> + <div id="success"></div> + <p><button type="submit" id="sendMessageButton">Send</button></p> +</form> +</div>{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..16eef5b --- /dev/null +++ b/templates/index.html @@ -0,0 +1,17 @@ +{% import "macros/page.html" as page_macros %} +{% import "macros/macros.html" as macros %} +{% extends "base.html" %}{% block content %} + <div>{% for page in paginator.pages %} + <article> +{{ macros::title(page=page) }} <p>{{ page.summary | markdown(inline=true) | safe }} <a href="{{ page.permalink | safe }}">...more</a></p> + </article>{% endfor %} + <nav> + {% if paginator.previous %}<a href="{{ paginator.previous | safe }}">< Previous</a> {% endif %}{% if paginator.next %}<a href="{{ paginator.next | safe }}">Next ></a>{% endif %} + </nav> + </div>{% set section_item = get_section(path="_index.md") %} + <div class="toc"> + <div class="toc-sticky"> + <h3>Recent Posts</h3>{% for page in section_item.pages | slice(end=config.extra.recent_items) %} +{{ page_macros::page_listing(page=page) }}{% endfor %} + </div> + </div>{% endblock content %} diff --git a/templates/macros/macros.html b/templates/macros/macros.html new file mode 100644 index 0000000..f0fc531 --- /dev/null +++ b/templates/macros/macros.html @@ -0,0 +1,7 @@ +{% macro title(page) %} <h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1> + <span>{{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} <span> [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind="categories", name=cat) | safe }}">{{ cat }}</a>{% endfor %}] </span> {% endif %} + {% if page.taxonomies.tags %} <span>{% for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">{{ tag }}</a> {% endfor %}</span>{% endif %} +{% endmacro title %} +{% macro footer(page) %} +<h3><a href="#">Back to top</a></h3> +{% endmacro footer %} diff --git a/templates/macros/page.html b/templates/macros/page.html new file mode 100644 index 0000000..69d40f7 --- /dev/null +++ b/templates/macros/page.html @@ -0,0 +1,3 @@ +{% macro page_listing(page) %} <div class="toc-item"> + <a href="{{ page.permalink | safe}}" title="{{ page.title }}">{{ page.title }}</a> + </div>{% endmacro page_listing %} diff --git a/templates/macros/social.html b/templates/macros/social.html new file mode 100644 index 0000000..2fbee61 --- /dev/null +++ b/templates/macros/social.html @@ -0,0 +1,23 @@ +{% macro social_links(social_config) %}<span>{% set base_url = get_url(path="", lang=lang) %} +{% if config.generate_feed %} <a href="{{ get_url(path="atom.xml") }}" target="_blank"><span class="svg rss" title="Rss"></span></a>{% endif %} + +{% if social_config.mail %} <a href="mailto:{{ social_config.mail }}" target="_blank"><span class="svg mail" title="Mail"></span></a>{% endif %} +{% if social_config.mastodon %} <a href="https://mastodon.social/{{ social_config.mastodon }}/" target="_blank"><span class="svg mastodon" title="Mastodon"></span></a>{% endif %} +{% if social_config.element %} <a href="https://{{ social_config.element }}/" target="_blank"><span class="svg element" title="Element"></span></a>{% endif %} +{% if social_config.matrix %} <a href="https://{{ social_config.matrix }}/" target="_blank"><span class="svg matrix" title="Matrix"></span></a>{% endif %} +{% if social_config.twitter %} <a href="https://twitter.com/{{ social_config.twitter }}/" target="_blank"><span class="svg twitter" title="Twitter"></span></a>{% endif %} +{% if social_config.facebook %} <a href="https://www.facebook.com/{{ social_config.facebook }}/" target="_blank"><span class="svg facebook" title="Facebook"></span></a>{% endif %} +{% if social_config.linkedin %} <a href="https://www.linkedin.com/in/{{ social_config.linkedin }}/" target="_blank"><span class="svg linkedin" title="LinkedIn"></span></a>{% endif %} + +{% if social_config.gitlab %} <a href="https://gitlab.com/{{ social_config.gitlab }}/" target="_blank"><span class="svg gitlab" title="Gitlab"></span></a>{% endif %} +{% if social_config.github %} <a href="https://github.com/{{ social_config.github }}/" target="_blank"><span class="svg github" title="Github"></span></a>{% endif %} +{% if social_config.bitbucket %} <a href="https://bitbucket.org/{{ social_config.bitbucket }}/" target="_blank"><span class="svg bitbucket" title="Bitbucket"></span></a>{% endif %} +{% if social_config.python %} <a href="https://pypi.org/user/{{ social_config.python }}/" target="_blank"><span class="svg python" title="Python"></span></a>{% endif %} +{% if social_config.docker %} <a href="https://hub.docker.com/u/{{ social_config.docker }}/" target="_blank"><span class="svg docker" title="Docker"></span></a>{% endif %} +{% if social_config.stack %} <a href="https://stackoverflow.com/users/{{ social_config.stack }}/" target="_blank"><span class="svg stack" title="Stack"></span></a>{% endif %} + +{% if social_config.instagram %} <a href="https://www.instagram.com/{{ social_config.instagram }}/" target="_blank"><span class="svg instagram" title="Instagram"></span></a>{% endif %} +{% if social_config.pinterest %} <a href="https://www.pinterest.com/{{ social_config.pinterest }}/" target="_blank"><span class="svg pinterest" title="Pinterest"></span></a>{% endif %} +{% if social_config.twitch %} <a href="https://www.twitch.tv/{{ social_config.twitch }}/" target="_blank"><span class="svg twitch" title="Twitch"></span></a>{% endif %} +{% if social_config.youtube %} <a href="https://www.youtube.com/channel/{{ social_config.youtube }}/" target="_blank"><span class="svg youtube" title="YouTube"></span></a>{% endif %} + </span>{% endmacro %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..e3388c0 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,40 @@ +{% extends "base.html" %} +{% import "macros/macros.html" as macros %} +{{config.title}} - {{page.title}} +{% block content %} +<article> + {{ macros::title(page=page) }} + {{ page.content | safe }} + {% block page_before_footer %} + {% endblock page_before_footer %} + {% block page_footer %} + {{ macros::footer(page=page) }} + {% endblock page_footer %} + {% block page_after_footer %} + {% endblock page_after_footer %} +</article> +{% block toc %} + {% if page.extra.toc %} + {% set toc = page.toc %} + {% endif %} + {% if toc %} + <div class="toc"> + <div class="toc-sticky"> + <h3>Index</h3> + {% for h in toc %} + <div class="toc-item"> + <a class="subtext" href="{{h.permalink | safe}}">{{ h.title }}</a> + </div> + {% if h.children %} + {% for h2 in h.children %} + <div class="toc-item-child"> + <a class="subtext" href="{{h2.permalink | safe}}"><small>- {{ h2.title }}</small></a> + </div> + {% endfor %} + {% endif %} + {% endfor %} + </div> + </div> + {% endif %} +{% endblock toc %} +{% endblock content %} diff --git a/templates/pages.html b/templates/pages.html new file mode 100644 index 0000000..30c95e9 --- /dev/null +++ b/templates/pages.html @@ -0,0 +1,2 @@ +{% extends "base.html" %}{% block content %} +<div>{{ page.content | safe }}</div>{% endblock content %} diff --git a/templates/posts.html b/templates/posts.html new file mode 100644 index 0000000..7aee3a7 --- /dev/null +++ b/templates/posts.html @@ -0,0 +1,5 @@ +{% extends "base.html" %}{% block content %}{% set section_item = get_section(path="_index.md") %} + <div>{% for year, posts in section_item.pages | group_by(attribute="year") %} + <h2>{{ year }}</h2> + {% for post in posts %}<p><a href="{{ post.permalink | safe }}" title="{{ post.title }}">{{ post.title }}</a> - {{ post.date | date(format="%F") }}</p>{% endfor %}{% endfor %} + </div>{% endblock content %} diff --git a/templates/robots.txt b/templates/robots.txt new file mode 100644 index 0000000..766e67f --- /dev/null +++ b/templates/robots.txt @@ -0,0 +1,4 @@ +Sitemap: {{ get_url(path="sitemap.xml", trailing_slash=false) }} +User-Agent: * +Allow: / +Host: {{ get_url(path="/", trailing_slash=false) }} diff --git a/templates/shortcodes/audio.html b/templates/shortcodes/audio.html new file mode 100644 index 0000000..3f9368e --- /dev/null +++ b/templates/shortcodes/audio.html @@ -0,0 +1,7 @@ +<audio controls> + {% for source in sources -%} + {% set type = source | split(pat=".") | last -%} + <source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'audio/' ~ type }}"> + {% endfor -%} + Your browser doesn't support the audio tag and/or the audio formats in use here – sorry! +</audio> diff --git a/templates/shortcodes/gif.html b/templates/shortcodes/gif.html new file mode 100644 index 0000000..3ae56fd --- /dev/null +++ b/templates/shortcodes/gif.html @@ -0,0 +1,7 @@ +<video autoplay loop muted playsinline> + {% for source in sources -%} + {% set type = source | split(pat=".") | last -%} + <source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'video/' ~ type }}"> + {% endfor -%} + Your browser doesn't support the video tag, which I use in place of .gifs, and/or the video formats in use here – sorry! +</video> diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html new file mode 100644 index 0000000..ea236ef --- /dev/null +++ b/templates/shortcodes/image.html @@ -0,0 +1,7 @@ +<picture> + {% for source in sources -%} + {% set type = source | split(pat=".") | last -%} + <source srcset="{{ config.base_url | safe}}{{ page.path | safe }}{{ source | safe }}" type="{{ 'img/' ~ type }}"> + {% endfor -%} + <img src="{{ fallback_path }}" alt="{{ fallback_alt }}"/> +</picture> diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html new file mode 100644 index 0000000..94cb9fa --- /dev/null +++ b/templates/shortcodes/img.html @@ -0,0 +1,42 @@ +{# {{ img(path="", alt="", caption="", extended_width_pct=1.3, quality=90) }} #} + +{# container_width = (pixel size, px) * (.container's max-width) #} +{% set container_width = 16 * 42 %} + +{# figure_width = container_width - (figure margin_blocks) #} +{% set figure_width = container_width - (40 * 2) %} + +{% if path is starting_with("./") %} + {% set relative_path = page.relative_path | split(pat="/") | slice(end=-1) | join(sep="/") %} + {% set img_path = path | trim_start_matches(pat="./") %} + {% set img_path = relative_path ~ "/" ~ img_path %} +{% else %} + {% set img_path = path %} +{% endif %} + +{% if path is not ending_with(".svg") %} + {% set resize = true %} + {% set image_quality = 90 %} + {% if quality %} + {% set image_quality = quality %} + {% endif %} + + {% if extended_width_pct %} + {% if extended_width_pct == -1 %} + {# adjust extended width to container width #} + {% set extended_width_pct = 0.042 %} + {% endif %} + {% set _width = config.extra.images.max_width - figure_width %} + {% set extended_width = (extended_width_pct * _width + figure_width) | round | int %} + {% if extended_width > config.extra.images.max_width %} + {% set extended_width = config.extra.images.max_width %} + {% endif %} + {% set resized_image = resize_image(path=img_path, width=extended_width, op="fit_width", quality=image_quality) %} + {% else %} + {% set resized_image = resize_image(path=img_path, width=figure_width, op="fit_width", quality=image_quality) %} + {% endif %} +{% endif %} +<figure> + <img src="{% if resize %}{{ resized_image.url }}{% else %}{{ path }}{% endif %}" {% if alt %}alt="{{alt}}"{% endif %}/> + {% if caption %}<figcaption>{{ caption | safe }}</figcaption>{% endif %} +</figure> diff --git a/templates/shortcodes/katex.html b/templates/shortcodes/katex.html new file mode 100644 index 0000000..cac8e97 --- /dev/null +++ b/templates/shortcodes/katex.html @@ -0,0 +1 @@ +<script type="math/tex{% if block %};mode=display{% endif %}">{{body}}</script> diff --git a/templates/shortcodes/quote.html b/templates/shortcodes/quote.html new file mode 100644 index 0000000..8238b71 --- /dev/null +++ b/templates/shortcodes/quote.html @@ -0,0 +1,6 @@ +<blockquote> + {{body}}<br /> + {% if author %} + -- {{ author }} + {% endif %} +</blockquote> diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html new file mode 100644 index 0000000..a1a2f31 --- /dev/null +++ b/templates/shortcodes/video.html @@ -0,0 +1,7 @@ +<video controls> + {% for source in sources -%} + {% set type = source | split(pat=".") | last -%} + <source src="{{ config.base_url | safe }}{{ page.path | safe }}{{ source | safe }}" type="{{ 'video/' ~ type }}"> + {% endfor -%} + Your browser doesn't support the video tag and/or the video formats in use here – sorry! +</video> diff --git a/templates/shortcodes/vm.html b/templates/shortcodes/vm.html new file mode 100644 index 0000000..230e557 --- /dev/null +++ b/templates/shortcodes/vm.html @@ -0,0 +1,3 @@ +<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;"> + <iframe src="https://player.vimeo.com/video/{{id}}" style="position:absolute;top:0;left:0;"></iframe> +</div> diff --git a/templates/shortcodes/yt.html b/templates/shortcodes/yt.html new file mode 100644 index 0000000..7816bd8 --- /dev/null +++ b/templates/shortcodes/yt.html @@ -0,0 +1,3 @@ +<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;"> + <iframe src="https://www.youtube.com/embed/{{id}}{% if autoplay %}?autoplay=1{% endif %}" style="position:absolute;top:0;left:0;"></iframe> +</div> diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..e7a6b7d --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block content %} + <div> + <center> + <h1>{{ terms | length }} Tags</h1> + <p>{% for term in terms -%}#<a href="#{{ term.name }}">{{ term.name }}</a> {%- endfor %}</p> + </center> + {% for term in terms -%}<h2 id="{{ term.name }}">#<a href="{{ term.permalink | safe }}">{{ term.name }}</a></h2> + {% for page in term.pages -%}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + {% endfor -%}{% endfor -%}</div>{% endblock content %} diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..fd1a10f --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} + <div> + <h2>{{ term.name }}</h2> + {% for year, posts in term.pages | group_by(attribute="year") %}<h3>{{ year }}</h3> + {% for page in term.pages %}<p><a href="{{ page.permalink | safe }}">{{ page.title }}</a> - <time datetime="{{ page.date }}">{{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}</time></p> + {% endfor %}{% endfor %}</div>{% endblock content %} |
