diff options
| author | Jieiku | 2026-08-20 17:06:58 -0700 |
|---|---|---|
| committer | Jieiku | 2026-08-20 17:06:58 -0700 |
| commit | b4969fde502b81ac5ea045cbf2d24c2db4bba8eb (patch) | |
| tree | 16c4ab415d7296b917b8126eadde0792bfd2d15f /templates/partials | |
| parent | aaa4fae60d0e1b87af917829af1b1b4cceca9e31 (diff) | |
| download | abridge-b4969fde502b81ac5ea045cbf2d24c2db4bba8eb.tar.gz abridge-b4969fde502b81ac5ea045cbf2d24c2db4bba8eb.tar.bz2 abridge-b4969fde502b81ac5ea045cbf2d24c2db4bba8eb.zip | |
Update for Zola 0.23.4
Diffstat (limited to 'templates/partials')
| -rw-r--r-- | templates/partials/head.html | 10 | ||||
| -rw-r--r-- | templates/partials/head_js.html | 32 | ||||
| -rw-r--r-- | templates/partials/social.html | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/templates/partials/head.html b/templates/partials/head.html index e020404..0341d29 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -1,9 +1,9 @@ {#- Theme Switcher Button to toggle between dark/light #} - {%- set integrity = config.extra.integrity | default(value=true) -%} + {%- set integrity = (config.extra.integrity if config.extra.integrity is defined else true) -%} {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set integrity = false %}{% endif %}{% endif %} - {%- if config.extra.js_switcher | default(value=true) %} + {%- if (config.extra.js_switcher if config.extra.js_switcher is defined else true) %} {%- set js_theme="js/theme.min.js" %} {%- if config.extra.js_switcher_default %} {%- if config.extra.js_switcher_default == "light" %}{% set js_theme="js/theme_light.min.js" %}{% endif %} @@ -16,7 +16,7 @@ {#- Style Sheets #} - {%- set stylesheets=config.extra.stylesheets | default(value=[ "abridge.css" ]) -%} + {%- set stylesheets=(config.extra.stylesheets if config.extra.stylesheets is defined else [ "abridge.css" ]) -%} {%- if stylesheets %}{%- for i in stylesheets %} <link rel="stylesheet" href="{{ get_url(path=i , trailing_slash=false, cachebust=true) | safe }}" /> {%- endfor %}{%- endif %} @@ -94,7 +94,7 @@ {#- Style Sheets Preload #} - {%- set integrity = config.extra.integrity | default(value=true) -%} + {%- set integrity = (config.extra.integrity if config.extra.integrity is defined else true) -%} {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set integrity = false %}{% endif %}{% endif %} {%- if config.extra.fonts %}{%- for i in config.extra.fonts %} @@ -111,7 +111,7 @@ {%- if config.extra.math or page?.extra?.math %} - {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%} + {%- set katex_css=(config.extra.katex_css if config.extra.katex_css else "katex.min.css") -%} {%- if katex_css %}{%- if katex_css is matching(pat="^http[s]?://") %} <link rel="preload" as="style" class="preStyle" href="{{ katex_css | safe }}"{%- if integrity and config.extra.katex_css_integrity %} integrity="{{ config.extra.katex_css_integrity | safe }}"{%- endif %} crossorigin="anonymous" /> {%- else %} diff --git a/templates/partials/head_js.html b/templates/partials/head_js.html index af82de8..ae67802 100644 --- a/templates/partials/head_js.html +++ b/templates/partials/head_js.html @@ -1,7 +1,7 @@ {#- JAVASCRIPT -#} - {%- set integrity = config.extra.integrity | default(value=true) -%} + {%- set integrity = (config.extra.integrity if config.extra.integrity is defined else true) -%} {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{%- set integrity = false -%}{%- endif -%}{%- endif -%} - {%- set search_library=config.extra.search_library | default(value="elasticlunr") -%} + {%- set search_library=(config.extra.search_library if config.extra.search_library else "elasticlunr") -%} {%- set preStyle = false -%} @@ -16,7 +16,7 @@ {%- endif -%} {%- if config.extra.math or page?.extra?.math -%} - {%- set katex_css=config.extra.katex_css | default(value="katex.min.css") -%} + {%- set katex_css=(config.extra.katex_css if config.extra.katex_css else "katex.min.css") -%} {%- if katex_css -%} {%- set preStyle = true -%} {%- endif -%} @@ -26,14 +26,14 @@ {%- if config.extra.js_bundle -%} {%- if config.build_search_index -%} - {%- if notserve and config.extra.pwa | default(value=false) %} + {%- if notserve and (config.extra.pwa or false) %} <script defer src="{{ get_url(path='js/abridge.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/abridge.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- else %} <script defer src="{{ get_url(path='js/abridge_nopwa.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/abridge_nopwa.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif -%} {%- else %} - {%- if notserve and config.extra.pwa | default(value=false) %} + {%- if notserve and (config.extra.pwa or false) %} <script defer src="{{ get_url(path='js/abridge_nosearch.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/abridge_nosearch.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- else %} <script defer src="{{ get_url(path='js/abridge_nosearch_nopwa.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/abridge_nosearch_nopwa.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> @@ -52,24 +52,24 @@ {%- else %}{#- Not js_bundle #} {%- if preStyle == true %} - {%- if config.extra.js_prestyle | default(value=true) %} + {%- if (config.extra.js_prestyle if config.extra.js_prestyle is defined else true) %} <script defer src="{{ get_url(path='js/prestyle.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/prestyle.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} {%- endif %} - {%- if config.extra.js_switcher | default(value=true) %} + {%- if (config.extra.js_switcher if config.extra.js_switcher is defined else true) %} <script defer src="{{ get_url(path='js/theme_button.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/theme_button.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} - {%- if config.extra.js_email_encode | default(value=true) %} + {%- if (config.extra.js_email_encode if config.extra.js_email_encode is defined else true) %} <script defer src="{{ get_url(path='js/email.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/email.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} - {%- if config.extra.js_copycode | default(value=true) %} + {%- if (config.extra.js_copycode if config.extra.js_copycode is defined else true) %} <script defer src="{{ get_url(path='js/codecopy.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/codecopy.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} - {%- if notserve and config.extra.pwa | default(value=false) %} + {%- if notserve and (config.extra.pwa or false) %} <script defer src="{{ get_url(path='js/sw_load.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/sw_load.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} @@ -84,7 +84,7 @@ {%- endif %} {%- endif %} - {%- set uglyurls = config.extra.uglyurls | default(value=false) -%} + {%- set uglyurls = (config.extra.uglyurls or false) -%} {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %} {%- if search_index_format == "elasticlunr_javascript" %}{#- Javascript index format #} <script defer src="{{ get_url(path='js/elasticlunr.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/elasticlunr.min.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script> @@ -119,19 +119,19 @@ {#- https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type/ #} {%- if config.extra.math or page?.extra?.math %} -{%- set katex_bundle=config.extra.katex_bundle | default(value="js/katexbundle.min.js") -%} +{%- set katex_bundle=(config.extra.katex_bundle if config.extra.katex_bundle else "js/katexbundle.min.js") -%} {%- if katex_bundle %} <script defer src="{{ get_url(path=katex_bundle , trailing_slash=false, cachebust=true) }}"{%- if integrity %} integrity="sha384-{{ get_hash(path=katex_bundle, sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- else %} - {%- set katex_js=config.extra.katex_js | default(value="js/katex.min.js") -%} + {%- set katex_js=(config.extra.katex_js if config.extra.katex_js else "js/katex.min.js") -%} {%- if katex_js %}{%- if katex_js is matching(pat="^http[s]?://") %} <script defer src="{{ katex_js | safe }}"{%- if integrity and config.extra.katex_js_integrity %} integrity="{{ config.extra.katex_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script> {%- else %} <script defer src="{{ get_url(path=katex_js , trailing_slash=false, cachebust=true) }}"{%- if integrity %} integrity="sha384-{{ get_hash(path=katex_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %}{%- endif %} - {%- set mathtex_js=config.extra.mathtex_js | default(value="js/mathtex-script-type.min.js") -%} + {%- set mathtex_js=(config.extra.mathtex_js if config.extra.mathtex_js else "js/mathtex-script-type.min.js") -%} {%- if mathtex_js %}{%- if mathtex_js is matching(pat="^http[s]?://") %} <script defer src="{{ mathtex_js | safe }}"{%- if integrity and config.extra.mathtex_js_integrity %} integrity="{{ config.extra.mathtex_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script> {%- else %} @@ -139,7 +139,7 @@ {%- endif %}{%- endif %} {%- if config.extra.math_auto_render or page?.extra?.math_auto_render %} - {%- set katex_autorender_js=config.extra.katex_autorender_js | default(value="js/katex-auto-render.min.js") -%} + {%- set katex_autorender_js=(config.extra.katex_autorender_js if config.extra.katex_autorender_js else "js/katex-auto-render.min.js") -%} {%- if katex_autorender_js %} {%- if katex_autorender_js is matching(pat="^http[s]?://") %} <script defer src="{{ katex_autorender_js | safe }}"{%- if integrity and config.extra.katex_autorender_js_integrity %} integrity="{{ config.extra.katex_autorender_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script> @@ -147,7 +147,7 @@ <script defer src="{{ get_url(path=katex_autorender_js , trailing_slash=false, cachebust=true) }}"{%- if integrity %} integrity="sha384-{{ get_hash(path=katex_autorender_js, sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} {%- endif %} - {%- set katex_options=config.extra.katex_options | default(value="js/katexoptions.js") -%} + {%- set katex_options=(config.extra.katex_options if config.extra.katex_options else "js/katexoptions.js") -%} {%- if katex_options %} <script defer src="{{ get_url(path=katex_options , trailing_slash=false, cachebust=true) }}"{%- if integrity %} integrity="sha384-{{ get_hash(path=katex_options, sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- endif %} diff --git a/templates/partials/social.html b/templates/partials/social.html index a44142a..d830f30 100644 --- a/templates/partials/social.html +++ b/templates/partials/social.html @@ -12,7 +12,7 @@ {%- endif -%} {%- if config.extra.mail -%} - {%- if config.extra.mail_encode | default(value=true) -%} + {%- if (config.extra.mail_encode if config.extra.mail_encode is defined else true) -%} {%- set base64_email = config.extra.mail -%} <a class="js m-protected" href="#{{ base64_email | base64_encode }}" target="_blank" title="Mail"><i type="Button" class="svg mail" title="Mail"></i></a> {%- else -%} |
