style: Reindent and reformat

This commit is contained in:
sthag 2025-06-19 12:02:32 +02:00
parent 07f51e80a2
commit c98ebb44ca
6 changed files with 101 additions and 99 deletions

View file

@ -1,31 +1,30 @@
<!-- gates.macro -->
{% macro list(name, url, image, links) %}
<article class="portal__entry">
<section>
<h2>
<a class="a_discreet" href="{{ url }}">{{ name }}</a>
</h2>
<a class="portal__link portal__link--{{ name | slug }}" href="{{ url }}">
<img src="{{ image.src }}" alt="{{ image.alt }}"/>
</a>
{% if links %}
<ul class="portal__list">
{% for link in links %}
<li>
<a href="{{ link.href }}"><img src="{{ link.img }}" width="16" height="16"/>{{ link.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</section>
</article>
<article class="portal__entry">
<section>
<h2>
<a class="a_discreet" href="{{ url }}">{{ name }}</a>
</h2>
<a class="portal__link portal__link--{{ name | slug }}" href="{{ url }}">
<img src="{{ image.src }}" alt="{{ image.alt }}"/>
</a>
{% if links %}
<ul class="portal__list">
{% for link in links %}
<li>
<a href="{{ link.href }}"><img src="{{ link.img }}" width="16" height="16"/>{{ link.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</section>
</article>
{% endmacro %}
{% macro simple(name, url) %}
<article class="portal__entry">
<section>
<h2>
<a class="a_discreet" href="{{ url }}">{{ name }}</a>
</h2>
</section>
</article>
<article class="portal__entry">
<section>
<h2>
<a class="a_discreet" href="{{ url }}">{{ name }}</a>
</h2>
</section>
</article>
{% endmacro %}

View file

@ -1,24 +1,24 @@
{% macro start() %}
<script>
logAdd('EVENT :: Document \'%s\' event fired.', 'DOMContentLoaded');
logPerf('HEAD start :: Debugging performance...', debugOn);
</script>
<script>
logAdd('EVENT :: Document \'%s\' event fired.', 'DOMContentLoaded');
logPerf('HEAD start :: Debugging performance...', debugOn);
</script>
{% endmacro %}
{% macro log(msg, arg = '') %}
<script>
logPerf('{{ msg }}', {{ arg }});
</script>
<script>
logPerf('{{ msg }}', {{ arg }});
</script>
{% endmacro %}
{% macro debug(state = false, display = false, assets = false) %}
{# {{ set hippie.debugMode = state }} #}
<script>
debugOn = {{ state }};
debugOnScreen = {{ display }};
assetsLoaded = {{ assets }};
</script>
{# {{ set hippie.debugMode = state }} #}
<script>
debugOn = {{ state }};
debugOnScreen = {{ display }};
assetsLoaded = {{ assets }};
</script>
{% endmacro %}
{% macro asset(state = false) %}
<script>
assetsLoaded = {{ state }};
</script>
<script>
assetsLoaded = {{ state }};
</script>
{% endmacro %}

View file

@ -1,13 +1,13 @@
{% macro main(data, active = '') %}
<nav>
<ul>
{% for link in data %}
<li{%if active == link.text %} class="active_txt" {% endif %}>
{%if active == link.text %}{{ link.text }}{%else%}
<a href="{{ link.href }}">{{ link.text }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
<nav>
<ul>
{% for link in data %}
<li{%if active == link.text %} class="active_txt" {% endif %}>
{%if active == link.text %}{{ link.text }}{%else%}
<a href="{{ link.href }}">{{ link.text }}</a>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
{% endmacro %}

View file

@ -1,43 +1,47 @@
{% macro email(class='', text='name@domain.tld') %}
<a class="{{ class }}" href="">{{ text }}</a>
{# {{ 'name@domain.tld' | urlize | safe }} #}
{% macro email(class = '', text = 'name@domain.tld') %}
<a class="{{ class }}" href="">{{ text }}</a>
{# {{ 'name@domain.tld' | urlize | safe }} #}
{% endmacro %}
{% macro link(class='', text='domain.tld', href='http://domain.internal') %}
<a class="{{ class }}" href="{{ href }}">{{ text }}</a>
{% macro link(class = '', text = 'domain.tld', href = 'http://domain.internal') %}
<a class="{{ class }}" href="{{ href }}">{{ text }}</a>
{% endmacro %}
{% macro name(class='', text='Vorname Nachname') %}
<span class="{{ class }}">{{ text }}</span>
{% macro name(class = '', text = 'Vorname Nachname') %}
<span class="{{ class }}">{{ text }}</span>
{% endmacro %}
{% macro address(class='', text='Straße Nr., PLZ Ort') %}
<span class="{{ class }}">{{ text }}</span>
{% macro address(class = '', text = 'Straße Nr., PLZ Ort') %}
<span class="{{ class }}">{{ text }}</span>
{% endmacro %}
{% macro brand(class='', name='Marke') %}
<div class="{{ class }}">
{# <img src="" alt="Brand logo"> #}
<svg
{% macro brand(class = '', name = 'Marke') %}
<div class="{{ class }}">
{# <img src="" alt="Brand logo"> #}
<svg
width="128"
height="128"
viewBox="0 0 128 128"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<g>
<rect
<g>
<rect
style="display:inline;fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-dasharray:none"
width="126"
height="126"
x="1"
y="1" />
<circle
y="1"/>
<circle
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
cx="64"
cy="64"
r="63" />
<path
r="63"/>
<path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:bevel;stroke-dasharray:none"
d="m 9.3926879,32.472455 109.2146221,-2e-6 -54.607309,94.582637 z" />
</g>
</svg>
<h1>{{ name }}</h1>
</div>
d="m 9.3926879,32.472455 109.2146221,-2e-6 -54.607309,94.582637 z"/>
</g>
</svg>
<h1>{{ name }}</h1>
</div>
{% endmacro %}

View file

@ -1,12 +1,12 @@
{% macro simple(index, data, content) %}
<article class="songbook_song">
<header>
<h2>{{ data.title }}</h2>
<h6>{{ data.releaseDate }}</h6>
<p>{{ data.description }}</p>
</header>
{# <pre class="pre_code"><code>{{ content }}</code></pre> #}
{{ content | safe }}
<footer>{{ index }}</footer>
</article>
<article class="songbook_song">
<header>
<h2>{{ data.title }}</h2>
<h6>{{ data.releaseDate }}</h6>
<p>{{ data.description }}</p>
</header>
{# <pre class="pre_code"><code>{{ content }}</code></pre> #}
{{ content | safe }}
<footer>{{ index }}</footer>
</article>
{% endmacro %}

View file

@ -1,15 +1,14 @@
<!-- states.macro -->
{% macro coord(id, text='X: #, Y: ##') %}
<span id="{{ id }}">{{ text }}</span>
{% macro coord(id, text = 'X: #, Y: ##') %}
<span id="{{ id }}">{{ text }}</span>
{% endmacro %}
{% macro time(id, text='00:00:00', postfix=' Uhr') %}
<span id="{{ id }}">{{ text }}</span><span>{{ postfix }}</span>
{% macro time(id, text = '00:00:00', postfix = ' Uhr') %}
<span id="{{ id }}">{{ text }}</span><span>{{ postfix }}</span>
{% endmacro %}
{% macro date() %}
<span id="{{ id }}">
<span id="day">Wochentag</span>,
<span id="dayNumb">##</span>.
<span id="month">Monat</span>
<span id="year">####</span>
</span>
<span id="{{ id }}">
<span id="day">Wochentag</span>,
<span id="dayNumb">##</span>.
<span id="month">Monat</span>
<span id="year">####</span>
</span>
{% endmacro %}