source: trunk/gsdl/macros/style.dm@ 11142

Last change on this file since 11142 was 11117, checked in by jrm21, 18 years ago

In the language files, renamed the _tabtext*_ macros to be called _label*_.
The new nav_css.dm macro file re-defines the _tabtext*_ macros and some of
the macros from base.dm/style.dm/home.dm to do with the navigation bar
and the home/help/preferences links have also been moved into nav_css.dm

A separate nav_ns4.dm macro (not committed here) exists that can be used
instead of nav_css.dm and uses the old behaviour of the roll-over images
for the navigation bar.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 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_
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# any declarations relating to CSS that should go in the html head part.
55# declarations containing images are done here so the path is correct
56# at runtime.
57_cssheader_ {<style>
58body.bgimage \{ background-image: url("_httpimg_/chalk.gif"); \}
59div.navbar \{ background-image: url("_httpimg_/bg_green.png"); \}
60div.divbar \{ background-image: url("_httpimg_/bg_green.png"); \}
61span.navlink \{ background-image: url("_httpimg_/bg_off.png"); \}
62span.navlink_sel \{ background-image: url("_httpimg_/bg_green.png"); \}
63span.navlink:hover \{ background-image: url("_httpimg_/bg_on.png"); \}
64</style>
65
66<link rel="stylesheet" href="_cssfilelink_" type="text/css"
67 title="Greenstone Style" charset="UTF-8">
68<link rel="alternate stylesheet" href="_httpimg_/style-print.css"
69 type="text/css" title="Printer" charset="UTF-8" media="print, screen">
70<link rel="stylesheet" href="_httpimg_/style-print.css" type="text/css"
71 title="Printer" charset="UTF-8" media="print">
72}
73
74# separate macro so it can be easily overridden for customised collections
75_cssfilelink_ {_httpimg_/style.css}
76
77# htmlhead uses:
78# _1_ - extra parameters for the body tag
79# _pagetitle_
80# _globalscripts_
81_htmlhead_ {<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
82
83<html_htmlextra_>
84<head>
85<title>_pagetitle_</title>
86_globalscripts_
87_cssheader_
88</head>
89
90<body _1_>
91}
92
93
94_spacerwidth_ {65}
95
96# _startspacer_ is a spacer that gives pages a left-hand margin.
97# It must eventually be closed by _endspacer_.
98_startspacer_ {
99<div id="page">
100}
101
102
103_pagebanner_ {
104<!-- page banner (\_style:pagebanner\_) -->
105<div id="banner">
106<div class="pageinfo">
107<p class="bannerlinks">_globallinks_</p>
108<p class="bannerimage">_imagethispage_</p>
109</div>
110<div class="collectimage">_imagecollection_</div>
111</div>
112<div class="bannerextra">_pagebannerextra_</div>
113<!-- end of page banner -->
114}
115
116_pagebanner_[v=1] {
117<!-- page banner - text version [v=1] (\_style:pagebanner\_) -->
118<center><h2><b><u>_imagecollection_</u></b></h2></center><p>
119_globallinks_
120_pagebannerextra_
121<p>
122<!-- end of page banner -->
123}
124
125# note we no longer close off one of the startspacer tables here!!
126_footer_ {
127<!-- page footer (\_style:footer\_) -->
128_pagefooterextra__endspacer__htmlfooter_
129}
130
131# v=1 footer: not using startspacer in the header, so dont put it in the footer
132_footer_ [v=1]{
133<!-- page footer [v=1] (\_style:footer\_) -->
134_pagefooterextra_
135_htmlfooter_
136}
137
138# close off anything opened by startspacer
139_endspacer_ {
140</div>
141}
142
143
144_htmlfooter_ {
145</body>
146</html>
147}
148
149# imagescript only used in nav_ns4.dm
150
151_globalscripts_{
152<script language="javascript" type="text/javascript">
153_If_(_pagescriptextra_,_pagescriptextra_)
154_imagescript_
155</script>
156
157}
158
159_globalscripts_ [v=1] {
160<script language="javascript" type="text/javascript">
161<!--
162_If_(_cgiargx_,_scriptdetach_)
163_pagescriptextra_
164// -->
165</script>
166}
167
168_scriptdetach_ {
169 function close\_detach() \{
170 close();
171 \}
172}
Note: See TracBrowser for help on using the repository browser.