friendenstein/templates/index.html

32 lines
982 B
HTML

{% import "macros/svg.html" as svg %}
{% extends "base.html" %}
{% block content %}
<div class="home-container"><div class="home">
{% if config.extra.home.title %}
<h1>{{ config.extra.home.title }}</h1>
{% else %}
<h1>{{ config.title }}</h1>
{% endif %}
{% if config.extra.home.subtitle %}
<p>{{ config.extra.home.subtitle }}<span id="subtitle-rand"></span></p>
{% elif config.description %}
<p>{{ config.description }}<span id="subtitle-rand"></span></p>
{% endif %}
{% if config.extra.home.social_icons %}
{{ svg::draw_icons(icons=config.extra.home.social_icons) }}
{% endif %}
</div></div>
{% if config.extra.home.subtitle_suffixes %}
<script> //random subtitle logic
const suffixes = [
{% for s in config.extra.home.subtitle_suffixes %}
"{{ s }}",
{% endfor %}
]
var current = suffixes[Math.floor(Math.random() * suffixes.length)];
var span = document.getElementById("subtitle-rand");
span.textContent = current;
</script>
{% endif %}
{% endblock content %}