source: trunk/gsdl/macros/base.dm@ 128

Last change on this file since 128 was 128, checked in by rjmcnab, 25 years ago

Moved from collection's directory.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 18.5 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# _pagebannerextra_ - anything extra you want displayed in the page banner
17# _pagefooterextra_ - anything extra you want displayed in the footer
18
19# defaults for the above macros
20_pagetitle_ {_collectionname_}
21_pagebannerextra_ {}
22_pagefooterextra_ {}
23
24# it also relies on lots of Globals, the most important of these are:
25# _cookie_ - put in the cgi header
26# _globalscripts_ - javascript stuff
27# _httpiconsidestripe_ - the image down the left of the page
28# _imagecollection_
29# _imagehome_
30# _imagehelp_
31# _imagepref_
32# _imagethispage_
33# _linkotherversion_
34
35_header_ {_cgihead_
36_htmlhead_('background="_httpiconsidestripe_"')_startspacer__pagebanner_
37}
38
39# this declaration ends up being the same as style=restrict, never mind
40_header_[version=text] {_cgihead_
41_htmlhead__pagebanner_
42}
43
44# style=restrict lacks the sidestripe, version links and
45# language links
46_header_[style=restrict] {_cgihead_
47_htmlhead__pagebanner_
48}
49
50
51# _cgihead_ {Content-type: text/html
52# _cookie_
53#
54# }
55_cgihead_{}
56
57
58# htmlhead uses:
59# _1_ - extra parameters for the body tag
60# _pagetitle_
61# _globalscripts_
62_htmlhead_ {
63<html>
64<head>
65<title>_pagetitle_</title>
66_globalscripts_
67
68</head>
69<body bgcolor="\#ffffff" text="\#000000" link="\#006666"
70 alink="\#cc9900" vlink="\#666633" _1_>
71}
72
73
74# _startspacer_ is a spacer to get past the 10010 graphic. It contains an open
75# <table> tag which must eventually be closed by _endspacer_.
76_startspacer_ {
77<table border=0 cellspacing=0 cellpadding=0 width="100%">
78<tr><td valign=top width=65><img src="_httpimg_/spacer.gif" width="65" height="1" alt="" border="0"></td>
79<td><center><table width="80%"><tr><td>
80}
81
82
83# pagebanner uses :
84# _imagecollection_
85# _imagehome_
86# _imagehelp_
87# _imagepref_
88# _imagethispage_
89# _pagebannerextra_
90_pagebanner_ {
91<center>
92<table width="537" cellspacing=0 cellpadding=0>
93 <tr valign=top>
94 <td rowspan=2 _alignleft_>_imagecollection_</td>
95 <td _alignright_>_imagehome__imagehelp__imagepref_</td>
96 </tr>
97
98 <tr>
99 <td _alignright_>_imagethispage_</td>
100 </tr>
101
102 <tr>
103 <td colspan=2>_pagebannerextra_</td>
104 </tr>
105</table>
106</center>
107}
108
109_pagebanner_[version=text] {
110<_font_>
111<center><h2><b><u>_imagecollection_</u></b></h2></center><p>
112_imagehome_<br>
113_imagehelp_<br>
114_imagepref_<br>
115_pagebannerextra_
116</font>
117<p>
118}
119
120
121
122# note that _pagefooter_ is for individual pages
123_footer_ {
124<p>
125<_font_>
126_pagefooterextra_
127<center><i>_linkotherversion_</i></center>
128</font>
129</table>
130_endspacer__htmlfooter_
131}
132
133
134_footer_[style=restrict] {_pagefooterextra_
135_htmlfooter_
136}
137
138_footer_[style=htmlonly] {_pagefooterextra_
139_endspacer__htmlfooter_
140}
141
142_endspacer_ {
143</td></tr></table>
144</center>
145</td></tr>
146</table>
147}
148
149_htmlfooter_ {
150</body>
151</html>
152}
153
154
155# _alignleft_ and _alignright_ are overriden for right-to-left
156# writing systems
157_alignleft_ {align=left}
158_alignright_ {align=right}
159
160#_smallfont_ {font face="Arial,Helvetica,Times" size="-2"}
161#_font_ {font face="Arial,Helvetica,Times" size="-1"}
162_font_ {font}
163_smallfont_ {font size="-1"}
164
165#################
166# GLOBAL MACROS #
167#################
168
169package Global
170
171
172######################################################
173
174_content_ {<center><blink><b><font size="7" color="#FF0000">UNDEFINED PAGE</font></b></blink></center>}
175_imagethispage_ {}
176
177_globalscripts_{
178<script>
179<!--
180 function img\_on(imgName) \{
181 if (version == "n3") \{
182 imgOn = eval(imgName + "\_on.src");
183 document [imgName].src = imgOn;
184 \}
185 \}
186
187 function img\_off(imgName) \{
188 if (version == "n3") \{
189 imgOff = eval(imgName + "\_off.src");
190 document [imgName].src = imgOff;
191 \}
192 \}
193
194 browserName = navigator.appName;
195 browserVer = parseInt(navigator.appVersion);
196 if ((browserName == "Netscape" || browserName == "Microsoft Internet Explorer")
197 && browserVer >= 3) version = "n3";
198 else version = "n2";
199
200 if (version == "n3") \{
201 home\_on = new Image(_homewidth_, 20);
202 home\_on.src = "_httpiconhomeon_";
203 help\_on = new Image(_helpwidth_, 20);
204 help\_on.src = "_httpiconhelpon_";
205 pref\_on = new Image(_prefwidth_, 20);
206 pref\_on.src = "_httpiconprefon_";
207 search\_on = new Image(87, 17);
208 search\_on.src = "_httpiconsearchon_";
209 titles\_on = new Image(87, 17);
210 titles\_on.src = "_httpicontitleson_";
211 authors\_on = new Image(110, 17);
212 authors\_on.src = "_httpiconauthorson_";
213
214 home\_off = new Image(_homewidth_, 20);
215 home\_off.src = "_httpiconhomeoff_";
216 help\_off = new Image(_helpwidth_, 20);
217 help\_off.src = "_httpiconhelpoff_";
218 pref\_off = new Image(_prefwidth_, 20);
219 pref\_off.src = "_httpiconprefoff_";
220 search\_off = new Image(87, 17);
221 search\_off.src = "_httpiconsearchoff_";
222 titles\_off = new Image(87, 17);
223 titles\_off.src = "_httpicontitlesoff_";
224 authors\_off = new Image(110, 17);
225 authors\_off.src = "_httpiconauthorsoff_";
226 \}
227// -->
228</script>
229}
230
231
232############################################################################
233# Macros whose values are set from within the server at runtime. These are #
234# here only for reference and to set default values if required. #
235############################################################################
236
237_gwcgi_ {http://nowhere.nzdl.org/cgi-bin/gw}
238_httpprefix_ {http://nowhere.nzdl.org}
239
240_cookie_ {}
241
242_collection_ {}
243_compressedoptions_ {}
244_querystring_ {}
245_urlsafequerystring_ {}
246_notdetached_ {0}
247_istitle_ {0}
248
249######################
250# general web macros #
251######################
252
253_mailaddr_ {[email protected]}
254
255
256###############
257# link macros #
258###############
259
260_g_ {00} # default
261
262_linkotherversion_ {
263<a href="_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&v=1&g=_g_">
264_textgotext_
265</a>
266}
267
268_linkotherversion_[version=text] {
269<a href="_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&v=0&g=_g_">
270_textgographics_
271</a>
272}
273
274
275###############
276# http macros #
277###############
278
279# These contain the url without any quotes
280
281
282_httpimg_ {_httpprefix_/images}
283
284_httpcollection_{_httpprefix_/collect/_collection_}
285
286_httppagex_ {_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&a=p&p=_1_}
287_httppagehome_ {_httppagex_(home)}
288_httppagehelp_ {_httppagex_(help)}
289_httppagepref_ {_httppagex_(preferences)}
290_httpgreenstone_ {_httppagex_(gsdl)}
291
292
293_httpquery_ {_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&a=q}
294_httpqueryresults_ {_httpquery_}
295_httpbrowse_ {_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&a=b}
296_httptext_ {_gwcgi_?e=_compressedoptions_&q=_urlsafequerystring_&a=t}
297_httpbrowsetitles_ {_httpbrowse_&d=T.1}
298_httpbrowseauthors_ {_httpbrowse_&d=A.1}
299
300_httpiconsidestripe_{_httpimg_/chalk.gif}
301
302_httpiconhomeon_{_httpimg_/chomeon.gif}
303_httpiconhomeoff_{_httpimg_/chomeof.gif}
304_httpiconhelpon_{_httpimg_/chelpon.gif}
305_httpiconhelpoff_{_httpimg_/chelpof.gif}
306_httpiconprefon_{_httpimg_/cprefon.gif}
307_httpiconprefoff_{_httpimg_/cprefof.gif}
308
309_httpiconsearchon_{_httpimg_/tsrchon.gif}
310_httpiconsearchoff_{_httpimg_/tsrchof.gif}
311_httpicontitleson_{_httpimg_/ttitlon.gif}
312_httpicontitlesoff_{_httpimg_/ttitlof.gif}
313_httpiconauthorson_{_httpimg_/tauthon.gif}
314_httpiconauthorsoff_{_httpimg_/tauthof.gif}
315
316
317#########
318# Icons #
319#########
320
321# Must not include links (so they can be used as links). If you want to
322# include links use _image
323# The _icon family should consist of _iconX_, _iconX_[version=text] and _texticonX_
324
325_iconless_{<img src="_httpimg_/less.gif" align=absbottom width="30"
326 height="16" border="0" alt="to previous section of book">}
327_iconless_[version=text] {<_font_>view previous section</font>}
328
329_iconmore_{<img src="_httpimg_/more.gif" align=absbottom width="30"
330 height="16" border="0" alt="to next section of book">}
331_iconmore_[version=text] {<_font_>view next section</font>}
332
333_iconalphless_{<img src="_httpimg_/less.gif" align=absbottom width="30"
334 height="16" border="0" alt="to previous alphabetical section">}
335_iconalphless_[version=text] {<_font_>previous section</font>}
336
337_iconalphmore_{<img src="_httpimg_/more.gif" align=absbottom width="30"
338 height="16" border="0" alt="to next alphabetical section">}
339_iconalphmore_[version=text] {<_font_>next section</font>}
340
341_iconprev_{<img src="_httpimg_/less.gif" align=absbottom width="30"
342 height="16" border="0" alt="">}
343_iconprev_[version=text] {}
344
345_iconnext_{<img src="_httpimg_/more.gif" align=absbottom width="30"
346 height="16" border="0" alt="">}
347_iconnext_[version=text] {}
348
349_icontabspacer_ {<img src="_httpimg_/tspace.gif" width="138" height="17" alt="">}
350_icontabspacer_[version=text] {}
351_icontabspacer2_ {<img src="_httpimg_/tspace.gif" width="115" height="17" alt="">}
352_icontabspacer2_[version=text] {}
353
354
355_icontabsearchgreen_ {<img src="_httpimg_/tsrchgr.gif" height="17" width="87" alt="_texticontabsearchgreen_" border="0">}
356_icontabsearchgreen_[version=text] {_texticontabsearchgreen_}
357
358_icontabtitlegreen_ {<img src="_httpimg_/ttitlgr.gif" height="17" width="87" alt="_texticontabtitlegreen_">}
359_icontabtitlegreen_[version=text] {_texticontabtitlegreen_}
360
361_icontabauthorgreen_ {<img src="_httpimg_/tauthgr.gif" height="17" width="110" alt="_texticontabauthorgreen_" border="0">}
362_icontabauthorgreen_[version=text] {_texticontabauthorgreen_}
363
364
365_iconblankbar_ {<center><img src="_httpimg_/divb.gif" width="537" height="17" alt=""></center>}
366_iconblankbar_[version=text] {<br><hr><br>}
367
368
369_icontext_ {<img border=0 align=absmiddle src="_httpimg_/itext.gif" width="16" height="21" alt="_texticontext_">}
370_icontext_[version=text] {<_font_>_texticontext_</font>}
371
372_iconsmalltext_ {<img src="_httpimg_/smtext.gif" border="0" width=23 height=15
373alt="_texticonsmalltext_">}
374_iconsmalltext_ [version=text] {<small><_font_><b>view text: </b></font></small>}
375_texticonsmalltext_ {View this section of the text}
376
377_iconclosedfolder_ {<img src="_httpimg_/clsdfldr.gif" border="0" width=23 height=15
378alt="_texticonclosedfolder_">}
379_texticonclosedfolder_{Open this folder and view contents}
380_iconclosedfolder_ [version=text] {<small><_font_><b>open sub-section: </b></font></small>}
381
382_iconopenfolder_ {<img src="_httpimg_/openfldr.gif" border="0" width=23 height=15
383alt="close this folder">}
384_iconopenfolder_ [version=text] {<small><_font_><b>close sub-section: </b></font></small>}
385_iconclosedbook_ {<img src="_httpimg_/book.gif" width="18" height="11" border="0"
386alt="open this book and view contents">}
387_iconclosedbook_ [version=text] {<small><_font_><b>open book: </b></font></small>}
388_iconopenbook_ {<img src="_httpimg_/openbook.gif" width="28" height="23" border="0"
389alt="close this book">}
390_iconopenbook_ [version=text] {<small><_font_><b>close book: </b></font></small>}
391_iconopenbookshelf_ {<img src="_httpimg_/bshelf.gif" border="0" width=20 height=16
392alt="close this section of the library">}
393_iconopenbookshelf_ [version=text] {<small><_font_><b>close section: </b></font></small>}
394_iconclosedbookshelf_ {<img src="_httpimg_/bshelf.gif" border="0" width=20 height=16
395alt="open this section of the library and view contents">}
396_iconclosedbookshelf_ [version=text] {<small><_font_><b>open section: </b></font></small>}
397_iconpointer_ {<img src="_httpimg_/arrrght.gif" border="0" width=23 height=15>}
398_iconpointer_ [version=text] {<small><_font_><b>current section-> </b></font></small>}
399_icontab_ {<img src="_httpimg_/tabspace.gif" width=23 height=15>}
400
401_iconcontracttoc_ {<img name="concon" src="_httpimg_/econcof.gif" width="_econcwidth_" height="30" alt="_texticoncontracttoc_" border="0">}
402_iconcontracttoc_[version=text] {_texticoncontracttoc_}
403_econcwidth_ {65}
404
405_iconexpandtoc_ {<img name="expcon" src="_httpimg_/eexpcof.gif" width="_eexpcwidth_" height="_eexpcheight_"
406alt="_texticonexpandtoc_" border="0">}
407_iconexpandtoc_[version=text] {_texticonexpandtoc_}
408_eexpcwidth_ {62}
409_eexpcheight_ {30}
410
411_iconcontracttext_ {<img name="thissec" src="_httpimg_/etsecof.gif" width="_etsecwidth_" height="30"
412alt="_texticoncontracttext_" border="0">}
413_iconcontracttext_[version=text] {_texticoncontracttext_}
414_etsecwidth_ {61}
415
416_iconexpandtext_ {<img name="alltext" src="_httpimg_/ealltof.gif" width="_ealltwidth_" height="_ealltheight_" alt="_texticonexpandtext_" border="0">}
417_iconexpandtext_[version=text] {_texticonexpandtext_}
418_ealltwidth_ {44}
419_ealltheight_ {30}
420
421_icondetach_ {<img name="detach" src="_httpimg_/edtchof.gif" width="_edtchwidth_" height="_edtchheight_"
422alt="_texticondetach_" border="0">}
423_icondetach_[version=text] {_texticondetach_}
424_edtchwidth_ {45}
425_edtchheight_ {30}
426
427_iconwarning_ {<img src="_httpimg_/warning.gif" width="30" height="29" border="0" align="left">}
428_iconwarning_ [version=text] {_texticonwarning_}
429
430_iconcont_ {<img name="cont" src="_httpimg_/contoff.gif" width="_contwidth_" height="17" border="0">}
431_iconcont_ [version=text] {_texticoncont_}
432_contwidth_ {76}
433
434_iconglobhelp_ {<img src="_httpimg_/glob.gif" width="72" height="73" alt="Global Help Projects" border="0">}
435_iconglobhelp_ [version=text] {<_font_>Global Help Projects</font>}
436
437###############
438# Image links #
439###############
440
441# These might include a link (not like an _icon_
442# An _image family should consist of _imageX_ _imageX_[version=text] and _textimageX_
443_imagecollection_ {}
444_imagecollection_[version=text] {}
445
446_imagehome_ {<a href="_httppagehome_"
447 onMouseover = "img\_on('home')"
448 onMouseout = "img\_off('home')"><img name="home"
449 src="_httpiconhomeoff_" width="_homewidth_" height="20"
450 border="0" alt="_textimagehome_"></a>}
451
452_imagehome_[version=text] {
453<a href="_httppagehome_">_textimagehome_</a>
454}
455
456_homewidth_ {41}
457
458
459_imagehelp_ {<a href="_httppagehelp_"
460 onMouseover = "img\_on('help')"
461 onMouseout = "img\_off('help')"><img name="help"
462 src="_httpiconhelpoff_" width="_helpwidth_" height="20"
463 border="0" alt="_textimagehelp_"></a>}
464
465_imagehelp_[version=text] {
466<a href="_httppagehelp_">_textimagehelp_</a>
467}
468
469_helpwidth_ {38}
470
471
472_imagepref_ {<a href="_httppagepref_"
473 onMouseover = "img\_on('pref')"
474 onMouseout = "img\_off('pref')"><img name="pref"
475 src="_httpiconprefoff_" width="_prefwidth_" height="20"
476 border="0" alt="_textimagepref_"></a>}
477
478_imagepref_[version=text] {
479<a href="_httppagepref_">_textimagepref_</a>
480}
481_imagepref_[style=htmlonly] {}
482
483_prefwidth_ {85}
484
485
486_imagegreenstone_ {<a href="_httpgreenstone_"><img src="_httpimg_/gsdl.gif" width="140" height="77"
487border="0" alt="_textimagegreenstone_" hspace=0></a>
488}
489
490_imagegreenstone_[version=text] {
491<a href="_httpgreenstone_">_textimagegreenstone_</a>
492}
493
494_imageglobhelp_ {<a href="_httppagex_(globhelp)">_iconglobhelp_</a>
495}
496
497_imagesearch_ {<a href="_httpquery_"
498 onMouseover = "img\_on('search')"
499 onMouseout = "img\_off('search')"><img name="search"
500 src="_httpiconsearchoff_" width="87" height="17"
501 border="0" alt="_textimagesearch_"></a>}
502
503_imagesearch_[version=text] {<a href="_httpquery_"><_font_>_textimagesearch_</font></a><br>
504}
505
506_imagesearch_[style=htmlonly] {<img src="_httpimg_/tspace.gif" alt="" width="87" height="17">}
507_imagesearch_[style=htmlonly,version=text] {}
508
509_imagebrowsetitles_ {<a href="_httpbrowsetitles_"
510 onMouseover = "img\_on('titles')"
511 onMouseout = "img\_off('titles')"><img name="titles"
512 src="_httpicontitlesoff_" width="87" height="17"
513 border="0" alt="_textimagebrowsetitles_"></a>}
514
515_imagebrowsetitles_[version=text] {<a href="_httpbrowsetitles_"><_font_>_textimagebrowsetitles_</font></a><br>
516}
517
518_imagebrowseauthors_ {<a href="_httpbrowseauthors_"
519 onMouseover = "img\_on('authors')"
520 onMouseout = "img\_off('authors')"><img name="authors"
521 src="_httpiconauthorsoff_" width="110" height="17"
522 border="0" alt="_textimagebrowseauthors_"></a>}
523
524_imagebrowseauthors_[version=text] {<a href="_httpbrowseauthors_"><_font_>_textimagebrowseauthors_</font></a><br>
525}
526
527_imagedetach_ {onMouseover = "img\_on('detach')"
528onMouseout = "img\_off('detach')">_icondetach_</a>}
529_imagedetach_[version=text] {><_font_>_texticondetach_</font></a><br>}
530
531_imagecontracttoc_ {" onMouseover = "img\_on('concon')"
532onMouseout = "img\_off('concon')">_iconcontracttoc_</a>}
533_imagecontracttoc_[version=text] {"><_font_>_texticoncontracttoc_</font></a><br>}
534_imagecontracttoc_[style=htmlonly] {}
535
536_imageexpandtoc_ {" onMouseover = "img\_on('expcon')"
537onMouseout = "img\_off('expcon')">_iconexpandtoc_</a>}
538_imageexpandtoc_ [version=text] {"><_font_>_texticonexpandtoc_</font></a><br>}
539_imageexpandtoc_ [style=htmlonly] {}
540
541_imagecontracttext_ {0" onMouseover = "img\_on('thissec')"
542onMouseout = "img\_off('thissec')">_iconcontracttext_</a>}
543_imagecontracttext_[version=text] {0"><_font_>display only current section</font></a><br>}
544_imagecontracttext_[style=htmlonly] {}
545
546_imageexpandtext_ {1" onMouseover = "img\_on('alltext')"
547onMouseout = "img\_off('alltext')">_iconexpandtext_</a>}
548_imageexpandtext_[version=text] {1"><_font_>display all text</font></a><br>}
549_imageexpandtext_[style=htmlonly] {}
550
551_imagecont_ {onMouseover = "img\_on('cont')"
552onMouseout = "img\_off('cont')">_iconcont_</a>
553}
554_imagecont_[version=text] {><_font_>_texticoncont_</font></a><br>}
555
556
557_imagestandardbar_ {<center>
558<nobr>_imagesearch__icontabspacer__imagebrowsetitles__icontabspacer2__imagebrowseauthors_</nobr>
559</center>
560<p>
561}
562
563_imagestandardbar_[version=text] {
564<_font_>
565_imagesearch_<br>
566_imagebrowsetitles_<br>
567_imagebrowseauthors_<br>
568</font>
569<p>
570}
571
572
573################################
574# English Language Text Macros #
575################################
576
577_collectionname_ {Untitled collection}
578_textimagecollection_ {_collectionname_}
579_textimagehome_ {Home page}
580_textimagehelp_ {Help page}
581_textimagepref_ {Preferences page}
582_textimagegreenstone_ {Greenstone Digital Library Software}
583
584_textimagesearch_ {Search for specific terms}
585_textimagebrowsetitles_ {Browse alphabetical list of titles}
586_textimagebrowseauthors_ {Browse alphabetical list of authors}
587
588
589_textgotext_ {View this page in text format}
590_textgographics_ {View this page in graphics format}
591
592_texticontabsearchgreen_{Search}
593_texticontabauthorgreen_{Authors A-Z}
594_texticontabtitlegreen_{Titles A-Z}
595_texticontext_ {View the document}
596
597_texticondetach_ {Open this page in a new window}
598_texticoncontracttoc_ {Collapse table of contents}
599_texticonexpandtoc_ {Expand table of contents}
600_texticonexpandtext_ {Display all text}
601_texticoncontracttext_ {Display text only for currently selected section}
602
603_texticonwarning_ {<b>Warning: </b>}
604_texticoncont_ {continue?}
Note: See TracBrowser for help on using the repository browser.