Browse Source

Start the html template

pull/103/head
Oliverpool 9 years ago
parent
commit
9a834f826a
  1. 1
      patacrep/songs/chordpro/data/html/content_chord
  2. 6
      patacrep/songs/chordpro/data/html/content_chordlist
  3. 1
      patacrep/songs/chordpro/data/html/content_comment
  4. 25
      patacrep/songs/chordpro/data/html/content_define
  5. 3
      patacrep/songs/chordpro/data/html/content_error
  6. 1
      patacrep/songs/chordpro/data/html/content_guitar_comment
  7. 1
      patacrep/songs/chordpro/data/html/content_image
  8. 3
      patacrep/songs/chordpro/data/html/content_line
  9. 1
      patacrep/songs/chordpro/data/html/content_newline
  10. 1
      patacrep/songs/chordpro/data/html/content_partition
  11. 1
      patacrep/songs/chordpro/data/html/content_space
  12. 5
      patacrep/songs/chordpro/data/html/content_tablature
  13. 5
      patacrep/songs/chordpro/data/html/content_verse
  14. 1
      patacrep/songs/chordpro/data/html/content_word
  15. 3
      patacrep/songs/chordpro/data/html/song
  16. 3
      patacrep/songs/chordpro/data/html/song_body
  17. 31
      patacrep/songs/chordpro/data/html/song_header

1
patacrep/songs/chordpro/data/html/content_chord

@ -0,0 +1 @@
((- content.chord -))

6
patacrep/songs/chordpro/data/html/content_chordlist

@ -0,0 +1,6 @@
<span class="chord">
(*- for chord in content.chords -*)
(* if not loop.first *) (* endif -*)
(( render(chord) -))
(* endfor -*)
</span>

1
patacrep/songs/chordpro/data/html/content_comment

@ -0,0 +1 @@
{comment: (( content.argument ))}

25
patacrep/songs/chordpro/data/html/content_define

@ -0,0 +1,25 @@
{define: (( render(content.key) ))
(*- if content.basefret *)
base-fret ((content.basefret))
(*- endif *)
frets
(*- for string in content.frets -*)
(( " " -))
(*- if string is none -*)
x
(*- else -*)
(( string -))
(*- endif -*)
(*- endfor -*)
(* if content.fingers *)
fingers
(*- for finger in content.fingers -*)
(( " " -))
(* if finger is none -*)
-
(*- else -*)
(( finger -))
(* endif -*)
(* endfor -*)
(* endif -*)
}

3
patacrep/songs/chordpro/data/html/content_error

@ -0,0 +1,3 @@
ERROR : Template not found for "(( content.__class__.__name__ ))". See the logs for details.

1
patacrep/songs/chordpro/data/html/content_guitar_comment

@ -0,0 +1 @@
{guitar_comment: (( content.argument ))}

1
patacrep/songs/chordpro/data/html/content_image

@ -0,0 +1 @@
{image: (( content.argument ))}

3
patacrep/songs/chordpro/data/html/content_line

@ -0,0 +1,3 @@
(* for item in content.line -*)
(( render(item) ))
(*- endfor *)

1
patacrep/songs/chordpro/data/html/content_newline

@ -0,0 +1 @@

1
patacrep/songs/chordpro/data/html/content_partition

@ -0,0 +1 @@
{partition: ((content.argument))}

1
patacrep/songs/chordpro/data/html/content_space

@ -0,0 +1 @@

5
patacrep/songs/chordpro/data/html/content_tablature

@ -0,0 +1,5 @@
<pre class="tablature">
(* for content in content.content *)
((- content ))
(* endfor *)
</pre>

5
patacrep/songs/chordpro/data/html/content_verse

@ -0,0 +1,5 @@
<p class="(( content.type ))">
(*- for line in content.lines -*)
(( render(line) ))
(* endfor -*)
</p>

1
patacrep/songs/chordpro/data/html/content_word

@ -0,0 +1 @@
(( content.value ))

3
patacrep/songs/chordpro/data/html/song

@ -0,0 +1,3 @@
(* include 'song_header' *)
(* include 'song_body' *)

3
patacrep/songs/chordpro/data/html/song_body

@ -0,0 +1,3 @@
(* for item in content -*)
(( render(item) ))
(* endfor *)

31
patacrep/songs/chordpro/data/html/song_header

@ -0,0 +1,31 @@
(* if language is defined -*)
{language: (( language ))}
(* endif *)
(* if metadata.columns is defined -*)
{columns: (( metadata.columns ))}
(* endif *)
(* if metadata.capo is defined -*)
{capo: (( metadata.capo ))}
(* endif *)
(*- for title in titles -*)
{title: (( title ))}
(* endfor -*)
(*- for author in authors -*)
{artist: (( author[1] ))(( author[0] ))}
(* endfor *)
(*- for key in ['album', 'copyright', 'cov', 'tag'] *)
(* if key in metadata -*)
{(( key )): (( metadata[key] ))}
(* endif *)
(* endfor *)
(*- for key in metadata.keys -*)
{key: (( key.keyword )): (( key.argument ))}
(* endfor *)
(*- for chord in metadata['define'] *)
((- render(chord) ))
(* endfor *)
Loading…
Cancel
Save