source: main/tags/2.70w/gsdl/macros/style.dm@ 25583

Last change on this file since 25583 was 11830, checked in by kjdon, 18 years ago

removed span.navlink bits from cssheader

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1# this file must be UTF-8 encoded
2#######################################################################
3# PAGE STYLES
4#######################################################################
5
6package Style
7
8# to use this style system output
9# _header_
10# all your page content, then
11# _footer_
12
13# use the page parameter 'style' to choose the appropriate style
14
15# the style system uses
16# _pagetitle_ - what gets displayed at the top of the browser window
17# _pagescriptextra_ - any extra javascript you want included in the header
18# _pagebannerextra_ - anything extra you want displayed in the page banner
19# _pagefooterextra_ - anything extra you want displayed in the footer
20
21# defaults for the above macros
22_pagetitle_ {_collectionname_}
23_pagescriptextra_ {}
24_pagebannerextra_ {}
25_pagefooterextra_ {}
26
27# it also relies on lots of Globals, the most important of these are:
28# _cookie_ - put in the cgi header
29# _globalscripts_ - javascript stuff
30# _imagecollection_
31# _imagehome_
32# _imagehelp_
33# _imagepref_
34# _imagethispage_ (this is now not an image, but text. should be renamed?)
35# _linkotherversion_
36
37# _httpiconchalk_ - the image down the left of the page - is now done
38# by the style sheet.
39
40_header_ {_cgihead_
41_htmlhead_(class="bgimage")_startspacer__pagebanner_
42}
43
44_header_[v=1] {_cgihead_
45_htmlhead__pagebanner_
46}
47
48# _cgihead_ {Content-type: text/html
49# _cookie_
50#
51# }
52_cgihead_{}
53
54# may be set in collection's extra.dm
55_collectionspecificstyle_ {}
56
57# any declarations relating to CSS that should go in the html head part.
58# declarations containing images are done here so the path is correct
59# at runtime.
60_cssheader_ {
61<link rel="stylesheet" href="_cssfilelink_" type="text/css"
62 title="Greenstone Style" charset="UTF-8">
63<link rel="alternate stylesheet" href="_httpimg_/style-print.css"
64 type="text/css" title="Printer" charset="UTF-8" media="print, screen">
65<link rel="stylesheet" href="_httpimg_/style-print.css" type="text/css"
66 title="Printer" charset="UTF-8" media="print">
67
68<style type="text/css">
69body.bgimage \{ background-image: url("_httpimg_/chalk.gif"); \}
70div.navbar \{ background-image: url("_httpimg_/bg_green.png"); \}
71div.divbar \{ background-image: url("_httpimg_/bg_green.png"); \}
72a.navlink \{ background-image: url("_httpimg_/bg_off.png"); \}
73a.navlink_sel \{ background-image: url("_httpimg_/bg_green.png"); \}
74a.navlink:hover \{ background-image: url("_httpimg_/bg_on.png"); \}
75p.bannertitle \{background-image: url("_httpimg_/banner_bg.png"); \}
76p.collectiontitle \{background-image: url("_httpimg_/banner_bg.png"); \}
77</style>
78_collectionspecificstyle_
79
80}
81
82# separate macro so it can be easily overridden for customised collections
83_cssfilelink_ {_httpimg_/style.css}
84
85# htmlhead uses:
86# _1_ - extra parameters for the body tag
87# _pagetitle_
88# _globalscripts_
89_htmlhead_ {<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
90
91<html_htmlextra_>
92<head>
93<title>_pagetitle_</title>
94_globalscripts_
95_cssheader_
96</head>
97
98<body _1_>
99}
100
101
102_spacerwidth_ {65}
103
104# _startspacer_ is a spacer that gives pages a left-hand margin.
105# It must eventually be closed by _endspacer_.
106_startspacer_ {
107<div id="page">
108}
109
110# _bannertitle_ is defined in nav_css/ns4.dm, and is either text or
111# a banner image
112_pagebanner_ {
113<!-- page banner (\_style:pagebanner\_) -->
114<div id="banner">
115<div class="pageinfo">
116<p class="bannerlinks">_globallinks_</p>
117_bannertitle_
118</div>
119<div class="collectimage">_imagecollection_</div>
120</div>
121<div class="bannerextra">_pagebannerextra_</div>
122<!-- end of page banner -->
123}
124
125_pagebanner_[v=1] {
126<!-- page banner - text version [v=1] (\_style:pagebanner\_) -->
127<center><h2><b><u>_imagecollection_</u></b></h2></center><p>
128_globallinks_
129_pagebannerextra_
130<p>
131<!-- end of page banner -->
132}
133
134# note we no longer close off one of the startspacer tables here!!
135_footer_ {
136<!-- page footer (\_style:footer\_) -->
137_pagefooterextra__endspacer__htmlfooter_
138}
139
140# v=1 footer: not using startspacer in the header, so dont put it in the footer
141_footer_ [v=1]{
142<!-- page footer [v=1] (\_style:footer\_) -->
143_pagefooterextra_
144_htmlfooter_
145}
146
147# close off anything opened by startspacer
148_endspacer_ {
149</div> <!-- id=page -->
150}
151
152
153_htmlfooter_ {
154</body>
155</html>
156}
157
158# imagescript only used in nav_ns4.dm
159_globalscripts_{
160<script language="javascript" type="text/javascript">
161_If_(_pagescriptextra_,_pagescriptextra_)
162_imagescript_
163</script>
164}
165
166_globalscripts_ [v=1] {
167<script language="javascript" type="text/javascript">
168<!--
169_If_(_cgiargx_,_scriptdetach_)
170_pagescriptextra_
171// -->
172</script>
173}
174
175_scriptdetach_ {
176 function close\_detach() \{
177 close();
178 \}
179}
Note: See TracBrowser for help on using the repository browser.