Browse Source

Improve html template

pull/126/head
Oliverpool 9 years ago
parent
commit
f9c3b3d505
  1. 8
      patacrep/songs/chordpro/data/html/content_verse
  2. 53
      test/test_chordpro/newline.html

8
patacrep/songs/chordpro/data/html/content_verse

@ -1,5 +1,11 @@
(* if content.directive() *)
<p class="directives">
(*- elif content.nolyrics -*)
<p class="nolyrics">
(*- else *)
<p class="(( content.type ))"> <p class="(( content.type ))">
(* for line in content.lines *) (*- endif *)
(* for line in content.lines -*)
(( render(line) )) (( render(line) ))
(*- if not loop.last *)<br> (*- if not loop.last *)<br>
(* endif *) (* endif *)

53
test/test_chordpro/newline.html

@ -1,50 +1,43 @@
<span class="song-language">Lang: en</span><br> <span class="song-language">Lang: en</span><br>
<div class="song_content"> <div class="song_content">
<p class="verse"> <p class="verse">This is a verse<br>
This is a verse<br> With a new line<br>
With a new line<br> <br>
<br> The second part of the verse<br>
The second part of the verse<br> Is this line
Is this line
</p> </p>
<p class="verse"> <p class="verse">Here is a new line at the end<br>
Here is a new line at the end<br>
</p> </p>
<p class="verse"> <p class="verse">Foo bar
Foo bar
</p> </p>
<p class="verse"> <p class="verse"><br>
<br> And a new line<br>
And a new line<br> At the beginning
At the beginning
</p> </p>
<p class="chorus"> <p class="chorus">New lines can also<br>
New lines can also<br> <br>
<br> Be in chorus
Be in chorus
</p> </p>
<p class="bridge"> <p class="bridge">New lines can also<br>
New lines can also<br> <br>
<br> Be in bridges
Be in bridges
</p> </p>
<p class="verse"> <p class="verse">New lines can also<br>
New lines can also<br> <br>
<br> Be surrounded by spaces
Be surrounded by spaces
</p> </p>
<p class="verse"> <p class="verse">New lines cannot
New lines cannot
</p> </p>
</div> </div>
Loading…
Cancel
Save