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

Last change on this file since 9333 was 9333, checked in by davidb, 19 years ago

spacewidth macro introduced to be able to control left-hand margin used
in pages.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.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# _httpiconchalk_ - the image down the left of the page
31# _imagecollection_
32# _imagehome_
33# _imagehelp_
34# _imagepref_
35# _imagethispage_
36# _linkotherversion_
37
38_header_ {_cgihead_
39_htmlhead_(background="_httpiconchalk_")_startspacer__pagebanner_
40}
41
42_header_[v=1] {_cgihead_
43_htmlhead__pagebanner_
44}
45
46# _cgihead_ {Content-type: text/html
47# _cookie_
48#
49# }
50_cgihead_{}
51
52# htmlhead uses:
53# _1_ - extra parameters for the body tag
54# _pagetitle_
55# _globalscripts_
56_htmlhead_ {
57<html_htmlextra_>
58<head>
59<title>_pagetitle_</title>
60_globalscripts_
61</head>
62
63<body bgcolor="\#ffffff" text="\#000000" link="\#006666"
64 alink="\#cc9900" vlink="\#666633" _1_>
65}
66
67
68_spacerwidth_ {65}
69
70# _startspacer_ is a spacer that gives pages a left-hand margin.
71# It contains two open <table> tag which must eventually be closed
72# by _endspacer_.
73_startspacer_ {
74<table border=0 cellspacing=0 cellpadding=0 width="100%">
75<tr><td valign=top width=_spacerwidth_><img src="_httpimg_/spacer.gif" width="_spacerwidth_" height="1" alt="" border="0"></td>
76<td><center><table width="_pagewidth_"><tr><td>
77}
78
79
80# pagebanner uses :
81# _imagecollection_
82# _imagehome_
83# _imagehelp_
84# _imagepref_
85# _imagethispage_
86# _pagebannerextra_
87_pagebanner_ {
88<!-- page banner (\_style:pagebanner\_) -->
89<center>
90<table width=_pagewidth_ cellspacing=0 cellpadding=0>
91 <tr valign=top>
92 <td rowspan=2 align=left>_imagecollection_</td>
93 <td align=right>_javalinks_</td>
94 </tr>
95
96 <tr>
97 <td align=right>_imagethispage_</td>
98 </tr>
99
100 <tr>
101 <td colspan=2>_pagebannerextra_</td>
102 </tr>
103</table>
104</center>
105<!-- end of page banner -->
106}
107
108_pagebanner_[v=1] {
109<!-- page banner - text version [v=1] (\_style:pagebanner\_) -->
110<center><h2><b><u>_imagecollection_</u></b></h2></center><p>
111_javalinks_
112_pagebannerextra_
113<p>
114<!-- end of page banner -->
115}
116
117# note we no longer close off one of the startspacer tables here!!
118_footer_ {
119<!-- page footer (\_style:footer\_) -->
120_pagefooterextra_
121_endspacer__htmlfooter_
122}
123
124# v=1 footer: not using startspacer in the header, so dont put it in the footer
125_footer_ [v=1]{
126<!-- page footer [v=1] (\_style:footer\_) -->
127_pagefooterextra_
128_htmlfooter_
129}
130
131# close off the tables opened by endspacer - note we close off both tables here
132_endspacer_ {
133</td></tr></table></center>
134</td></tr></table>
135}
136
137_htmlfooter_ {
138</body>
139</html>
140}
141
142_globalscripts_{
143<script>
144<!--
145_imagescript_
146_pagescriptextra_
147_usabilityscript_
148// -->
149</script>
150}
151
152_globalscripts_ [v=1] {
153<script>
154<!--
155_If_(_cgiargx_,_scriptdetach_)
156_pagescriptextra_
157// -->
158</script>
159}
160
161_scriptdetach_ {
162 function close\_detach() \{
163 close();
164 \}
165}
Note: See TracBrowser for help on using the repository browser.