From d4a052e86f33ced79b9f4d09aeee0b1c43ef1f23 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Tue, 31 May 2022 01:45:54 -0700
Subject: Improve imghover shortcode, examples, page scores
---
templates/categories/list.html | 6 ++++--
templates/categories/single.html | 2 +-
templates/macros/macros.html | 2 +-
templates/posts.html | 2 +-
templates/shortcodes/imagehover.html | 21 ++++++++++++++++-----
templates/shortcodes/vm.html | 2 +-
templates/shortcodes/yt.html | 2 +-
templates/tags/list.html | 4 ++--
templates/tags/single.html | 2 +-
9 files changed, 28 insertions(+), 15 deletions(-)
(limited to 'templates')
diff --git a/templates/categories/list.html b/templates/categories/list.html
index f85f732..10a8c8b 100644
--- a/templates/categories/list.html
+++ b/templates/categories/list.html
@@ -19,13 +19,15 @@
{{ terms | length }} Categories
- {%- for term in terms %}[{{ term.name }} ] {%- endfor %}
+ {% for term in terms %} [{{ term.name }} ] {% endfor %}
{%- for term in terms %}
{%- for page in term.pages %}
-
{{ page.title }} - {{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}
+
{{ page.title }} - {{ page.date | date(format="%F") }}
{%- endfor %}
{%- endfor %}
{%- endblock content %}
+
+
diff --git a/templates/categories/single.html b/templates/categories/single.html
index f1c5cfe..b1cd680 100644
--- a/templates/categories/single.html
+++ b/templates/categories/single.html
@@ -21,7 +21,7 @@
{%- for year, posts in term.pages | group_by(attribute="year") %}
{{ year }}
{%- for page in posts %}
- {{ page.title }} - {{ page.date | date(format=config.extra.timeformat | default(value="%B %e, %Y")) }}
+ {{ page.title }} - {{ page.date | date(format="%F") }}
{%- endfor %}
{%- endfor %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index e4fcf73..541ebfe 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -17,7 +17,7 @@
{%- macro footer(page) %}
-
+Back to top
{%- endmacro footer %}
diff --git a/templates/posts.html b/templates/posts.html
index bd5d0d8..e4f1d54 100644
--- a/templates/posts.html
+++ b/templates/posts.html
@@ -23,7 +23,7 @@
{%- for year, posts in section_item.pages | group_by(attribute="year") %}
{{ year }}
{%- for post in posts %}
- {{ post.title }} - {{ post.date | date(format="%F") }}
+ {{ post.title }} - {{ post.date | date(format="%F") }}
{%- endfor %}
{%- endfor %}
diff --git a/templates/shortcodes/imagehover.html b/templates/shortcodes/imagehover.html
index 68f25be..99dd4e4 100644
--- a/templates/shortcodes/imagehover.html
+++ b/templates/shortcodes/imagehover.html
@@ -8,22 +8,33 @@
{%- else %}
## {{ sourcename }}
-
+
{%- endif %}
{%- endfor %}
+{%- if w and h and p %}
+ {%- set padding = h / w * p %}
+{%- elif w and h %}
+ {%- set padding = h / w * 50 %}
+{%- else %}
+ {%- set padding = 50 %}
+{%- endif %}
+