mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2024-12-22 08:43:33 +01:00
Carlos Galindo
03522304fa
- ¡Ahora con tema oscuro! Se activa según el navegador del usuario. - URL de audios simplificada. - Nuevos iconos para canciones con acordes/audios. - Enlaces de la cabecera actualizados. - Siempre mostramos los ajustes. - Insertar espacio forzoso para separar algunas palabras que se juntaban. - Soporte para canciones con dos líneas de acordes (e.g. Engrandece).
157 lines
5.6 KiB
HTML
157 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
{% include "head.html" with path=".." only %}
|
|
<link rel="stylesheet" type="text/css" href="../song.css"/>
|
|
<script async src="../song.js"></script>
|
|
</head>
|
|
<body>
|
|
{% include "header.html" with path=".." %}
|
|
<main>
|
|
<div class="song">
|
|
<h2 style="display: inline-block;">{{song.number}}. {{ song.name}}</h2>
|
|
{% if song.author %}
|
|
<span>por <strong>{{ song.author }}</strong></span>
|
|
{% endif %}
|
|
{% if song.origin %}
|
|
<span>basada en: <strong>{{ song.origin }}</strong></span>
|
|
{% endif %}
|
|
<h3>Ajustes</h3>
|
|
<div>
|
|
<label>Cambiar tamaño de letra </label>
|
|
<button class="small" onclick="size(-1)">-</button>
|
|
<button class="small" onclick="size(0)">Reset</button>
|
|
<button class="small" onclick="size(+1)">+</button>
|
|
</div>
|
|
{% if song.chorded %}
|
|
<div>
|
|
<label><input id="showChords" type="checkbox" checked onchange="showChords(this.checked)"/> Mostrar acordes</label>
|
|
</div>
|
|
<div id="transposeControls" class="showChords">
|
|
<label for="transposeSelect">Transponer acordes </label>
|
|
<button class="small" onclick="transposeAdd(-2)">-2</button>
|
|
<button class="small" onclick="transposeAdd(-1)">-1</button>
|
|
<select id="transposeSelect" disabled>
|
|
<option>-6</option>
|
|
<option>-5</option>
|
|
<option>-4</option>
|
|
<option>-3</option>
|
|
<option>-2</option>
|
|
<option>-1</option>
|
|
<option selected="selected">0</option>
|
|
<option>+1</option>
|
|
<option>+2</option>
|
|
<option>+3</option>
|
|
<option>+4</option>
|
|
<option>+5</option>
|
|
<option>+6</option>
|
|
</select>
|
|
<button class="small" onclick="transposeAdd(1)">+1</button>
|
|
<button class="small" onclick="transposeAdd(2)">+2</button>
|
|
<button onclick="transpose(0)">Reset</button>
|
|
</div>
|
|
{% if song.capo != 0 %}
|
|
<div class="showChords">
|
|
<span class="capo">Tono original: Cejilla {{ song.capo }}</span>
|
|
<button style="margin-left: 0.5em;" onclick="transpose({{ song.capo}})">Transponer para quitarla</button>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
<h3>Canción</h3>
|
|
<div id="wholeSongDiv">
|
|
<div id="songLyrics" class="showLyrics" style="display: none;">
|
|
{% for verse in song.verses %}
|
|
<p class="{{ verse.kind }}">
|
|
{% for line in verse.lines %}
|
|
{{ line }}<br/>
|
|
{% endfor %}
|
|
</p>
|
|
{% endfor %}
|
|
</div>
|
|
<div id="songChords" class="showChords">
|
|
{% for verse in song.verses %}
|
|
<div class="{{ verse.kind }}">
|
|
{% for line in verse.lines %}
|
|
{% spaceless %}
|
|
{% for chord, lyric in line.zipped_arr %}
|
|
<table class="chordedline">
|
|
<tr class="chord">
|
|
<td rowspan="{{ chord.rowspan|default:'1' }}">
|
|
{% if chord.class %}
|
|
<span class="{{ chord.class }}"></span>
|
|
{% endif %}
|
|
{% if chord.chord.trfmt == "normal" %}
|
|
{% for c in chord.chord.items_t %}
|
|
{% if c.chord %}
|
|
<span class="c">{{ c.text|safe }}</span>
|
|
{% else %}
|
|
<span>{{ c.text|safe }}</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if chord.chord.trfmt == "double" %}
|
|
<span>
|
|
{% for c in chord.chord.items_n %}
|
|
{% if c.chord %}
|
|
<span class="c">{{ c.text|safe }}</span>
|
|
{% else %}
|
|
<span>{{ c.text|safe }}</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<br/>
|
|
{% for c in chord.chord.items_t %}
|
|
{% if c.chord %}
|
|
<span class="c">{{ c.text|safe }}</span>
|
|
{% else %}
|
|
<span>{{ c.text|safe }}</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<span/>
|
|
{% endif %}
|
|
{% if chord.chord.trfmt == "hover" %}
|
|
<span>
|
|
{% for c in chord.chord.items_n %}
|
|
{% if c.chord %}
|
|
<span class="c">{{ c.text|safe }}</span>
|
|
{% else %}
|
|
<span>{{ c.text|safe }}</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<br/> </span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr class="lyric">
|
|
<td>
|
|
{% if 'rowspan' not in chord %}
|
|
<span>{{ lyric|safe }}</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
{% endfor %}
|
|
{% if not forloop.last %} <br/> {% endif %}
|
|
{% endspaceless %}
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% for audio in song.audios %}
|
|
{% if forloop.first %}
|
|
<h3>Audios</h3>
|
|
{% endif %}
|
|
<div>
|
|
<audio controls style='width: 100%;'>
|
|
<source src='{{ audio.audio_file|urlencode }}' type='audio/mpeg'/>
|
|
</audio>
|
|
</div>
|
|
{% endfor %}
|
|
<a href="https://gitlab.com/parroquia-san-leandro/cancionero-25/blob/master/{{ song.latex_file|urlencode }}"><span>Ver archivo original (LaTeX)</span></a>
|
|
<a href="../"><span>Índice</span></a>
|
|
<a href="../#{{ song.category|slugify }}"><span>Categoría: {{ song.category|title }}</span></a>
|
|
</div>
|
|
</main>
|
|
{% include "footer.html" %}
|
|
</body>
|
|
</html>
|