feat: Add soungbook example
- Add songbook to demo - Add macro for song - Add style module
This commit is contained in:
parent
024540e389
commit
2e2091a179
5 changed files with 110 additions and 0 deletions
51
source/screens/demo/examples/songbook.njk
Executable file
51
source/screens/demo/examples/songbook.njk
Executable 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 %}
|
||||||
26
source/screens/demo/examples/songbook/0_artist-title.md
Executable file
26
source/screens/demo/examples/songbook/0_artist-title.md
Executable 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]
|
||||||
|
~~~
|
||||||
|
|
@ -11,5 +11,6 @@
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@import "modules/card/card_module";
|
@import "modules/card/card_module";
|
||||||
@import "modules/portal/portal_module";
|
@import "modules/portal/portal_module";
|
||||||
|
@import "modules/songbook/songbook_module";
|
||||||
@import "modules/demo/demo_module";
|
@import "modules/demo/demo_module";
|
||||||
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
// @import "modules/YOUR-MODULE/YOUR-FILES";
|
||||||
|
|
|
||||||
20
source/style/modules/songbook/_songbook_module.scss
Executable file
20
source/style/modules/songbook/_songbook_module.scss
Executable 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
12
source/templates/hippie/macros/_song.njk
Normal file
12
source/templates/hippie/macros/_song.njk
Normal 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 %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue