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

Last change on this file since 5517 was 4830, checked in by kjdon, 21 years ago

startspacer was opening two tables, endspacer was only closing one, and footer was closing the second one before calling endspacer. so I have put the two end table tags into endspacer, and not in footer.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1#######################################################################
2# PAGE STYLES
3#######################################################################
4
5package Style
6
7# to use this style system output
8# _header_
9# all your page content, then
10# _footer_
11
12# use the page parameter 'style' to choose the appropriate style
13
14# the style system uses
15# _pagetitle_ - what gets displayed at the top of the browser window
16# _pagescriptextra_ - any extra javascript you want included in the header
17# _pagebannerextra_ - anything extra you want displayed in the page banner
18# _pagefooterextra_ - anything extra you want displayed in the footer
19
20# defaults for the above macros
21_pagetitle_ {_collectionname_}
22_pagescriptextra_ {}
23_pagebannerextra_ {}
24_pagefooterextra_ {}
25
26# it also relies on lots of Globals, the most important of these are:
27# _cookie_ - put in the cgi header
28# _globalscripts_ - javascript stuff
29# _httpiconchalk_ - the image down the left of the page
30# _imagecollection_
31# _imagehome_
32# _imagehelp_
33# _imagepref_
34# _imagethispage_
35# _linkotherversion_
36
37_header_ {_cgihead_
38_htmlhead_(background="_httpiconchalk_")_startspacer__pagebanner_
39}
40
41_header_[v=1] {_cgihead_
42_htmlhead__pagebanner_
43}
44
45# _cgihead_ {Content-type: text/html
46# _cookie_
47#
48# }
49_cgihead_{}
50
51# htmlhead uses:
52# _1_ - extra parameters for the body tag
53# _pagetitle_
54# _globalscripts_
55_htmlhead_ {
56<html_htmlextra_>
57<head>
58<title>_pagetitle_</title>
59_globalscripts_
60</head>
61
62<body bgcolor="\#ffffff" text="\#000000" link="\#006666"
63 alink="\#cc9900" vlink="\#666633"_1_>
64}
65
66
67# _startspacer_ is a spacer to get past the 10010 graphic. It contains two open
68# <table> tag which must eventually be closed by _endspacer_.
69_startspacer_ {
70<table border=0 cellspacing=0 cellpadding=0 width="100%">
71<tr><td valign=top width=65><img src="_httpimg_/spacer.gif" width="65" height="1" alt="" border="0"></td>
72<td><center><table width="_pagewidth_"><tr><td>
73}
74
75
76# pagebanner uses :
77# _imagecollection_
78# _imagehome_
79# _imagehelp_
80# _imagepref_
81# _imagethispage_
82# _pagebannerextra_
83_pagebanner_ {
84<!-- page banner (\_style:pagebanner\_) -->
85<center>
86<table width=_pagewidth_ cellspacing=0 cellpadding=0>
87 <tr valign=top>
88 <td rowspan=2 align=left>_imagecollection_</td>
89 <td align=right>_javalinks_</td>
90 </tr>
91
92 <tr>
93 <td align=right>_imagethispage_</td>
94 </tr>
95
96 <tr>
97 <td colspan=2>_pagebannerextra_</td>
98 </tr>
99</table>
100</center>
101<!-- end of page banner -->
102}
103
104_pagebanner_[v=1] {
105<!-- page banner - text version [v=1] (\_style:pagebanner\_) -->
106<center><h2><b><u>_imagecollection_</u></b></h2></center><p>
107_javalinks_
108_pagebannerextra_
109<p>
110<!-- end of page banner -->
111}
112
113# note we no longer close off one of the startspacer tables here!!
114_footer_ {
115<!-- page footer (\_style:footer\_) -->
116_pagefooterextra_
117_endspacer__htmlfooter_
118}
119
120# v=1 footer: not using startspacer in the header, so dont put it in the footer
121_footer_ [v=1]{
122<!-- page footer [v=1] (\_style:footer\_) -->
123_pagefooterextra_
124_htmlfooter_
125}
126
127# close off the tables opened by endspacer - note we close off both tables here
128_endspacer_ {
129</td></tr></table></center>
130</td></tr></table>
131}
132
133_htmlfooter_ {
134</body>
135</html>
136}
137
138_globalscripts_{
139<script>
140<!--
141_imagescript_
142_pagescriptextra_
143_usabilityscript_
144// -->
145</script>
146}
147
148_globalscripts_ [v=1] {
149<script>
150<!--
151_If_(_cgiargx_,_scriptdetach_)
152_pagescriptextra_
153// -->
154</script>
155}
156
157_scriptdetach_ {
158 function close\_detach() \{
159 close();
160 \}
161}
Note: See TracBrowser for help on using the repository browser.