simple-s3-gallery/templates/header.html

123 lines
3.6 KiB
HTML

<!--{#
#~ Var | Required | Default ~#
language | no | en
css_theme_name | no | auto
canonical_url | yes | none
page_title | yes | none
static (dict)
- scripts (dict)
- bootstrap (used in footer.html)
- src | yes | none
- integrity | no | empty
- crossorigin | no | empty if no integrity, anonymous otherwise
- theme
- src | yes | none
- integrity | no | empty
- crossorigin | no | empty if no integrity, anonymous otherwise
- css (dict)
- bootstrap
- src | yes | none
- integrity | no | empty
- crossorigin | no | empty if no integrity, anonymous otherwise
- theme
- src | yes | none
- integrity | no | empty
- crossorigin | no | empty if no integrity, anonymous otherwise
- icons
- src | yes | none
- integrity | no | empty
- crossorigin | no | empty if no integrity, anonymous otherwise
meta_list
n. (list index)
- name | yes | none
- content | yes | none
... (etc)
favicon_list (list of dicts)
n. (list index)
- rel | no | icon
- src | yes | none
- sizes | no | none
- type | no | none
- color | no | none
... (etc)
#}-->
<!doctype html>
<html
lang="{{ language | default('en') }}"
data-bs-theme="{{ css_theme_name | default('auto') }}"
>
<head>
{# Scripts that should be loaded first to avoid flickering (theme, etc) #}
{% if static.scripts | length >= 1 %}
<!-- Scripts -->
{% for _, script in static.scripts | items %}
{# Only load script if it should be in the head #}
{% if script.place_in_head | default(False) %}
<script
src="{{ script.src }}"
{{- 'integrity="' + script.integrity + '"' if script.integrity else omit }}
{{- 'crossorigin="' + script.crossorigin + '"' if script.integrity else omit }}
></script>
{% endif %}
{% endfor %}
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="{{ charset | default('utf-8') }}" />
<link rel="canonical" href="{{ canonical_url }}" />
<title>{{ page_title }}</title>
{% if meta_list %}
<!-- meta-tags -->
{% for meta in meta_list %}
<meta name="{{ meta.name }}" content="{{ meta.content }}" />
{% endfor %}
{% endif %}
{% if favicon_list %}
<!-- Favicons -->
{% for icon in favicon_list %}
<link
rel="{{ icon.rel | default('icon') }}"
href="{{ icon.src }}"
sizes="{{ icon.sizes | default('') }}"
type="{{ icon.type | default('') }}"
color="{{ icon.color | default('') }}"
/>
{% endfor %}
{% endif %}
<!--
#~ These are to be provided by the favicon_list above ~#
<link rel="apple-touch-icon" href="/docs/5.3/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/docs/5.3/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="/docs/5.3/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/docs/5.3/assets/img/favicons/manifest.json">
<link rel="mask-icon" href="/docs/5.3/assets/img/favicons/safari-pinned-tab.svg" color="#712cf9">
<link rel="icon" href="/docs/5.3/assets/img/favicons/favicon.ico">
-->
{% if static.css | length >= 1 +%}
<!-- CSS -->
{% for _, style in static.css | items %}
<link
rel="stylesheet"
href="{{ style.src }}"
{{- 'integrity="' + style.integrity + '"' if style.integrity else omit }}
{{- 'crossorigin="' + style.crossorigin + '"' if style.integrity else omit }}
/>
{% endfor %}
{% endif %}
</head>