source: main/tags/2.51-jcdl/gsdl/macros/style.dm@ 25200

Last change on this file since 25200 was 7343, checked in by jrm21, 20 years ago

added a comment at the start of all macro files about using UTF-8

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 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# _startspacer_ is a spacer to get past the 10010 graphic. It contains two open
69# <table> tag which must eventually be closed by _endspacer_.
70_startspacer_ {
71<table border=0 cellspacing=0 cellpadding=0 width="100%">
72<tr><td valign=top width=65><img src="_httpimg_/spacer.gif" width="65" height="1" alt="" border="0"></td>
73<td><center><table width="_pagewidth_"><tr><td>
74}
75
76
77# pagebanner uses :
78# _imagecollection_
79# _imagehome_
80# _imagehelp_
81# _imagepref_
82# _imagethispage_
83# _pagebannerextra_
84_pagebanner_ {
85<!-- page banner (\_style:pagebanner\_) -->
86<center>
87<table width=_pagewidth_ cellspacing=0 cellpadding=0>
88 <tr valign=top>
89 <td rowspan=2 align=left>_imagecollection_</td>
90 <td align=right>_javalinks_</td>
91 </tr>
92
93 <tr>
94 <td align=right>_imagethispage_</td>
95 </tr>
96
97 <tr>
98 <td colspan=2>_pagebannerextra_</td>
99 </tr>
100</table>
101</center>
102<!-- end of page banner -->
103}
104
105_pagebanner_[v=1] {
106<!-- page banner - text version [v=1] (\_style:pagebanner\_) -->
107<center><h2><b><u>_imagecollection_</u></b></h2></center><p>
108_javalinks_
109_pagebannerextra_
110<p>
111<!-- end of page banner -->
112}
113
114# note we no longer close off one of the startspacer tables here!!
115_footer_ {
116<!-- page footer (\_style:footer\_) -->
117_pagefooterextra_
118_endspacer__htmlfooter_
119}
120
121# v=1 footer: not using startspacer in the header, so dont put it in the footer
122_footer_ [v=1]{
123<!-- page footer [v=1] (\_style:footer\_) -->
124_pagefooterextra_
125_htmlfooter_
126}
127
128# close off the tables opened by endspacer - note we close off both tables here
129_endspacer_ {
130</td></tr></table></center>
131</td></tr></table>
132}
133
134_htmlfooter_ {
135</body>
136</html>
137}
138
139_globalscripts_{
140<script>
141<!--
142_imagescript_
143_pagescriptextra_
144_usabilityscript_
145// -->
146</script>
147}
148
149_globalscripts_ [v=1] {
150<script>
151<!--
152_If_(_cgiargx_,_scriptdetach_)
153_pagescriptextra_
154// -->
155</script>
156}
157
158_scriptdetach_ {
159 function close\_detach() \{
160 close();
161 \}
162}
Note: See TracBrowser for help on using the repository browser.