1 This file is part of DisOrder.
2 Copyright (C) 2008 Richard Kettlewell
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 ------------------------------------------------------------------------
24 This file is read before any other template. Its output is discarded
25 but side effects (definitions of macros) are retained. To override it,
26 create /etc/disorder/macros.tmpl that includes this file by absolute path
27 and then redefines macros as desired.
28 ------------------------------------------------------------------------
31 @# Standard width and height of an image
32 @define {width} {} {16}
33 @define {height} {} {16}
35 @# Standard <head> text
36 @# @name is the name of this page, for the <title> element
37 @define {stdhead} {name}
41 href="@label{url.static}/disorder.css">
42 <title>@label{@name.title}</title>}
44 @# Non-displaying <head> text
45 @define {quiethead} {}
48 href="@label{url.static}/disorder.css">}
51 @# @current is the name of the current page, e.g. choosealpha, login
52 @define {stdmenu} {current}
54 @menuitem{@current}{playing}{true}
55 @menuitem{@current}{choose}{@right{play}}
56 @menuitem{@current}{search}{@right{play}}
57 @menuitem{@current}{manage}{true}
58 @menuitem{@current}{login}{true}
59 @menuitem{@current}{help}{true}
60 @menuitem{@current}{about}{true}
67 @# @current is the name of the current page (not necessarily the action that
69 @# @name is the name of the menu item
70 @# @available is true if the menu item is available, else false
72 @define {menuitem} {current name available}
74 { <a @if{@eq{@current}{@name}}
77 @if{@eq{name}{playing}}
79 {href="@url?action=@name"}
80 title="@label{menu.@q{@name}verbose}"
81 @label{menu.@name}</a>}
82 { <span class=invaldmenu title="@label{menu.@q{@name}verbose}">
83 @label{menu.@name}</span>}}
86 @# Standard footer text
89 <a href="http://www.greenend.org.uk/rjk/disorder/"
90 title="DisOrder web site">DisOrder
92 © 2003-2008 Richard Kettlewell et al
95 @# Expand to the time that @id will be played
96 @# @what is the section
97 @# @id is the track ID
98 @define {mwhen} {what id}
101 @# Expand to the 'who' field for @id
102 @# @what is the section
103 @# @id is the track ID
104 @define {mwho} {what id}
105 {@if{@eq{@who{@id}}{}}
106 {@if{@eq{@state{@id}}{random}}
107 {@label{@what.randomtrack}}
111 @# Expand to the artist for @track
112 @# @what is the section
113 @# @track is the track name
114 @define {martist} {what track}
117 href="@url?action=choose&directory=@urlquote{@dirname{@dirname{@track}}}"
118 title="@label{@what.artistverbose}">@part{@track}{short}{artist}</a>}
119 {<span class=directory
120 title="@part{@track}{artist}@">@part{@track}{short}{artist}</span>}}
122 @# Expand to the album for @track
123 @# @what is the section
124 @# @track is the track name
125 @define {malbum} {what track}
128 href="@url?action=choose&directory=@urlquote{@dirname{@track}}"
129 title="@label{@what.albumverbose}">@part{@track}{short}{album}</a>}
130 {<span class=directory
131 title="@part{@track}{album}@">@part{@track}{short}{album}</span>}}
133 @# Expand to the title for @track
134 @# @what is the section
135 @# @track is the track name
136 @define {mtitle} {what track}
137 {<span title="@part{@track}{title}">@part{@track}{short}{title}</span>}
139 @# Expand to the remove/scratch entry for @id
140 @# @what is the section
141 @# @id is the track ID
142 @define {mremove} {what id}
143 {@if{@removable{@id}}
145 href="@url?action=remove&id=@id@back">
146 <img class=button src="@image{remove}"
147 width=@width height=@height
148 title="@label{@what.removeverbose}"
149 alt="@label{@what.scratch}">
151 {<img class=button src="@image{noremove}"
152 width=@width height=@height
153 title="@label{@what.removeverbose}"
154 alt="@label{@what.scratch}">}}
156 @# Expand to a move button
157 @# @id is the track ID
158 @# @dir should be a direction: up, upall, down or downall
159 @# @delta should be the distance, +ve for up and -ve for down
160 @# This macro calls @movable to check that the move is possible.
161 @define {mmove} {id dir delta}
162 {@if{@movable{@id}{@delta}}
164 href="@url?action=move&id=@id&delta=@delta@back">
165 <img class=button src="@image{@dir}"
166 width=@width height=@height
167 title="@label{playing.@q{@dir}verbose}"
168 alt="@label{playing.@dir}">
170 {<img class=button src="@image{no@dir}"
171 width=@width height=@height
172 title="@label{playing.@q{@dir}verbose}"
173 alt="@label{playing.@dir}">}}