Compare commits
1 Commits
fdc5b3e911
...
zola
Author | SHA1 | Date | |
---|---|---|---|
85e2147029 |
@ -1,5 +1,5 @@
|
||||
{title: Cháluj}
|
||||
{artist: Morčata na útěku}
|
||||
{artist: Morřata na útěku}
|
||||
{capo: 3}
|
||||
|
||||
{c: Capo 3/5}
|
||||
|
@ -2,5 +2,5 @@
|
||||
title = "Cháluj"
|
||||
[taxonomies]
|
||||
category = ["mixtape"]
|
||||
artist = ["Morčata na útěku"]
|
||||
artist = ["Morřata na útěku"]
|
||||
+++
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Jdem zpátky do lesů}
|
||||
{artist: Žalman}
|
||||
|
||||
[Am7]Sedím na kolejích, [D]které nikam neve[G]dou, [C][G]
|
||||
[Am7]koukám na kopretinu, jak [D]miluje se s lebe[G]dou, [C][G]
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Karolína}
|
||||
{artist: Kamelot}
|
||||
|
||||
{define: Hm base-fret 1 frets 2 2 4 4 3 2 fingers 1 1 3 4 2 1}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Kundička růžová}
|
||||
{artist: Standa}
|
||||
|
||||
{capo: 3}
|
||||
{c: Capo: 3}
|
||||
|
@ -1,9 +1,8 @@
|
||||
{title: Prasnice}
|
||||
{artist: Standa}
|
||||
{columns: 2}
|
||||
|
||||
{c: Originál Capo II (A, Bm, D, A, E)}
|
||||
|
||||
{columns: 2}
|
||||
|
||||
{sov}
|
||||
[G]Ve tři ráno mi nesvědčí, [Am]že mám voči prasečí.
|
||||
Co s [C]tím? Radši zapla[G]tím. [D]
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Prázdný nádraží}
|
||||
{artist: Ozvěna}
|
||||
|
||||
{soc}
|
||||
Jen prázdný [C]nádraží na tebe dejchá samotou
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Ráno bylo stejný}
|
||||
{artist: Žalman}
|
||||
|
||||
{define: Hm base-fret 1 frets 2 2 4 4 3 2 fingers 1 1 3 4 2 1}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Sundej z hodin závaží}
|
||||
{artist: Fešáci}
|
||||
|
||||
{sov}
|
||||
[D]Brouzdej trávou za tratí v dlouhých letních hodi[G]nách,
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Toulavej}
|
||||
{artist: Vojta Kiďák Tomáško}
|
||||
|
||||
{sov}
|
||||
Někdo [Am]z vás, kdo chutnal [G]dálku jeden z [Am]těch, co rozu[E7]měj,
|
||||
|
@ -1,10 +1,9 @@
|
||||
{title: Už to nenapravím}
|
||||
{artist: Samson}
|
||||
{columns: 2}
|
||||
{capo: 2}
|
||||
|
||||
{c: Capo 2}
|
||||
|
||||
{columns: 2}
|
||||
|
||||
{soc}
|
||||
[Am]Vapadapadapadap[D]ap [F] [E] pa[Am]dadada [E]
|
||||
[Am]Vapadapadapadap[D]ap [F] [E] pa[Am]dadada [E]
|
||||
|
@ -1,5 +1,4 @@
|
||||
{title: Zahrada ticha}
|
||||
{artist: Jakub Smolík}
|
||||
|
||||
Je tam brána zdobe[D]ná, cestu oteví[Em]rá. Zahradu zele[C]nou [G] všechno připomí[D]ná.
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap');
|
@ -1,78 +0,0 @@
|
||||
@import "fonts";
|
||||
|
||||
$col-white: #fff;
|
||||
$col-black: #2e3440;
|
||||
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: $col-black;
|
||||
color: $col-white;
|
||||
font-family: "Noto Sans", Tahoma, Geneva, Verdana, sans-serif;
|
||||
text-rendering: geometricPrecision;
|
||||
}
|
||||
|
||||
table {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.song {
|
||||
padding: 1em 0 0 1em;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.chords {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.chorus, .verse, .tab {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.chorus {
|
||||
position: relative;
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -1em;
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 2px;
|
||||
background-color: $col-white;
|
||||
}
|
||||
}
|
||||
|
||||
.tab {
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.comment {
|
||||
display: inline-block;
|
||||
padding: .25em .5em;
|
||||
background-color: #4c566a;
|
||||
color: $col-white;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
body {
|
||||
background-color: $col-white;
|
||||
color: $col-black;
|
||||
}
|
||||
|
||||
.chorus:before {
|
||||
background-color: $col-black;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background-color: #d8dee9;
|
||||
color: $col-black;
|
||||
}
|
||||
}
|
184
sass/style.scss
184
sass/style.scss
@ -1,186 +1,10 @@
|
||||
@import "fonts";
|
||||
|
||||
$width-mobile: 900px;
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #2e3440;
|
||||
color: #fff;
|
||||
font-family: "Noto Sans", Tahoma, Geneva, Verdana, sans-serif;
|
||||
text-rendering: geometricPrecision;
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
background-color: #fff;
|
||||
color: #2e3440;
|
||||
}
|
||||
}
|
||||
|
||||
main.songs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1em;
|
||||
max-width: 50em;
|
||||
margin: 0 auto;
|
||||
padding: 1em;
|
||||
|
||||
@media only screen and (max-width: $width-mobile) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.filters {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
gap: 1em;
|
||||
margin: 1em 0;
|
||||
|
||||
// This is removed via JS to prevent displaying the inputs
|
||||
// on browsers wih JavaScript disabled.
|
||||
&.hidden { display: none }
|
||||
|
||||
&>* {
|
||||
border-radius: .5em;
|
||||
box-shadow: rgba(15, 17, 21, 0.5) 0px 3px 6px 0px;
|
||||
background-color: #3b4252;
|
||||
color: inherit;
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
background-color: #fff;
|
||||
color: #2e3440;
|
||||
}
|
||||
}
|
||||
|
||||
form {
|
||||
grid-column: 1 / 3;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
|
||||
input {
|
||||
font-size: inherit;
|
||||
border: 0;
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
input[type="search"] {
|
||||
flex-grow: 1;
|
||||
padding: .75em 1em;
|
||||
}
|
||||
|
||||
input[type="reset"] {
|
||||
cursor: pointer;
|
||||
width: 3em;
|
||||
padding: 0;
|
||||
background-size: auto 1.5em;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(160,163,170,1)'%3E%3Cpath d='M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 10.5858L14.8284 7.75736L16.2426 9.17157L13.4142 12L16.2426 14.8284L14.8284 16.2426L12 13.4142L9.17157 16.2426L7.75736 14.8284L10.5858 12L7.75736 9.17157L9.17157 7.75736L12 10.5858Z'%3E%3C/path%3E%3C/svg%3E");
|
||||
}
|
||||
}
|
||||
|
||||
&>.button {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
padding: .75em 1em;
|
||||
|
||||
&.selected {
|
||||
color: #fff;
|
||||
|
||||
&[data-category="mixtape"] { background-color: #bf616a }
|
||||
&[data-category="classic"] { background-color: #5e81ac }
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: $width-mobile) {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.song-list {
|
||||
display: grid;
|
||||
gap: 1em;
|
||||
|
||||
&>div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 1em;
|
||||
padding: .5em;
|
||||
padding-left: 1em;
|
||||
border-radius: .5em;
|
||||
box-shadow: rgba(15, 17, 21, 0.5) 0px 3px 6px 0px;
|
||||
border-left: .7em solid #000;
|
||||
background-color: #3b4252;
|
||||
|
||||
&.hidden { display: none }
|
||||
|
||||
&.mixtape { border-color: #bf616a }
|
||||
&.classic { border-color: #5e81ac }
|
||||
|
||||
.meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.title { font-weight: bold }
|
||||
.artist { font-size: .8em }
|
||||
}
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
gap: .5em;
|
||||
|
||||
&>* {
|
||||
height: 2.75em;
|
||||
width: 2.75em;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: auto 1.5em;
|
||||
border-radius: .25em;
|
||||
}
|
||||
|
||||
.html {
|
||||
background-color: #5e81ac;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,1)'%3E%3Cpath d='M16 2L21 7V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5447 3 21.0082V2.9918C3 2.44405 3.44495 2 3.9934 2H16ZM17.6569 12L14.1213 8.46447L12.7071 9.87868L14.8284 12L12.7071 14.1213L14.1213 15.5355L17.6569 12ZM6.34315 12L9.87868 15.5355L11.2929 14.1213L9.17157 12L11.2929 9.87868L9.87868 8.46447L6.34315 12Z'%3E%3C/path%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.pdf {
|
||||
background-color: #bf616a;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,1)'%3E%3Cpath d='M3.9985 2C3.44749 2 3 2.44405 3 2.9918V21.0082C3 21.5447 3.44476 22 3.9934 22H20.0066C20.5551 22 21 21.5489 21 20.9925L20.9997 7L16 2H3.9985ZM10.5 7.5H12.5C12.5 9.98994 14.6436 12.6604 17.3162 13.5513L16.8586 15.49C13.7234 15.0421 10.4821 16.3804 7.5547 18.3321L6.3753 16.7191C7.46149 15.8502 8.50293 14.3757 9.27499 12.6534C10.0443 10.9373 10.5 9.07749 10.5 7.5ZM11.1 13.4716C11.3673 12.8752 11.6043 12.2563 11.8037 11.6285C12.2754 12.3531 12.8553 13.0182 13.5102 13.5953C12.5284 13.7711 11.5666 14.0596 10.6353 14.4276C10.8 14.1143 10.9551 13.7948 11.1 13.4716Z'%3E%3C/path%3E%3C/svg%3E");
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
background-color: #fff;
|
||||
color: #2e3440;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main.song {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 50em;
|
||||
iframe.song {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
margin: 0 auto;
|
||||
padding-left: .5em;
|
||||
|
||||
iframe {
|
||||
display: block;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.controls {
|
||||
display: none; // Temporary
|
||||
}
|
||||
border: 0;
|
||||
}
|
||||
|
66
static/chordpro.css
Normal file
66
static/chordpro.css
Normal file
@ -0,0 +1,66 @@
|
||||
body {
|
||||
margin: 0;
|
||||
background-color: #d8d8d8;
|
||||
color: #181818;
|
||||
}
|
||||
|
||||
.song {
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
.chords {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.chorus, .verse, .tab {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.chorus {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.chorus:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: -1em;
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 2px;
|
||||
background-color: #181818;
|
||||
}
|
||||
|
||||
.tab {
|
||||
white-space: pre;
|
||||
font-family: monospace;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.comment {
|
||||
display: inline-block;
|
||||
padding: .25em .5em;
|
||||
background-color: #bbb;
|
||||
color: #181818;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #181818;
|
||||
color: #d8d8d8;
|
||||
}
|
||||
|
||||
.chorus:before {
|
||||
background-color: #d8d8d8;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background-color: #585858;
|
||||
color: #d8d8d8;
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 39 KiB |
@ -1,44 +0,0 @@
|
||||
const filters = document.querySelector(".filters");
|
||||
const buttons = Array.from(filters.querySelectorAll(".button"));
|
||||
const search = document.querySelector("input[type='search']");
|
||||
const form = document.querySelector("form");
|
||||
const songList = document.querySelector(".song-list");
|
||||
|
||||
let selectedCategory = null;
|
||||
|
||||
function buttonToggle(clickedButton) {
|
||||
buttons.forEach(button => {
|
||||
if (button === clickedButton && !button.classList.contains("selected")) {
|
||||
button.classList.add("selected");
|
||||
selectedCategory = button.dataset.category;
|
||||
} else {
|
||||
button.classList.remove("selected");
|
||||
if (button.dataset.category == selectedCategory) selectedCategory = null;
|
||||
}
|
||||
});
|
||||
filterSongs();
|
||||
}
|
||||
|
||||
function filterSongs() {
|
||||
const searchTerm = search.value.trim().toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, "");
|
||||
const songs = Array.from(songList.children);
|
||||
songs.forEach(song => {
|
||||
const title = song.dataset.title.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, "");
|
||||
const matching = title.includes(searchTerm) && (!selectedCategory || song.dataset.category === selectedCategory);
|
||||
song.classList.toggle("hidden", !matching);
|
||||
});
|
||||
}
|
||||
|
||||
// Event listeners
|
||||
search.addEventListener("input", filterSongs);
|
||||
// Filtering happens before the reset itself without this timeout
|
||||
form.addEventListener("reset", () => setTimeout(filterSongs, 0));
|
||||
buttons.forEach(button => button.addEventListener("click", () => buttonToggle(button)));
|
||||
|
||||
// Normalize song titles
|
||||
Array.from(songList.children).forEach(song => {
|
||||
song.dataset.title = song.dataset.title.toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu, "");
|
||||
});
|
||||
|
||||
// Display the filter section on JS-enabled browsers
|
||||
window.addEventListener("load", () => filters.classList.remove = "hidden");
|
@ -1,4 +1,3 @@
|
||||
{% import "macros.html" as macros %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@ -6,43 +5,16 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}{{ config.title }}{% endblock %}</title>
|
||||
<link rel="stylesheet" href="{{ get_url(path="/style.css") }}">
|
||||
<link rel="icon" type="image/png" href="{{ get_url(path="/favicon.png") }}">
|
||||
<link rel="icon" href="favicon.svg">
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
<main class="songs">
|
||||
<section class="filters">
|
||||
<form>
|
||||
<input type="search" placeholder="Hledat">
|
||||
<input type="reset" value="">
|
||||
</form>
|
||||
<div class="button" data-category="classic">Classic</div>
|
||||
<div class="button" data-category="mixtape">Mixtape</div>
|
||||
</section>
|
||||
<section class="song-list">
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for song in section.pages %}
|
||||
<div class="{{ macros::primary_category(song=song) }}" data-title="{{ song.title }}" data-category="{{ macros::primary_category(song=song) }}">
|
||||
<div class="meta">
|
||||
<div class="title">{{ song.title }}</div>
|
||||
{% if song.taxonomies["artist"] %}
|
||||
<div class="artist">{{ song.taxonomies["artist"][0] }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="links">
|
||||
<a href="{{ song.permalink }}" class="html"></a>
|
||||
{% for asset in song.assets %}
|
||||
{% if asset is matching(song.slug~"[.](pdf)$") %}
|
||||
<a href="{{ asset }}" class="pdf"></a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<li><a href="{{ song.permalink }}">{{ song.title }}</a></li>
|
||||
{% endfor %}
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{{ get_url(path="/js/filter.js") }}"></script>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
{% block script %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,5 +0,0 @@
|
||||
{% macro primary_category(song) %}
|
||||
{%- if song.taxonomies["category"] -%}
|
||||
{{ song.taxonomies["category"][0] }}
|
||||
{%- endif -%}
|
||||
{% endmacro %}
|
@ -1,11 +1,8 @@
|
||||
{% extends "index.html" %}
|
||||
{% block content %}
|
||||
<main class="song">
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching(page.slug~"[.](html)$") %}
|
||||
<iframe class="song" src="{{ asset }}"></iframe>
|
||||
<div class="controls">controls</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</main>
|
||||
{% for asset in page.assets %}
|
||||
{% if asset is matching(page.slug~"[.](html)$") %}
|
||||
<iframe class="song" src="{{ asset }}"></iframe>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user