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

Last change on this file since 20603 was 20316, checked in by davidb, 15 years ago

introduction of _optgloballinks_, similar to _optnavigationbar_, to allow optional placement of this structural element

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