From 4827695147bea438cf5c42c0ebc325b89f6e731e Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Tue, 14 Jun 2022 13:09:17 -0700
Subject: Code Blocks: Language and Copy Clipboard, Integrity Option
---
templates/macros/head.html | 48 ++++++++++++++++++++++++++------------------
templates/macros/macros.html | 12 +++++------
2 files changed, 34 insertions(+), 26 deletions(-)
(limited to 'templates')
diff --git a/templates/macros/head.html b/templates/macros/head.html
index e0fb499..b942f3e 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -1,7 +1,7 @@
{%- macro theme() %}
{%- if config.extra.js_theme %}
{%- if config.extra.js_themeButton or config.extra.js_bundle %}
-
+
{%- endif %}
{%- endif %}
{%- endmacro %}
@@ -31,9 +31,9 @@
{%- if config.extra.math or page.extra.math %}
{%- if config.extra.katex_css %}{%- if config.extra.katex_css is matching("^http[s]?://") %}
-
+
{%- else %}
-
+
{%- endif %}{%- endif %}
{%- endif %}
@@ -73,11 +73,11 @@
{%- if config.build_search_index and config.extra.js_bundle %}
{%- if config.extra.js_search_index %}
-
+
{%- endif %}
{%- if config.extra.js_bundle %}
-
+
{%- endif %}
{%- elif config.build_search_index %}
@@ -86,28 +86,32 @@
{%- if preStyle == true %}
{%- if config.extra.js_prestyle %}
-
+
{%- endif %}
{%- endif %}
+ {%- if config.extra.js_codecopy %}
+
+ {%- endif %}
+
{%- if config.extra.js_theme %}
{%- if config.extra.js_themeButton %}
-
+
{%- endif %}
{%- endif %}
{%- if config.extra.js_search_index %}
-
+
{%- endif %}
{%- if config.extra.js_search %}{%- for i in config.extra.js_search %}
-
+
{%- endfor %}{%- endif %}
{%- elif config.extra.js_bundle %}
{#- no search #}
-
+
{%- else %}
@@ -115,13 +119,17 @@
{%- if preStyle == true %}
{%- if config.extra.js_prestyle %}
-
+
{%- endif %}
{%- endif %}
+ {%- if config.extra.js_codecopy %}
+
+ {%- endif %}
+
{%- if config.extra.js_theme %}
{%- if config.extra.js_themeButton or config.extra.js_bundle %}
-
+
{%- endif %}
{%- endif %}
@@ -135,30 +143,30 @@
{%- if config.extra.math or page.extra.math %}
{%- if config.extra.katex_bundle %}
-
+
{%- else %}
{%- if config.extra.katex_js %}{%- if config.extra.katex_js is matching("^http[s]?://") %}
-
+
{%- else %}
-
+
{%- endif %}{%- endif %}
{%- if config.extra.mathtex_js %}{%- if config.extra.mathtex_js is matching("^http[s]?://") %}
-
+
{%- else %}
-
+
{%- endif %}{%- endif %}
{%- if config.extra.math_auto_render or page.extra.math_auto_render %}
{%- if config.extra.katex_autorender_js %}
{%- if config.extra.katex_autorender_js is matching("^http[s]?://") %}
-
+
{%- else %}
-
+
{%- endif %}
{%- endif %}
-
+
{%- endif %}
{%- endif %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index 6d86916..072a9d9 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -19,7 +19,7 @@
{#- divider #}
{%- if config.extra.meta_post.author %}
{%- if config.extra.meta_post.readtime or config.extra.meta_post.date or config.extra.meta_post.categories_tags %}
- {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}
+ {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}
{%- endif %}
{%- endif %}
@@ -27,13 +27,13 @@
{%- if config.extra.meta_post.readtime %} {%- if config.extra.icon_read %} {% endif %} {{ page.reading_time }} {{ config.extra.meta_post.readstring | default(value="min") }}
{#- divider #}
{%- if config.extra.meta_post.date or config.extra.meta_post.categories_tags %}
- {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}{%- endif %}{%- endif %}
+ {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}{%- endif %}{%- endif %}
{#- Date #}
{%- if config.extra.meta_post.date %} {%- if config.extra.icon_date %} {% endif %} {{ page.date | date(format="%B %d, %Y") }}
{#- divider #}
{%- if config.extra.meta_post.categories_tags %}
- {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}{%- endif %}{% endif %}
+ {%- if config.extra.meta_post.divider %}{{ config.extra.meta_post.divider | safe }}{%- else %} {%- endif %}{%- endif %}{% endif %}
{#- Categories #}
{%- if page.taxonomies.categories %} {%- if config.extra.icon_info %} {% endif %} [{% for cat in page.taxonomies.categories %}{{ cat }}{% endfor %}]{% endif %}
@@ -64,7 +64,7 @@
{#- divider #}
{%- if config.extra.meta_index.author %}
{%- if config.extra.meta_index.readtime or config.extra.meta_index.date or config.extra.meta_index.categories_tags %}
- {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}
+ {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}
{%- endif %}
{%- endif %}
@@ -72,13 +72,13 @@
{%- if config.extra.meta_index.readtime %} {%- if config.extra.icon_read %} {% endif %} {{ page.reading_time }} {{ config.extra.meta_index.readstring | default(value="min") }}
{#- divider #}
{%- if config.extra.meta_index.date or config.extra.meta_index.categories_tags %}
- {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}{%- endif %}{%- endif %}
+ {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}{%- endif %}{%- endif %}
{#- Date #}
{%- if config.extra.meta_index.date %} {%- if config.extra.icon_date %} {% endif %} {{ page.date | date(format="%B %d, %Y") }}
{#- divider #}
{%- if config.extra.meta_index.categories_tags %}
- {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}{%- endif %}{% endif %}
+ {%- if config.extra.meta_index.divider %}{{ config.extra.meta_index.divider | safe }}{%- else %} {%- endif %}{%- endif %}{% endif %}
{#- Categories #}
{%- if page.taxonomies.categories %} {%- if config.extra.icon_info %} {% endif %} [{% for cat in page.taxonomies.categories %}{{ cat }}{% endfor %}]{% endif %}
--
cgit v1.3.1