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

Last change on this file since 876 was 876, checked in by sjboddie, 24 years ago

lots of changes - including separating out all language strings
into separate files.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 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 an 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="80%"><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_footer_ {
114<!-- page footer (\_style:footer\_) -->
115_pagefooterextra_
116</table>
117_endspacer__htmlfooter_
118}
119
120_endspacer_ {</center>
121</td></tr></table>
122}
123
124_htmlfooter_ {
125</body>
126</html>
127}
128
129_globalscripts_{
130<script>
131<!--
132 function img\_on(imgName) \{
133 if (version == "n3") \{
134 imgOn = eval(imgName + "\_on.src");
135 document [imgName].src = imgOn;
136 \}
137 \}
138
139 function img\_off(imgName) \{
140 if (version == "n3") \{
141 imgOff = eval(imgName + "\_off.src");
142 document [imgName].src = imgOff;
143 \}
144 \}
145 _If_(_cgiargx_,_scriptdetach_)
146 browserName = navigator.appName;
147 browserVer = parseInt(navigator.appVersion);
148 if ((browserName == "Netscape" || browserName == "Microsoft Internet Explorer")
149 && browserVer >= 3) version = "n3";
150 else version = "n2";
151
152 if (version == "n3") \{
153 _javaimagesheader_
154 _javaimagesnavbar_
155 _javaimagescontent_
156 \}
157 _pagescriptextra_
158// -->
159</script>
160}
161
162_globalscripts_ [v=1] {
163<script>
164<!--
165_If_(_cgiargx_,_scriptdetach_)
166_pagescriptextra_
167// -->
168</script>
169}
170
171_scriptdetach_ {
172 function close\_detach() \{
173 close();
174 \}
175}
176
177
178
179
180
181
Note: See TracBrowser for help on using the repository browser.