chiark / gitweb /
more template fiddling
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 17 May 2008 12:07:18 +0000 (13:07 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 17 May 2008 12:07:18 +0000 (13:07 +0100)
templates/macros.tmpl
templates/new.tmpl
templates/recent.tmpl

index b471599..11ba25c 100644 (file)
@@ -36,9 +36,6 @@ and then redefines macros as desired.
 @#  @name is the name of this page, for the <title> element
 @define {stdhead} {name}
         {@quiethead
-<link rel=stylesheet
-      type="text/css"
-      href="@label{url.static}/disorder.css">
 <title>@label{@name.title}</title>}
 
 @# Non-displaying <head> text
@@ -170,3 +167,12 @@ and then redefines macros as desired.
                   width=@width height=@height
                   title="@label{playing.@q{@dir}verbose}"
                   alt="@label{playing.@dir}">}}
+
+Local variables:
+mode:sgml
+sgml-always-quote-attributes:nil
+sgml-indent-step:1
+sgml-indent-data:t
+indent-tabs-mode:nil
+fill-column:79
+End:
index 2185c4b..e017a74 100644 (file)
@@ -24,50 +24,38 @@ USA
  </head>
  <body>
 @stdmenu{new}
-  <h1>@label:new.title@</h1>
+  <h1>@label{new.title}</h1>
 
-@#{only display the table if there is something to put in it}@
-@if{@isnew@}{
+@# Only display the table if there is something to put in it
+@if{@isnew}{
   <table class=new>
     <tr class=headings>
-     <th class=artist>@label:heading.artist@</th>
-     <th class=album>@label:heading.album@</th>
-     <th class=title>@label:heading.title@</th>
-     <th class=length>@label:heading.length@</th>
+     <th class=artist>@label{heading.artist}</th>
+     <th class=album>@label{heading.album}</th>
+     <th class=title>@label{heading.title}</th>
+     <th class=length>@label{heading.length}</th>
 @right{prefs}{
-     <th class=button>&nbsp;</th>}@
+     <th class=button>&nbsp;</th>}
     </tr>
     @new{
-    <tr class=@parity@>
-     <td class=artist>@right{play}{<a class=directory
-       title="@part{artist}@"
-       href="@url@?action=choose&amp;directory=@urlquote{@dirname{@dirname{@part:path@}@}@}@"
-       >@part{short}{artist}@</a>}{<span class=directory
-       title="@part{artist}@"
-       >@part{short}{artist}@</span>}@</td>
-     <td class=album>@right{play}{<a class=directory
-       title="@part{album}@"
-       href="@url@?action=choose&amp;directory=@urlquote{@dirname{@part:path@}@}@"
-       >@part{short}{album}@</a>}{<span class=directory
-       title="@part{album}@"
-       >@part{short}{album}@</span>}@</td>
-     <td class=title>@right{play}{<a class=file
-       title="@part{title}@"
-       href="@url@?action=play&#38;file=@urlquote{@file@}@&#38;back=@urlquote{@thisurl@}@"
-       >@part{short}{title}@</a>}{<span class=file
-       title="@part{title}@"
-       >@part{short}{title}@</span>}@</td>
-     <td class=length>@length@</td>
-@right{prefs}{
-     <td class=imgbutton><a class=imgbutton
-      href="@url@?action=prefs&#38;0_file=@urlquote{@file@}@"><img
-       class=button src="@image:edit@"
-       title="@label:choose.prefsverbose@"
-       alt="@label:choose.prefs@"></a></td>
-    </tr>}@
-    }@
+    <tr class=@parity>
+     <td class=artist>@martist{new}{@track}</td>
+     <td class=album>@malbum{new}{@track}</td>
+     <td class=title>@mtitle{new}{@track}</td>
+     <td class=length>@length{@id}</td>
+     @right{prefs}{
+     <td class=imgbutton>
+      <a class=imgbutton
+         href="@url?action=prefs&#38;0_file=@urlquote{@track}">
+       <img class=button src="@image{edit}"
+            title="@label{choose.prefsverbose}"
+            alt="@label{choose.prefs}">
+      </a>
+     </td>
+    </tr>}
+    }
   </table>
-}@
+}
 
 @credits
  </body>
index e8590c7..8f3fd9c 100644 (file)
@@ -24,50 +24,41 @@ USA
  </head>
  <body>
 @stdmenu{recent}
-  <h1>@label:recent.title@</h1>
+  <h1>@label{recent.title}</h1>
 
-@#{only display the table if there is something to put in it}@
-@if{@isrecent@}{
+@# Only display the table if there is something to put in it
+@if{@isrecent}{
   <table class=recent>
     <tr class=headings>
-     <th class=when>@label:heading.when@</th>
-     <th class=who>@label:heading.who@</th>
-     <th class=artist>@label:heading.artist@</th>
-     <th class=album>@label:heading.album@</th>
-     <th class=title>@label:heading.title@</th>
-     <th class=length>@label:heading.length@</th>
-@right{prefs}{
-     <th class=button>&nbsp;</th>}@
+     <th class=when>@label{heading.when}</th>
+     <th class=who>@label{heading.who}</th>
+     <th class=artist>@label{heading.artist}</th>
+     <th class=album>@label{heading.album}</th>
+     <th class=title>@label{heading.title}</th>
+     <th class=length>@label{heading.length}</th>
+     @right{prefs}{<th class=button>&nbsp;</th>}
     </tr>
     @recent{
-    <tr class=@parity@>
-     <td class=when>@when@</td>
-     <td class=who>@who@</td>
-     <td class=artist>@right{play}{<a class=directory
-       title="@part{artist}@"
-       href="@url@?action=choose&amp;directory=@urlquote{@dirname{@dirname{@part:path@}@}@}@"
-       >@part{short}{artist}@</a>}{<span class=directory
-       title="@part{artist}@"
-       >@part{short}{artist}@</span>}@</td>
-     <td class=album>@right{play}{<a class=directory
-       title="@part{album}@"
-       href="@url@?action=choose&amp;directory=@urlquote{@dirname{@part:path@}@}@"
-       >@part{short}{album}@</a>}{<span class=directory
-       title="@part{album}@"
-       >@part{short}{album}@</span>}@</td>
-     <td class=title><span
-       title="@part{title}@">@part{short}{title}@</span></td>
-     <td class=length>@length@</td>
-@right{prefs}{
-     <td class=imgbutton><a class=imgbutton
-      href="@url@?action=prefs&#38;0_file=@urlquote{@file@}@"><img
-       class=button src="@image:edit@"
-       title="@label:choose.prefsverbose@"
-       alt="@label:choose.prefs@"></a></td>
-    </tr>}@
-    }@
+    <tr class=@parity>
+     <td class=when>@mwhen{recent}{@id}</td>
+     <td class=who>@mwho{recent}{@id}</td>
+     <td class=artist>@martist{recent}{@track}</td>
+     <td class=album>@malbum{recent}{@track}</td>
+     <td class=title>@mtitle{recent}{@track}</td>
+     <td class=length>@length{@id}</td>
+     @right{prefs}{
+     <td class=imgbutton>
+      <a class=imgbutton
+         href="@url?action=prefs&#38;0_file=@urlquote{@track}">
+       <img class=button src="@image{edit}"
+            title="@label{choose.prefsverbose}"
+            alt="@label{choose.prefs}">
+      </a>
+     </td>
+    </tr>}
+    }
   </table>
-}@
+}
 
 @credits
  </body>