source: main/branches/64_bit_Greenstone/greenstone2/macros/nav_css.dm@ 23523

Last change on this file since 23523 was 23523, checked in by sjm84, 13 years ago

Merging the latest trunk changes into this branch

  • Property svn:keywords set to Author Date Id Revision
File size: 4.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__optloginlink_}
17_homelink_ {_navtaborig_(_httppagehome_,_linktextHOME_,_textdescrhome_)}
18_helplink_ {_navtaborig_(_httppagehelp_,_linktextHELP_,_textdescrhelp_)}
19_preflink_ {_navtaborig_(_httppagepref_,_linktextPREFERENCES_,_textdescrpref_)}
20
21_optloginlink_ {
22 _If_("_activateweb20_" >= "1",_If_("x_cgiargun__cgiarguan_" ne "x1",_loginlink_))
23}
24
25_loginlink_ {
26
27 _If_(_cgiargun_,
28 _navtablogoutorig_(_linktextLOGOUT_,_textdescrlogout_) _linktextLOGGEDIN_
29 <script type="text/javascript">
30 appendUsernameArgs("logout","uan=&un=")
31 </script>
32 ,
33 _navtabloginorig_(_linktextLOGIN_,_textdescrlogin_)
34 <script type="text/javascript">
35 appendUsernameArgs("login","uan=1")
36 </script>
37 )
38}
39
40
41# The following is useful if collection specific macro. Override
42# _optnavigationbar_ to be empty if you don't want the navigation bar to
43# appear in the standard place, and then specify _navigationbar_ elsewhere
44# in a collection specific macro file(s) to be where you do want it.
45_optnavigationbar_{
46<div class="navbar">
47<p class="navbar">
48_navigationbar_
49</p>
50</div>
51}
52
53_starthighlight_ {<span class="highlight">}
54_endhighlight_ {</span>}
55
56# parameters are:
57# 1. the url to go to when clicked
58# 2. the name of the tab
59# 3. alt/title explanatory text
60# 4. optional "selected" or not if it is the current tab
61_navtaborig_ {<a _If_("_4_" eq "selected",class="navlink_sel">_2_,class="navlink" href="_1_" title="_3_">_2_)</a>}
62
63# same sa above, but without _1_ as there is no hyperlink to go to (want to say on the same page)
64_navtabloginorig_ {<a _If_("_3_" eq "selected",class="navlink_sel postit">_1_,class="navlink postit" id="login" href="" title="_2_">_1_)</a>}
65
66# same sa above, but without _1_ as there is no hyperlink to go to (want to say on the same page)
67_navtablogoutorig_ {<a _If_("_3_" eq "selected",class="navlink_sel postit">_1_,class="navlink postit" id="logout" href="" title="_2_">_1_)</a>}
68
69# parameters are
70# 1. The url to go to when clicked
71# 2. The metadata name - this gets used to determine the title and alt text
72# 3. optional "selected" if it is the current tab
73_navtab_ {<a _If_("_3_" eq "selected",class="navlink_sel">_navlinktitle_(_2_),class="navlink" href="_1_" title="_navlinkalt_(_2_)">_navlinktitle_(_2_))</a>}
74
75
76#######################################################################
77# navigation bar images
78#
79#######################################################################
80
81# the spacer image - the width of this is calculated and set from server.
82#
83# Its height is now explicity set to 1 to avoid width x height "scaling
84# problem". Given that spacer.gif's natural dimensions are 40x4 pixels,
85# left uncontrolled, when the image is stretched through _widthtspace_ to
86# a width of say 400 (as happens when there are only two items in the
87# navigation bar) then its height becomes 40 pixels, making the navbar
88# twice as high as the text in it, and quite ugly looking
89
90_navbarspacer_ {<img src="_httpimg_/spacer.gif" height="1" width="_widthtspace_" />}
91
92_navbarspacer_[v=1] {<br>
93}
94
95# cgiargu means "static page", so no search link should be shown
96_navtabsearch_ {_If_("_cgiargu_" ne "1",_navtab_(_httpquery_,Search,_1_))}
97
98package about
99
100_imagethispage_ {_titleabout_}
101
102package query
103
104_imagethispage_ {_labelSearch_}
105
106
107package Style
108
109_imagescript_ {}
110
111#_bannertitle_ {_If_(_imagethispage_,<p class="bannertitle"><span class="bannertitle">_imagethispage_</span></p>)}
112
113_bannertitle_ {_If_(_imagethispage_,<p class="bannertitle">_imagethispage_</p>)}
114
115#<span class="bannertitlebackground">i</span>
116
117package home
118
119_preflink_ {_navtaborig_(_home:httppagehomepref_,_linktextPREFERENCES_,_textdescrpref_)}
120
Note: See TracBrowser for help on using the repository browser.