Rendering code refactor
This commit is contained in:
55
folkugat_web/assets/templates/lilypond/single_tune.ly
Normal file
55
folkugat_web/assets/templates/lilypond/single_tune.ly
Normal file
@@ -0,0 +1,55 @@
|
||||
\version "2.24.4"
|
||||
\paper {
|
||||
top-margin = 10
|
||||
left-margin = 15
|
||||
right-margin = 15
|
||||
}
|
||||
|
||||
\header {
|
||||
title = \markup { "{{ tune.header.title | safe }}" }
|
||||
{% if tune.header.composer %}
|
||||
composer = "{{ tune.header.composer | safe }}"
|
||||
{% endif %}
|
||||
|
||||
tagline = "Partitura generada amb LilyPond"
|
||||
copyright = "Folkugat"
|
||||
}
|
||||
|
||||
\markup \vspace #2
|
||||
|
||||
{% if tune.score_source is not none %}
|
||||
\score {
|
||||
\language "english"
|
||||
<<
|
||||
{{ score_beginning }}
|
||||
{{ tune.score_source | safe }}
|
||||
>>
|
||||
}
|
||||
{% endif %}
|
||||
{% if tune.lyrics is not none %}
|
||||
{% for line in tune.lyrics.lines %}
|
||||
\markup {
|
||||
\vspace #2
|
||||
\fill-line {
|
||||
{% for paragraph in line.paragraphs %}
|
||||
\hspace #1
|
||||
\center-column {
|
||||
{% for line in paragraph.lines %}
|
||||
\line { {{ line | safe }} }
|
||||
{% endfor %}
|
||||
}
|
||||
{% endfor %}
|
||||
\hspace #1
|
||||
}
|
||||
}
|
||||
{% if loop.index < tune.lyrics.lines|length %}
|
||||
\markup {
|
||||
\vspace #1
|
||||
\fill-line {
|
||||
\override #'(span-factor . 4/9)
|
||||
\draw-hline
|
||||
}
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user