Browse Source

Complete HTML template

pull/103/head
Oliverpool 9 years ago
parent
commit
b9e542cf54
  1. 2
      patacrep/songs/chordpro/data/html/content_comment
  2. 34
      patacrep/songs/chordpro/data/html/content_define
  3. 3
      patacrep/songs/chordpro/data/html/content_define_list
  4. 2
      patacrep/songs/chordpro/data/html/content_guitar_comment
  5. 2
      patacrep/songs/chordpro/data/html/content_image
  6. 3
      patacrep/songs/chordpro/data/html/content_metadata_cover
  7. 2
      patacrep/songs/chordpro/data/html/content_partition
  8. 1
      patacrep/songs/chordpro/data/html/content_verse
  9. 2
      patacrep/songs/chordpro/data/html/song
  10. 33
      patacrep/songs/chordpro/data/html/song_header

2
patacrep/songs/chordpro/data/html/content_comment

@ -1 +1 @@
{comment: (( content.argument ))} <div class="comment">(( content.argument ))</div>

34
patacrep/songs/chordpro/data/html/content_define

@ -1,25 +1,31 @@
{define: (( render(content.key) )) <div(( " " -))
(*- if content.basefret *) class="chord-diagram"(( " " -))
base-fret ((content.basefret)) data-shift="
(*- if content.basefret -*)
((content.basefret))
(*- else -*)
0
(*- endif *) (*- endif *)
frets ((- '" ' -))
(*- for string in content.frets -*) data-frets="
(( " " -)) (*- for fret in content.frets -*)
(*- if string is none -*) (* if fret is none -*)
x x
(*- else -*) (*- else -*)
(( string -)) (( fret -))
(*- endif -*) (* endif -*)
(*- endfor -*) (* endfor -*)
(* if content.fingers *) ((- '" ' -))
fingers (* if content.fingers -*)
data-fingers="
(*- for finger in content.fingers -*) (*- for finger in content.fingers -*)
(( " " -))
(* if finger is none -*) (* if finger is none -*)
- -
(*- else -*) (*- else -*)
(( finger -)) (( finger -))
(* endif -*) (* endif -*)
(* endfor -*) (* endfor -*)
((- '" ' -))
(* endif -*) (* endif -*)
} data-name="(( content.pretty_key ))"(( " " -))
></div>

3
patacrep/songs/chordpro/data/html/content_define_list

@ -0,0 +1,3 @@
(*- for chord in metadata['define'] *)
((- render(chord) ))
(* endfor *)

2
patacrep/songs/chordpro/data/html/content_guitar_comment

@ -1 +1 @@
{guitar_comment: (( content.argument ))} <div class="guitar_comment">(( content.argument ))</div>

2
patacrep/songs/chordpro/data/html/content_image

@ -1 +1 @@
{image: (( content.argument ))} <img src="(( content.argument ))">

3
patacrep/songs/chordpro/data/html/content_metadata_cover

@ -0,0 +1,3 @@
(* if 'cov' in metadata -*)
<img src="(( metadata['cov'].argument|search_image ))"><br>
(* endif *)

2
patacrep/songs/chordpro/data/html/content_partition

@ -1 +1 @@
{partition: ((content.argument))} <a class="song-partition" href="((content.argument))">((content.argument))</a>

1
patacrep/songs/chordpro/data/html/content_verse

@ -1,5 +1,6 @@
<p class="(( content.type ))"> <p class="(( content.type ))">
(*- for line in content.lines -*) (*- for line in content.lines -*)
(* if not loop.first *)<br>(* endif -*)
(( render(line) )) (( render(line) ))
(* endfor -*) (* endfor -*)
</p> </p>

2
patacrep/songs/chordpro/data/html/song

@ -1,3 +1,5 @@
(* include 'song_header' *) (* include 'song_header' *)
<div class="song_content">
(* include 'song_body' *) (* include 'song_body' *)
</div>

33
patacrep/songs/chordpro/data/html/song_header

@ -1,31 +1,30 @@
(* 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 -*) (*- for title in titles -*)
{title: (( title ))} (* if loop.first *)
<h1 class="song-title">(( title ))</h1>
(* else *)
<h2 class="song-title">(( title ))</h2>
(* endif *)
(* endfor -*) (* endfor -*)
(*- for author in authors -*) (*- for author in authors -*)
{artist: (( author[1] ))(( author[0] ))} <h2 class="song-artist">(( author[1] ))(( author[0] ))</h2>
(* endfor *) (* endfor *)
(*- for key in ['album', 'copyright', 'cov', 'tag'] *)
(*- for key in ['album', 'copyright', 'tag', 'columns', 'capo'] *)
(* if key in metadata -*) (* if key in metadata -*)
{(( key )): (( metadata[key] ))} <span class="song-(( key ))">(( key|capitalize )): (( metadata[key] ))</span><br/>
(* endif *) (* endif *)
(* endfor *) (* endfor *)
(* if language is defined -*)
<span class="song-language">Language: (( language ))</span><br>
(* endif *)
(* include 'content_metadata_cover' *)
(*- for key in metadata.keys -*) (*- for key in metadata.keys -*)
{key: (( key.keyword )): (( key.argument ))} {key: (( key.keyword )): (( key.argument ))}
(* endfor *) (* endfor *)
(*- for chord in metadata['define'] *) (* include 'content_define_list' *)
((- render(chord) ))
(* endfor *)

Loading…
Cancel
Save