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

Last change on this file since 16302 was 16302, checked in by davidb, 16 years ago

spacer.gif height fixed to 1 to avoid an ugly navigation bar background twice the height of the text in it when there was only 1 or two items in the nav-bar. This was caused by scaling spacer.gif to the required width without contraining its height which also grew proportionally.

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