aboutsummaryrefslogtreecommitdiff
path: root/templates/macros/head.html
diff options
context:
space:
mode:
authorJieiku2022-05-31 00:48:53 -0700
committerJieiku2022-05-31 00:48:53 -0700
commitf7046e6094d50a9e22ce2746b3cbb5cf7e8825e6 (patch)
tree686de16190d29a8874f345d0f894cc94005c3599 /templates/macros/head.html
parent7fbb144cf8cbe007a108a6b9271bfa86fe20aee2 (diff)
downloadabridge-f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6.tar.gz
abridge-f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6.tar.bz2
abridge-f7046e6094d50a9e22ce2746b3cbb5cf7e8825e6.zip
Paginator Macro, Fonts, Search, Whitespace Cleanup
Diffstat (limited to 'templates/macros/head.html')
-rw-r--r--templates/macros/head.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 6216830..0107b83 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -6,9 +6,9 @@
{%- macro resource() %}
{%- if config.extra.fonts_load and config.extra.fonts %}{%- for i in config.extra.fonts %}
{%- if i.url is matching("^http[s]?://") %}
- <link rel="preload" as="style" href="{{ i.url | safe }}">
+ <link rel="preload" href="{{ i.url | safe }}" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin="anonymous">
{%- else %}
- <link rel="preload" as="font" href="{{ get_url(path=i.url, trailing_slash=false, cachebust=true) }}">
+ <link rel="preload" href="{{ get_url(path=i.url, trailing_slash=false) }}" as="style" onload="this.onload=null;this.rel='stylesheet'" crossorigin="anonymous">
{%- endif %}
{%- endfor %}{%- endif %}
@@ -17,8 +17,12 @@
{%- endif %}
{%- if config.build_search_index %}
+ {%- if config.extra.js_search_index %}
<script defer type="text/javascript" src="{{ get_url(path=config.extra.js_search_index, trailing_slash=false, cachebust=true) | safe }}"></script>
+ {%- endif %}
+ {%- if config.extra.js_search %}
<script defer type="text/javascript" src="{{ get_url(path=config.extra.js_search, trailing_slash=false, cachebust=true) | safe }}"></script>
+ {%- endif %}
{%- endif %}
{%- if config.generate_feed %}