From 2ef7c0ec1ff976b807691fea23eaaf5ea1e93bc9 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Sun, 27 Mar 2022 19:19:28 -0700
Subject: init
---
templates/404.html | 18 ++++++
templates/base.html | 128 +++++++++++++++++++++++++++++++++++++++
templates/categories/list.html | 12 ++++
templates/categories/single.html | 8 +++
templates/contact.html | 16 +++++
templates/index.html | 17 ++++++
templates/macros/macros.html | 7 +++
templates/macros/page.html | 3 +
templates/macros/social.html | 23 +++++++
templates/page.html | 40 ++++++++++++
templates/pages.html | 2 +
templates/posts.html | 5 ++
templates/robots.txt | 4 ++
templates/shortcodes/audio.html | 7 +++
templates/shortcodes/gif.html | 7 +++
templates/shortcodes/image.html | 7 +++
templates/shortcodes/img.html | 42 +++++++++++++
templates/shortcodes/katex.html | 1 +
templates/shortcodes/quote.html | 6 ++
templates/shortcodes/video.html | 7 +++
templates/shortcodes/vm.html | 3 +
templates/shortcodes/yt.html | 3 +
templates/tags/list.html | 11 ++++
templates/tags/single.html | 8 +++
24 files changed, 385 insertions(+)
create mode 100644 templates/404.html
create mode 100644 templates/base.html
create mode 100644 templates/categories/list.html
create mode 100644 templates/categories/single.html
create mode 100644 templates/contact.html
create mode 100644 templates/index.html
create mode 100644 templates/macros/macros.html
create mode 100644 templates/macros/page.html
create mode 100644 templates/macros/social.html
create mode 100644 templates/page.html
create mode 100644 templates/pages.html
create mode 100644 templates/posts.html
create mode 100644 templates/robots.txt
create mode 100644 templates/shortcodes/audio.html
create mode 100644 templates/shortcodes/gif.html
create mode 100644 templates/shortcodes/image.html
create mode 100644 templates/shortcodes/img.html
create mode 100644 templates/shortcodes/katex.html
create mode 100644 templates/shortcodes/quote.html
create mode 100644 templates/shortcodes/video.html
create mode 100644 templates/shortcodes/vm.html
create mode 100644 templates/shortcodes/yt.html
create mode 100644 templates/tags/list.html
create mode 100644 templates/tags/single.html
(limited to 'templates')
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 %}
Sorry! the page doesn't exist{% endblock title %}
+{% block current_url %}
+
+
+{% endblock current_url %}
+{# Page heading #}
+
+{% block content %}
+
+
404 Error
+
Sorry
+
The requested page does not exist or has been moved to another address.
+
Please go back to home.
+
+
{% 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 %}
+
+
+
+
+
+
+
+ {% block title %}{% if page.title %}{{ page.title }} | {% endif %}{{ config.title }}{% endblock title %}
+
+ {% block description %}
+ {% if page.description %}
+
+
+
+ {% else %}
+
+
+
+ {% endif %}
+ {% endblock description %}
+
+ {% if page.extra.keywords %}
+
+ {% else %}
+
+ {% endif %}
+
+
+
+
+ {% if config.extra.google %}{% endif %}
+ {% if config.extra.bing %}{% endif %}
+
+
+
+
+
+
+
+
+ {% block css %}{% endblock css %}
+
+
+ {% if config.generate_feed %}{% endif %}
+ {% block ogp_head %}
+
+ {% if page.title %}
+
+
+ {% else %}
+
+
+ {% endif %}
+
+
+
+
+ {% endblock ogp_head %}
+
+ {% block current_url %}
+ {% endblock current_url %}
+
+ {% if config.extra.social.twitter %}
+
+
+ {% endif %}
+
+ {% if page.extra.thumbnail %}
+
+
+
+ {% elif page.extra.static_thumbnail %}
+ {%if page.extra.static_thumbnail is matching("^http[s]?://") %}
+
+
+
+ {% else %}
+
+
+
+ {% endif %}
+ {% elif config.extra.default_og_image %}
+
+
+
+ {% elif config.extra.banner %}
+
+
+
+ {% else %}
+
+ {% endif %}
+
+{% block extra_head %}{% endblock extra_head %}
+
+
+{% block header %}
+
+ {% if config.extra.sitedesc %}{% if config.description %}{{ config.description }}
{% endif %}{% endif %}
+
+{% endblock header %}
+{% block content %}
+{% endblock content %}
+
+{% block footer %}{% endblock footer %}
+
+
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 %}
+
+
+ {{ terms | length }} Categories
+ {% for term in terms -%}[{{ term.name }}] {%- endfor %}
+
+ {% for term in terms -%}
+ {% for page in term.pages -%}
{{ page.title }} -
+ {% endfor -%}{% endfor -%}
+
{% 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 %}
+
+
{{ term.name }}
+ {% for year, posts in term.pages | group_by(attribute="year") %}
{{ year }}
+ {% for page in posts %}
{{ page.title }} -
+ {% endfor %}{% endfor %}
{% 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 %}
+
+
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!
+
+
{% 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 %}
+ {% for page in paginator.pages %}
+
+{{ macros::title(page=page) }} {{ page.summary | markdown(inline=true) | safe }} ...more
+ {% endfor %}
+
+
{% set section_item = get_section(path="_index.md") %}
+
+
+
Recent Posts
{% for page in section_item.pages | slice(end=config.extra.recent_items) %}
+{{ page_macros::page_listing(page=page) }}{% endfor %}
+
+
{% 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) %}
+ {{ page.date | date(format="%B %d, %Y") }}{% if page.taxonomies.categories %} [{% for cat in page.taxonomies.categories %}{{ cat }}{% endfor %}] {% endif %}
+ {% if page.taxonomies.tags %} {% for tag in page.taxonomies.tags %} #{{ tag }} {% endfor %}{% endif %}
+{% endmacro title %}
+{% macro footer(page) %}
+
+{% 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) %} {% 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) %}{% set base_url = get_url(path="", lang=lang) %}
+{% if config.generate_feed %} {% endif %}
+
+{% if social_config.mail %} {% endif %}
+{% if social_config.mastodon %} {% endif %}
+{% if social_config.element %} {% endif %}
+{% if social_config.matrix %} {% endif %}
+{% if social_config.twitter %} {% endif %}
+{% if social_config.facebook %} {% endif %}
+{% if social_config.linkedin %} {% endif %}
+
+{% if social_config.gitlab %} {% endif %}
+{% if social_config.github %} {% endif %}
+{% if social_config.bitbucket %} {% endif %}
+{% if social_config.python %} {% endif %}
+{% if social_config.docker %} {% endif %}
+{% if social_config.stack %} {% endif %}
+
+{% if social_config.instagram %} {% endif %}
+{% if social_config.pinterest %} {% endif %}
+{% if social_config.twitch %} {% endif %}
+{% if social_config.youtube %} {% endif %}
+ {% 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 %}
+
+ {{ 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 %}
+
+{% block toc %}
+ {% if page.extra.toc %}
+ {% set toc = page.toc %}
+ {% endif %}
+ {% if toc %}
+
+
+
Index
+ {% for h in toc %}
+
+ {% if h.children %}
+ {% for h2 in h.children %}
+
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+
+
+ {% 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 %}
+{{ page.content | safe }}
{% 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") %}
+ {% for year, posts in section_item.pages | group_by(attribute="year") %}
+
{{ year }}
+ {% for post in posts %}
{{ post.title }} - {{ post.date | date(format="%F") }}
{% endfor %}{% endfor %}
+
{% 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 @@
+
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 @@
+
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 @@
+
+ {% for source in sources -%}
+ {% set type = source | split(pat=".") | last -%}
+
+ {% endfor -%}
+
+
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 %}
+
+
+ {% if caption %}{{ caption | safe }}{% endif %}
+
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 @@
+
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 @@
+
+ {{body}}
+ {% if author %}
+ -- {{ author }}
+ {% endif %}
+
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 @@
+
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 @@
+
+
+
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 @@
+
+
+
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 %}
+
+
+ {{ terms | length }} Tags
+ {% for term in terms -%}#{{ term.name }} {%- endfor %}
+
+ {% for term in terms -%}
+ {% for page in term.pages -%}
{{ page.title }} -
+ {% endfor -%}{% endfor -%}
{% 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 %}
+
+
{{ term.name }}
+ {% for year, posts in term.pages | group_by(attribute="year") %}
{{ year }}
+ {% for page in term.pages %}
{{ page.title }} -
+ {% endfor %}{% endfor %}
{% endblock content %}
--
cgit v1.3.1