mat.services/templates/partials/header.html

52 lines
1.6 KiB
HTML
Raw Normal View History

2022-08-10 20:15:30 +00:00
{% import "macros/macros.html" as post_macros %}
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{# Site title #}
{% set current_path = current_path | default(value="/") %}
{% if current_path == "/" %}
<title>
{{ config.title | default(value="Home") }}
</title>
{% else %}
<title>
{{ page.title | default(value=config.title) | default(value="Post") }}
</title>
{% endif %}
{# Favicon #}
{% if config.extra.favicon %}
{% set favicon_ext = config.extra.favicon | split(pat=".") | last %}
<link rel="icon" type="image/{{ favicon_ext }}" href={{ config.extra.favicon }} />
{% endif %}
{# Font from cdn or disk #}
{% if config.extra.use_cdn | default(value=false) %}
{% for cdn in config.extra.cdns %}
<link href={{ cdn }} rel="stylesheet">
{% endfor %}
{% else %}
2022-08-13 04:45:26 +00:00
<link href="{{ get_url(path='fonts.css') }}" rel="stylesheet" />
2022-08-12 23:00:13 +00:00
{% endif %}
2022-08-10 20:15:30 +00:00
{# RSS #}
2022-08-13 04:45:26 +00:00
<link rel="alternate" type="application/atom+xml" title="{{ config.title }}"
href="{{ get_url(path='atom.xml', trailing_slash=false) }}">
2022-08-10 20:15:30 +00:00
{# Theme #}
2022-08-13 04:45:26 +00:00
<link rel="stylesheet" type="text/css" href="{{ get_url(path='theme/light.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ get_url(path='theme/dark.css') }}"
2022-08-10 20:15:30 +00:00
media="(prefers-color-scheme: dark)" />
2022-08-13 04:45:26 +00:00
<link rel="stylesheet" type="text/css" media="screen" href="{{ get_url(path='main.css') }}" />
2022-08-10 20:15:30 +00:00
{% if config.extra.stylesheets %}
{% for stylesheet in config.extra.stylesheets %}
<link rel="stylesheet" href="{{ get_url(path=stylesheet) }}">
{% endfor %}
{% endif %}
</head>