source: gsdl/trunk/macros/nav_css.dm@ 20611

Last change on this file since 20611 was 20611, checked in by kjdon, 15 years ago

put optgloballinks into style.dm or it doesn't work properly on the home page

  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1# this file must be UTF-8 encoded
2
3# This macro file contains the definitions required for making the
4# navigation bar presentation controlled by the CSS file.
5
6#######################################################################
7# GLOBAL MACROS
8#######################################################################
9
10package Global
11
12#######################################################################
13# global navigation links
14#######################################################################
15
16_globallinks_ {_If_("_cgiargu_" ne "1",_homelink_) _helplink_ _preflink_}
17_homelink_ {_navtaborig_(_httppagehome_,_linktextHOME_,_textdescrhome_)}
18_helplink_ {_navtaborig_(_httppagehelp_,_linktextHELP_,_textdescrhelp_)}
19_preflink_ {_navtaborig_(_httppagepref_,_linktextPREFERENCES_,_textdescrpref_)}
20
21
22# The following is useful if collection specific macro. Override
23# _optnavigationbar_ to be empty if you don't want the navigation bar to
24# appear in the standard place, and then specify _navigationbar_ elsewhere
25# in a collection specific macro file(s) to be where you do want it.
26_optnavigationbar_{
27<div class="navbar">
28<p class="navbar">
29_navigationbar_
30</p>
31</div>
32}
33
34_starthighlight_ {<span class="highlight">}
35_endhighlight_ {</span>}
36
37# parameters are:
38# 1. the url to go to when clicked
39# 2. the name of the tab
40# 3. alt/title explanatory text
41# 4. optional "selected" or not if it is the current tab
42_navtaborig_ {<a _If_("_4_" eq "selected",class="navlink_sel">_2_,class="navlink" href="_1_" title="_3_">_2_)</a>}
43
44# parameters are
45# 1. The url to go to when clicked
46# 2. The metadata name - this gets used to determine the title and alt text
47# 3. optional "selected" if it is the current tab
48_navtab_ {<a _If_("_3_" eq "selected",class="navlink_sel">_navlinktitle_(_2_),class="navlink" href="_1_" title="_navlinkalt_(_2_)">_navlinktitle_(_2_))</a>}
49
50
51#######################################################################
52# navigation bar images
53#
54#######################################################################
55
56# the spacer image - the width of this is calculated and set from server.
57#
58# Its height is now explicity set to 1 to avoid width x height "scaling
59# problem". Given that spacer.gif's natural dimensions are 40x4 pixels,
60# left uncontrolled, when the image is stretched through _widthtspace_ to
61# a width of say 400 (as happens when there are only two items in the
62# navigation bar) then its height becomes 40 pixels, making the navbar
63# twice as high as the text in it, and quite ugly looking
64
65_navbarspacer_ {<img src="_httpimg_/spacer.gif" height="1" width="_widthtspace_" />}
66
67_navbarspacer_[v=1] {<br>
68}
69
70# cgiargu means "static page", so no search link should be shown
71_navtabsearch_ {_If_("_cgiargu_" ne "1",_navtab_(_httpquery_,Search,_1_))}
72
73package about
74
75_imagethispage_ {_titleabout_}
76
77package query
78
79_imagethispage_ {_labelSearch_}
80
81
82package Style
83
84_imagescript_ {}
85
86#_bannertitle_ {_If_(_imagethispage_,<p class="bannertitle"><span class="bannertitle">_imagethispage_</span></p>)}
87
88_bannertitle_ {_If_(_imagethispage_,<p class="bannertitle">_imagethispage_</p>)}
89
90#<span class="bannertitlebackground">i</span>
91
92package home
93
94_preflink_ {_navtaborig_(_home:httppagehomepref_,_linktextPREFERENCES_,_textdescrpref_)}
95
Note: See TracBrowser for help on using the repository browser.