mirror of
https://github.com/house-of-vanity/house-of-vanity.github.io.git
synced 2025-07-07 16:54:06 +00:00
Zola init
This commit is contained in:
19
templates/partials/footer.html
Normal file
19
templates/partials/footer.html
Normal file
@ -0,0 +1,19 @@
|
||||
<footer>
|
||||
<div style="display:flex">
|
||||
{% for social in config.extra.social %}
|
||||
<a class="soc" href={{ social.url }} title={{ social.name }}>
|
||||
<i data-feather={{ social.icon }}></i>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="footer-info">
|
||||
{{ now() | date(format="%Y") }} © {{ config.extra.copyright }} |Powered by <a href="https://github.com/getzola/zola">Zola</a> and <a
|
||||
href="https://github.com/XXXMrG/archie-zola">Archie-Zola Theme</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% if config.extra.social %}
|
||||
<script>
|
||||
feather.replace();
|
||||
</script>
|
||||
{% endif %}
|
24
templates/partials/head.html
Normal file
24
templates/partials/head.html
Normal file
@ -0,0 +1,24 @@
|
||||
<header>
|
||||
<div class="main" id="main_title">
|
||||
<a href={{ config.base_url }}>{{ config.title }}</a>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
{% for menu in config.extra.translations[lang][0].menus %}
|
||||
<a href={{ menu.url }}>{{ menu.name }}</a>
|
||||
{% endfor %}
|
||||
|
||||
{% if config.extra.translations.languages %}
|
||||
|
|
||||
|
||||
{% for language in config.extra.translations.languages %}
|
||||
<a href={{ language.url }}>{{ language.name }}</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.mode == "toggle" %}
|
||||
| <a id="dark-mode-toggle" onclick="toggleTheme()" href=""></a>
|
||||
<script src={{ get_url(path="js/themetoggle.js") }}></script>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</header>
|
117
templates/partials/header.html
Normal file
117
templates/partials/header.html
Normal file
@ -0,0 +1,117 @@
|
||||
{% 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">
|
||||
{% if page.extra.meta %}
|
||||
<!-- the meta data config goes here -->
|
||||
{% for data in page.extra.meta %}
|
||||
<meta
|
||||
{% for key, value in data%}
|
||||
{% if key == "property" and value == "og:title"%}
|
||||
{% set_global page_has_og_title = true -%}
|
||||
{% endif %}
|
||||
{% if key == "property" and value == "og:description"%}
|
||||
{% set_global page_has_og_description = true -%}
|
||||
{% endif %}
|
||||
{% if key == "name" and value == "description"%}
|
||||
{% set_global page_has_description = true -%}
|
||||
{% endif %}
|
||||
{{ key }}="{{ value }}"
|
||||
{% endfor %}
|
||||
/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if current_path == "/" %}
|
||||
<title>
|
||||
{{ config.title | default(value="Home") }}
|
||||
</title>
|
||||
{% if not page_has_og_title %}
|
||||
<meta property="og:title" content="{{ config.title | default(value="Home") }}" />
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<title>
|
||||
{% if page.title %} {{ page.title }}
|
||||
{% elif config.title %} {{ config.title }}
|
||||
{% else %} Post {% endif %}
|
||||
</title>
|
||||
|
||||
{% if not page_has_og_title %}
|
||||
<meta property="og:title" content="{% if page.title -%}{{ page.title }}{% elif config.title -%}{{ config.title }}{% else -%}Post{% endif -%}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not page_has_og_description %}
|
||||
{% if page.description %}
|
||||
<meta property="og:description" content="{{ page.description }}" />
|
||||
{% elif config.description %}
|
||||
<meta property="og:description" content="{{ config.description }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if not page_has_description %}
|
||||
{% if page.description %}
|
||||
<meta name="description" content="{{ page.description }}" />
|
||||
{% elif config.description %}
|
||||
<meta name="description" content="{{ config.description }}" />
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.favicon %}
|
||||
<link rel="icon" type="image/png" href={{ config.extra.favicon }} />
|
||||
{% endif %}
|
||||
|
||||
{# opengraph, twitter_cards #}
|
||||
|
||||
{% if config.extra.ga %}
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{config.extra.ga}}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{config.extra.ga}}');
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{# if need icon, load feather.js #}
|
||||
{% if config.extra.social and config.extra.useCDN | default(value=false) %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
||||
{% elif config.extra.social or config.extra.mode == "toggle" %}
|
||||
<script src={{ get_url(path="js/feather.min.js") }}></script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if config.extra.useCDN | default(value=false) %}
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
|
||||
{% else %}
|
||||
<link href={{ get_url(path="css/fonts.css") }} rel="stylesheet" />
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href={{ get_url(path="css/main.css") }} />
|
||||
|
||||
{% if config.extra.mode == "auto" or config.extra.mode == "dark" or config.extra.mode == "toggle" %}
|
||||
<link
|
||||
rel="stylesheet"
|
||||
id="darkModeStyle"
|
||||
type="text/css"
|
||||
href={{ get_url(path="css/dark.css") }}
|
||||
{% if config.extra.mode == "auto" %}
|
||||
media="(prefers-color-scheme: dark)"
|
||||
{% endif %}
|
||||
{% if config.extra.mode == "toggle" %}
|
||||
disabled
|
||||
{% endif %}
|
||||
/>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{# TODO: custom css and js. #}
|
||||
|
||||
|
||||
</head>
|
Reference in New Issue
Block a user