Add nav for archive and songbook
All checks were successful
Build / build (push) Successful in 2m10s

This commit is contained in:
2025-10-17 09:28:05 +02:00
parent e4981678fc
commit c56cbef761
3 changed files with 25 additions and 3 deletions

View File

@@ -3,4 +3,6 @@ title = "Archive"
template = "index.html"
page_template = "song.html"
sort_by = "title"
[extra]
archive = true
+++

View File

@@ -32,7 +32,7 @@ main.songs {
grid-template-columns: 1fr;
}
.filters {
.filters, .nav {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
gap: 1em;
@@ -83,8 +83,12 @@ main.songs {
}
&>.button {
display: flex;
align-items: center;
justify-content: center;
gap: .5em;
font-weight: bold;
text-align: center;
text-decoration: none;
cursor: pointer;
user-select: none;
padding: .75em 1em;
@@ -95,6 +99,10 @@ main.songs {
&[data-category="mixtape"] { background-color: #bf616a }
&[data-category="classic"] { background-color: #5e81ac }
}
& svg {
height: 1.2em;
}
}
@media only screen and (max-width: $width-mobile) {
@@ -102,6 +110,7 @@ main.songs {
}
}
.nav { margin-bottom: 0 }
.song-list {
display: grid;

View File

@@ -11,8 +11,19 @@
<body>
{% block content %}
<main class="songs">
{% if section.title %}
{% if section.title and section.extra.archive %}
<h1>{{ section.title }}</h1>
{% else %}
<section class="nav">
<a href="{{ get_url(path="@/archive/_index.md") }}" class="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 10H2V4.00293C2 3.44903 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.43788 22 4.00293V10H21V20.0015C21 20.553 20.5551 21 20.0066 21H3.9934C3.44476 21 3 20.5525 3 20.0015V10ZM19 10H5V19H19V10ZM4 5V8H20V5H4ZM9 12H15V14H9V12Z"></path></svg>
Archive
</a>
<a href="{{ get_url(path="/songbook.pdf") }}" target="_blank" class="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 18.5V5C3 3.34315 4.34315 2 6 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22H6.5C4.567 22 3 20.433 3 18.5ZM19 20V17H6.5C5.67157 17 5 17.6716 5 18.5C5 19.3284 5.67157 20 6.5 20H19ZM5 15.3368C5.45463 15.1208 5.9632 15 6.5 15H19V4H6C5.44772 4 5 4.44772 5 5V15.3368Z"></path></svg>
Songbook
</a>
</section>
{% endif %}
<section class="filters">
<form>