From 31395878a127a6dd474da50c2f93956588aa2135 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Tue, 31 May 2022 03:00:20 -0700 Subject: HTML5 Validation & Cleanup --- templates/base.html | 42 ++++++------- templates/categories/list.html | 4 +- templates/contact.html | 4 +- templates/macros/head.html | 120 ++++++++++++++++++------------------- templates/macros/social.html | 86 +++++++++++++------------- templates/shortcodes/audio.html | 2 +- templates/shortcodes/gif.html | 2 +- templates/shortcodes/image.html | 4 +- templates/shortcodes/img.html | 4 +- templates/shortcodes/imghover.html | 2 +- templates/shortcodes/video.html | 2 +- templates/shortcodes/vm.html | 4 +- templates/shortcodes/yt.html | 4 +- templates/tags/list.html | 4 +- 14 files changed, 137 insertions(+), 147 deletions(-) (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 0bbd48d..b1a3615 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,9 +5,9 @@ - - - + + + {{- macros_head::resource() }} {{- macros_head::stylesheet() }} {%- block seo %} @@ -19,29 +19,30 @@ {%- endblock seo %} {{- macros_head::favicons() }} {{- macros_head::security() }} - - - - + + + + {{- macros_head::math() }} + {%- block header %}
{%- endblock header %} @@ -80,9 +75,9 @@ {%- block footer %} {%- endblock footer %} - \ No newline at end of file diff --git a/templates/categories/list.html b/templates/categories/list.html index 10a8c8b..2c70142 100644 --- a/templates/categories/list.html +++ b/templates/categories/list.html @@ -17,10 +17,10 @@ {%- block content %}
-
+

{{ terms | length }} Categories

{% for term in terms %} [{{ term.name }}] {% endfor %}

-
+
{%- for term in terms %}

{{ term.name }}

{%- for page in term.pages %} diff --git a/templates/contact.html b/templates/contact.html index eabb00f..926d6df 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -30,11 +30,11 @@

- +

- +

diff --git a/templates/macros/head.html b/templates/macros/head.html index 9e4d59f..f6090a6 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -1,32 +1,32 @@ {%- macro stylesheet() %} - + {%- endmacro %} {%- macro resource() %} {%- if config.extra.fonts %}{%- for i in config.extra.fonts %} {%- if i.url is matching("^http[s]?://") %} - + {%- else %} - + {%- endif %} {%- endfor %}{%- endif %} {%- if config.extra.fontawesome %} - + {%- endif %} {%- if config.build_search_index %} {%- if config.extra.js_search_index %} - + {%- endif %} {%- if config.extra.js_search %} - + {%- endif %} {%- endif %} {%- if config.generate_feed %} - + {%- endif %} {%- endmacro %} @@ -34,19 +34,19 @@ {%- macro favicons() %} {%- if config.extra.favicon_theme_color %} - + {%- endif %} {%- if config.extra.favicon_ms_color %} - + {%- endif %} {%- if config.extra.favicon_webmanifest %} - + {%- endif %} {%- if config.extra.favicon_mask and config.extra.favicon_mask_color %} - + {%- endif %} {%- if config.extra.favicon180 %} @@ -69,11 +69,11 @@ {#- is_404: using for the 404.html template -#} {%- macro seo( title="",title_addition="",description="",type="website",is_home=false,is_404=false,is_page=false,page_images="",page_section="",created_time="2021-07-04T07:07:00-07:00", updated_time="2021-07-04T07:07:00-07:00" ) %} {%- if is_404 -%} - + {%- else -%} - - - + + + {%- endif -%} {%- if current_url %} @@ -84,25 +84,25 @@ {{ title ~ title_addition }} {%- if config.extra.author %} - + {%- endif %} {%- if config.extra.facebook_publisher %} - + {%- endif %} - + {%- if config.extra.facebook_author %} - + {%- endif %} {%- if page.description %} {%- else %} {%- endif %} - + {%- if page.extra.keywords %} - + {%- else %} - + {%- endif %} {#- Extra SEO START #} @@ -110,87 +110,87 @@ {%- if not is_404 %} {%- if config.extra.google %} - + {%- endif %} {%- if config.extra.bing %} - + {%- endif %} - - + + {%- if page.description %} - - + + {%- else %} - - + + {%- endif %} {%- if page.title %} - - + + {%- else %} - - + + {%- endif %} {#- SEO MEDIA START #} {%- if page.extra.thumbnail %} - - - + + + {%- elif page.extra.static_thumbnail %} - + {%- if page.extra.static_thumbnail is matching("^http[s]?://") %} - - + + {%- else %} - - + + {%- endif %} {%- elif config.extra.banner %} - - - + + + {%- else %} - + {%- endif %} {%- if config.extra.open.audio %} - + {%- endif %} {%- if config.extra.open.locale %} - + {%- endif %} {%- if config.extra.open.videos %} {%- for video in config.extra.open.videos %} - + {%- endfor %} {%- endif %} {#- SEO MEDIA END #} - - - + + + {%- if page.updated %} - + {%- elif page.date %} - + {%- else %} - + {%- endif %} {%- if config.extra.social.twitter %} - - + + {%- endif %} @@ -202,10 +202,10 @@ {%- macro security() %} {%- if config.extra.security_header_referrer %} - + {%- endif %} {%- if config.extra.security_header_csp %} - + {%- endif %} {%- endmacro %} @@ -214,7 +214,7 @@ {# https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #} {%- macro math() %} {%- if config.extra.math or page.extra.math %} - + {%- if config.extra.math_auto_render or page.extra.math_auto_render %} diff --git a/templates/macros/social.html b/templates/macros/social.html index d34fb29..c1b0726 100644 --- a/templates/macros/social.html +++ b/templates/macros/social.html @@ -1,47 +1,45 @@ {%- macro social_links(social_config) %} {%- set base_url = get_url(path="", lang=lang) %} - - {%- if config.generate_feed %}{%- if config.extra.social.feed %} - {% endif %}{% 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.researchgate %} - {% 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 %} - {%- if social_config.buymeacoffee %} - {% endif %} - {%- if social_config.github_sponsor %} - {% endif %} - + {%- if config.generate_feed %}{%- if config.extra.social.feed %} + {% endif %}{% 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.researchgate %} + {% 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 %} + {%- if social_config.buymeacoffee %} + {% endif %} + {%- if social_config.github_sponsor %} + {% endif %} {%- endmacro %} diff --git a/templates/shortcodes/audio.html b/templates/shortcodes/audio.html index 3f9368e..2dbce68 100644 --- a/templates/shortcodes/audio.html +++ b/templates/shortcodes/audio.html @@ -1,7 +1,7 @@ diff --git a/templates/shortcodes/gif.html b/templates/shortcodes/gif.html index 3ae56fd..a49a879 100644 --- a/templates/shortcodes/gif.html +++ b/templates/shortcodes/gif.html @@ -1,7 +1,7 @@ diff --git a/templates/shortcodes/image.html b/templates/shortcodes/image.html index 3653c8a..8452ce9 100644 --- a/templates/shortcodes/image.html +++ b/templates/shortcodes/image.html @@ -1,7 +1,7 @@ {% for source in sources -%} {% set type = source | split(pat=".") | last -%} - + {% endfor -%} - {{ falt | default(value='Image') }} + {{ falt | default(value='Image') }} diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html index 46fb39d..4645569 100644 --- a/templates/shortcodes/img.html +++ b/templates/shortcodes/img.html @@ -1,5 +1,3 @@ -{# {{ img(src="ferris.svg" class="" alt="" w=600 h=400) }} #} - {%- set dirtest = src | trim_start_matches(pat="./") %} {%- if dirtest is containing("/") %} {%- set reldir = true %} @@ -20,4 +18,4 @@ {%- set img = src | split(pat="/") | last %} {%- set name = img | split(pat=".") | first %} - + diff --git a/templates/shortcodes/imghover.html b/templates/shortcodes/imghover.html index 4bda6da..b1af3f9 100644 --- a/templates/shortcodes/imghover.html +++ b/templates/shortcodes/imghover.html @@ -29,7 +29,7 @@ {%- set_global bg = source | split(pat="/") | last %} {%- else %}

{{ sourcename }} on hover
-
+
{%- endif %} {%- endfor %} diff --git a/templates/shortcodes/video.html b/templates/shortcodes/video.html index a1a2f31..c6bd867 100644 --- a/templates/shortcodes/video.html +++ b/templates/shortcodes/video.html @@ -1,7 +1,7 @@ diff --git a/templates/shortcodes/vm.html b/templates/shortcodes/vm.html index 9b593e8..f222682 100644 --- a/templates/shortcodes/vm.html +++ b/templates/shortcodes/vm.html @@ -1,3 +1,3 @@ -
- + +
diff --git a/templates/shortcodes/yt.html b/templates/shortcodes/yt.html index d865602..748f6ae 100644 --- a/templates/shortcodes/yt.html +++ b/templates/shortcodes/yt.html @@ -1,3 +1,3 @@ - - + + diff --git a/templates/tags/list.html b/templates/tags/list.html index 3559ada..53f492f 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -17,10 +17,10 @@ {%- block content %}
-
+

{{ terms | length }} Tags

{% for term in terms %} #{{ term.name }} {% endfor %}

-
+
{%- for term in terms %}

#{{ term.name }}

{%- for page in term.pages %} -- cgit v1.3.1