chiark / gitweb /
More CGI fiddlig
authorRichard Kettlewell <rjk@greenend.org.uk>
Mon, 26 May 2008 10:55:25 +0000 (11:55 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Mon, 26 May 2008 10:55:25 +0000 (11:55 +0100)
templates/about.tmpl
templates/disorder.css
templates/macros.tmpl

index 3f065df5aecd6c03a505d082b1a60793a24c337f..afdad66290489574f597a81981ddf3484cd22bce 100644 (file)
@@ -33,9 +33,9 @@ USA
 
   <div class=section>
 
-   <p>This is DisOrder, a multi-user software jukebox.  Please see the <a
-   href="@url?action=help">help page</a> for instructions on using this
-   interface.</p>
+   <p>This is DisOrder @version, a multi-user software jukebox.
+   Please see the <a href="@url?action=help">help page</a> for
+   instructions on using this interface.</p>
 
   </div>
     
index 868bdeff84626f308fc94f88e845125ec4434362..ee3dfd515c1c32bac8cd72cc24723adf7e026f9d 100644 (file)
@@ -269,17 +269,18 @@ p.menubar a, p.menubar span {
 }
 
 /* a.activemenu is the current menu item */
-a.activemenu {
-  background-color: black;
-  color: white;
-  padding: 4px
+img.activemenu, a.activemenu {
+  background-color: #d0d0d0;
+  color: black;
+  padding: 4px;
+  border: none
 }
 
 /* a.inactivemenu is a non-current but choosable menu item */
-a.inactivemenu {
+img.inactivemenu, a.inactivemenu {
   color: black;
   padding:4px;
-  margin: 0px
+  border:none 
 }
 
 /* span.invaliemenu is a non-choosable menu item */
index 1da66d402cdde054fd3e3722dc6b09a9e075fbd4..9f31132ac2363165178e412e3a689cb5690257d6 100644 (file)
@@ -56,20 +56,19 @@ and then redefines macros as desired.
 @menuitem{@current}{new}{true}
 @menuitem{@current}{login}{true}
 @menuitem{@current}{help}{true}
-@menuitem{@current}{about}{true}
    </p>
    <div class=logo>
-    <a href="http://www.greenend.org.uk/rjk/disorder/">
-     <img src="@image{logosmall}"
-          style="border-style:none"
-          alt="DisOrder"
-          title="Quack quack!  Visit the DisOrder website">
-    </a>
+@menuicon{@current}{about}{true}{logosmall}
    </div>
   <div style="clear:both"></div>
   </div>
 }
 
+@define {menuurl} {name}
+        {@if{@eq{name}{playing}}
+           {@url}
+           {@url?action=@name}}
+
 @# Menu entry
 @#  Used by @stdmenu
 @#  @current is the name of the current page (not necessarily the action that
@@ -82,13 +81,37 @@ and then redefines macros as desired.
             {    <a @if{@eq{@current}{@name}}
                        {class=activemenu}
                        {class=inactivemenu}
-@if{@eq{name}{playing}}
-   {       href="@url"}
-   {       href="@url?action=@name"}
+       href="@menuurl{@name}"
        title="@label{menu.@q{@name}verbose}">@label{menu.@name}</a>}
             {    <span class=invalidmenu 
           title="@label{menu.@q{@name}verbose}">@label{menu.@name}</span>}}
 
+@# Icon-based menu entry (very similar to @menuitem)
+@#  Used by @stdmenu
+@#  @current is the name of the current page
+@#  @name is the name of the menu item
+@#  @available is true if the menu item is available, else false
+@#  @icon is the name of the icon
+@#  
+@define {menuicon} {current name available icon}  
+        {@if{@available}
+            {    <a class=menuicon
+       href="@menuurl{@name}">
+     <img @if{@eq{@current}{@name}}
+             {class=activemenu}
+             {class=inactivemenu}
+          title="@label{menu.@q{@name}verbose}"
+          alt="@label{menu.@name}"
+          src="@image{@icon}">
+    </a>}
+            {    <span class=menuicon>
+     <img @if{@eq{@current}{@name}}
+             {class=activemenu}
+             {class=inactivemenu}
+          title="@label{menu.@q{@name}verbose}"
+          alt="@label{menu.@name}"
+          src="@image{@icon@_inactive}">
+    </a>}}
 
 @# Standard footer text
 @define {credits} {}