Compare commits

..

2 commits

Author SHA1 Message Date
2e2091a179 feat: Add soungbook example
- Add songbook to demo
- Add macro for song
- Add style module
2025-04-12 16:41:47 +02:00
024540e389 feat: Move macros for general usage 2025-04-12 15:49:46 +02:00
9 changed files with 112 additions and 2 deletions

View file

@ -7,7 +7,7 @@ tags:
{% set bodyClass = "body_portal" %}
{% extends "demo/_default.njk" %}
{% import "demo/macros/_gates.njk" as gate %}
{% import "hippie/macros/_gate.njk" as gate %}
{% block title %}{{ title }}{% endblock %}

View file

@ -0,0 +1,51 @@
---
title: Songbook
tags:
- demoExample
---
{% set pageBase = "../" %}
{% set pageId = page.fileSlug %}
{% extends "demo/_default.njk" %}
{% import "hippie/macros/_placeholder.njk" as ph %}
{% import "hippie/macros/_song.njk" as song %}
{% block title %}{{ title }}{% endblock %}
{% block head %}
{{ super() }}
{% endblock %}
{% block body %}
<!-- {{ page.fileSlug }}.page -->
<div class="sec_main_center">
<header class="header_txt">
<h1>Titel</h1>
<p>Jahr</p>
</header>
<nav role="doc-toc">
<h2>Inhaltsverzeichnis</h2>
<ul>
{%- for song in collections.song -%}
<li>
<a href="{{ song.page.url }}">{{ song.data.title }}</a>
</li>
{%- endfor -%}
</ul>
</nav>
<h2>Vorwort</h2>
<p>Liederbuch für
<em>Name</em>.</p>
<p>Gibt es gebunden und hier
{{ ph.link() }}.<br/>
Bestellungen bitte an
{{ ph.name() }}
richten.</p>
<hr class="hr_double hr_dotted">
{%- for piece in collections.song -%}
{{ song.simple(loop.index0, piece.data, piece.content) }}
{%- endfor -%}
<hr/>
<address>{{ ph.name() }}</address>
</div>
{% endblock %}

View file

@ -0,0 +1,26 @@
---
tags:
- songbook
- song
title: "Interpret - Titel"
releaseDate: JJJJ
description: Text
---
~~~
[verse 1]
strophe 1
[chorus]
refrain
[verse 2]
strophe 2
[chorus]
[bridge]
überleitung
[interlude]
[chorus]
[outro]
~~~

View file

@ -8,7 +8,7 @@ tags:
{% set bodyClass = "body_new" %}
{% extends "demo/_app.njk" %}
{% import "demo/macros/_states.njk" as state %}
{% import "hippie/macros/_state.njk" as state %}
{% block title %}{{ title }}
{% endblock %}

View file

@ -11,5 +11,6 @@
// -----------------------------------------------------------------------------
@import "modules/card/card_module";
@import "modules/portal/portal_module";
@import "modules/songbook/songbook_module";
@import "modules/demo/demo_module";
// @import "modules/YOUR-MODULE/YOUR-FILES";

View file

@ -0,0 +1,20 @@
.songbook_song {
pre {
@extend .pre_code
}
header {
h2 {
margin-bottom: $space_basic;
}
h6 {
color: $color_brightest;
}
h2+h6 {
margin-top: 0;
margin-bottom: $space_small;
}
}
}

View file

@ -0,0 +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>
{% endmacro %}