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

Last change on this file since 548 was 548, checked in by sjboddie, 25 years ago

* empty log message *

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