[7343] | 1 | # this file must be UTF-8 encoded
|
---|
[148] | 2 | #######################################################################
|
---|
| 3 | # PAGE STYLES
|
---|
| 4 | #######################################################################
|
---|
| 5 |
|
---|
| 6 | package 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 |
|
---|
[12491] | 15 | # Current values: "html" and "xhtml"
|
---|
| 16 | _compliance_ {html}
|
---|
| 17 |
|
---|
[148] | 18 | # the style system uses
|
---|
| 19 | # _pagetitle_ - what gets displayed at the top of the browser window
|
---|
[276] | 20 | # _pagescriptextra_ - any extra javascript you want included in the header
|
---|
[148] | 21 | # _pagebannerextra_ - anything extra you want displayed in the page banner
|
---|
| 22 | # _pagefooterextra_ - anything extra you want displayed in the footer
|
---|
| 23 |
|
---|
| 24 | # defaults for the above macros
|
---|
| 25 | _pagetitle_ {_collectionname_}
|
---|
[19818] | 26 | _pagescriptfileextra_ {}
|
---|
[276] | 27 | _pagescriptextra_ {}
|
---|
[148] | 28 | _pagebannerextra_ {}
|
---|
| 29 | _pagefooterextra_ {}
|
---|
| 30 |
|
---|
[20597] | 31 | # collection specific style and script may be set in collection's extra.dm
|
---|
| 32 | # using the following macros
|
---|
| 33 | _collectionspecificstyle_ {}
|
---|
| 34 | _collectionspecificscript_ {}
|
---|
| 35 |
|
---|
[148] | 36 | # it also relies on lots of Globals, the most important of these are:
|
---|
| 37 | # _cookie_ - put in the cgi header
|
---|
| 38 | # _globalscripts_ - javascript stuff
|
---|
| 39 | # _imagecollection_
|
---|
| 40 | # _imagehome_
|
---|
| 41 | # _imagehelp_
|
---|
| 42 | # _imagepref_
|
---|
[11155] | 43 | # _imagethispage_ (this is now not an image, but text. should be renamed?)
|
---|
[148] | 44 | # _linkotherversion_
|
---|
| 45 |
|
---|
[10872] | 46 | # _httpiconchalk_ - the image down the left of the page - is now done
|
---|
| 47 | # by the style sheet.
|
---|
| 48 |
|
---|
[148] | 49 | _header_ {_cgihead_
|
---|
[10872] | 50 | _htmlhead_(class="bgimage")_startspacer__pagebanner_
|
---|
[148] | 51 | }
|
---|
| 52 |
|
---|
[548] | 53 | _header_[v=1] {_cgihead_
|
---|
[148] | 54 | _htmlhead__pagebanner_
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | # _cgihead_ {Content-type: text/html
|
---|
| 58 | # _cookie_
|
---|
| 59 | #
|
---|
| 60 | # }
|
---|
| 61 | _cgihead_{}
|
---|
| 62 |
|
---|
[11354] | 63 |
|
---|
[10919] | 64 | # any declarations relating to CSS that should go in the html head part.
|
---|
| 65 | # declarations containing images are done here so the path is correct
|
---|
| 66 | # at runtime.
|
---|
[13429] | 67 |
|
---|
| 68 | _csslink_{
|
---|
| 69 | <link rel="stylesheet" href="_cssfilelink_" type="text/css"
|
---|
[12491] | 70 | title="Greenstone Style" charset="UTF-8" _linktagend_
|
---|
[19128] | 71 | <link rel="alternate stylesheet" href="_httpstyle_/style-print.css"
|
---|
[12491] | 72 | type="text/css" title="Printer" charset="UTF-8" media="print, screen" _linktagend_
|
---|
[19128] | 73 | <link rel="stylesheet" href="_httpstyle_/style-print.css" type="text/css"
|
---|
[13429] | 74 | title="Printer" charset="UTF-8" media="print" _linktagend_
|
---|
| 75 | }
|
---|
[11354] | 76 |
|
---|
[13429] | 77 | _cssheader_ {
|
---|
| 78 | _csslink_
|
---|
[11543] | 79 | <style type="text/css">
|
---|
[19784] | 80 | body.bgimage \{ background: url("_httpimages_/chalk.gif") scroll repeat-y left top; \}
|
---|
[19126] | 81 | div.navbar \{ background-image: url("_httpimages_/bg_green.png"); \}
|
---|
| 82 | div.divbar \{ background-image: url("_httpimages_/bg_green.png"); \}
|
---|
| 83 | a.navlink \{ background-image: url("_httpimages_/bg_off.png"); \}
|
---|
| 84 | a.navlink_sel \{ background-image: url("_httpimages_/bg_green.png"); \}
|
---|
| 85 | a.navlink:hover \{ background-image: url("_httpimages_/bg_on.png"); \}
|
---|
| 86 | p.bannertitle \{background-image: url("_httpimages_/banner_bg.png"); \}
|
---|
| 87 | p.collectiontitle \{background-image: url("_httpimages_/banner_bg.png"); \}
|
---|
[11369] | 88 | </style>
|
---|
[11354] | 89 | _collectionspecificstyle_
|
---|
[10919] | 90 |
|
---|
| 91 | }
|
---|
| 92 |
|
---|
[11117] | 93 | # separate macro so it can be easily overridden for customised collections
|
---|
[19126] | 94 | _cssfilelink_ {_httpstyle_/style.css}
|
---|
[11117] | 95 |
|
---|
[13133] | 96 | # Languages that should be displayed right-to-left
|
---|
| 97 | _htmlextra_ [l=ar] { dir=rtl }
|
---|
| 98 | _htmlextra_ [l=fa] { dir=rtl }
|
---|
| 99 | _htmlextra_ [l=he] { dir=rtl }
|
---|
| 100 | _htmlextra_ [l=ur] { dir=rtl }
|
---|
[14426] | 101 | _htmlextra_ [l=ps] { dir=rtl }
|
---|
| 102 | _htmlextra_ [l=prs] { dir=rtl }
|
---|
[13133] | 103 |
|
---|
[148] | 104 | # htmlhead uses:
|
---|
| 105 | # _1_ - extra parameters for the body tag
|
---|
| 106 | # _pagetitle_
|
---|
| 107 | # _globalscripts_
|
---|
[14263] | 108 | _htmlhead_ {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
---|
| 109 | "http://www.w3.org/TR/html4/loose.dtd">
|
---|
[10872] | 110 |
|
---|
[876] | 111 | <html_htmlextra_>
|
---|
[148] | 112 | <head>
|
---|
| 113 | <title>_pagetitle_</title>
|
---|
[12491] | 114 | <meta name="_status:textversion_" content="_versionnum_" _metatagend_
|
---|
[148] | 115 | _globalscripts_
|
---|
[10919] | 116 | _cssheader_
|
---|
[12944] | 117 | _document:documentheader_
|
---|
[276] | 118 | </head>
|
---|
[148] | 119 |
|
---|
[10872] | 120 | <body _1_>
|
---|
[148] | 121 | }
|
---|
| 122 |
|
---|
[12491] | 123 | # Link and meta tags must be closed differently for HTML/XHTML validation
|
---|
| 124 | _linktagend_ {_If_("_compliance_" eq "xhtml",/>,>)}
|
---|
| 125 | _metatagend_ {_If_("_compliance_" eq "xhtml",/>,>)}
|
---|
[148] | 126 |
|
---|
[9333] | 127 | _spacerwidth_ {65}
|
---|
| 128 |
|
---|
| 129 | # _startspacer_ is a spacer that gives pages a left-hand margin.
|
---|
[10872] | 130 | # It must eventually be closed by _endspacer_.
|
---|
[148] | 131 | _startspacer_ {
|
---|
[10872] | 132 | <div id="page">
|
---|
[148] | 133 | }
|
---|
| 134 |
|
---|
[20612] | 135 | # If you want to move the home/help/pref buttons, override this to be empty
|
---|
| 136 | # and then explicitly include _globallinks_ somewhere else
|
---|
| 137 | # on the page
|
---|
| 138 | _optgloballinks_ {_globallinks_}
|
---|
| 139 |
|
---|
[11156] | 140 | # _bannertitle_ is defined in nav_css/ns4.dm, and is either text or
|
---|
| 141 | # a banner image
|
---|
[148] | 142 | _pagebanner_ {
|
---|
[276] | 143 | <!-- page banner (\_style:pagebanner\_) -->
|
---|
[10872] | 144 | <div id="banner">
|
---|
| 145 | <div class="pageinfo">
|
---|
[20316] | 146 | <p class="bannerlinks">_optgloballinks_</p>
|
---|
[11156] | 147 | _bannertitle_
|
---|
[10872] | 148 | </div>
|
---|
| 149 | <div class="collectimage">_imagecollection_</div>
|
---|
| 150 | </div>
|
---|
| 151 | <div class="bannerextra">_pagebannerextra_</div>
|
---|
[276] | 152 | <!-- end of page banner -->
|
---|
[23519] | 153 | _If_("_activateweb20_" eq "2",
|
---|
| 154 | _If_("_activatetalkback_" eq "1",_talkback:uploadForm_)
|
---|
| 155 | )
|
---|
[148] | 156 | }
|
---|
| 157 |
|
---|
[548] | 158 | _pagebanner_[v=1] {
|
---|
[20316] | 159 | <!-- page ba
|
---|
| 160 | nner - text version [v=1] (\_style:pagebanner\_) -->
|
---|
[148] | 161 | <center><h2><b><u>_imagecollection_</u></b></h2></center><p>
|
---|
[20316] | 162 | _optgloballinks_
|
---|
[148] | 163 | _pagebannerextra_
|
---|
| 164 | <p>
|
---|
[276] | 165 | <!-- end of page banner -->
|
---|
[23519] | 166 | _If_("_activateweb20_" eq "2",
|
---|
| 167 | _If_("_activatetalkback_" eq "1",_talkback:uploadForm_)
|
---|
| 168 | )
|
---|
[148] | 169 | }
|
---|
| 170 |
|
---|
[4830] | 171 | # note we no longer close off one of the startspacer tables here!!
|
---|
[148] | 172 | _footer_ {
|
---|
[23068] | 173 | _If_("_cgiargtalkback_" eq "1",_talkback:monitorUpload_)
|
---|
[276] | 174 | <!-- page footer (\_style:footer\_) -->
|
---|
[10872] | 175 | _pagefooterextra__endspacer__htmlfooter_
|
---|
[148] | 176 | }
|
---|
| 177 |
|
---|
[4830] | 178 | # v=1 footer: not using startspacer in the header, so dont put it in the footer
|
---|
| 179 | _footer_ [v=1]{
|
---|
[23068] | 180 | _If_("_cgiargtalkback_" eq "1",_talkback:monitorUpload_)
|
---|
[4830] | 181 | <!-- page footer [v=1] (\_style:footer\_) -->
|
---|
| 182 | _pagefooterextra_
|
---|
| 183 | _htmlfooter_
|
---|
[148] | 184 | }
|
---|
| 185 |
|
---|
[10872] | 186 | # close off anything opened by startspacer
|
---|
[4830] | 187 | _endspacer_ {
|
---|
[11155] | 188 | </div> <!-- id=page -->
|
---|
[4830] | 189 | }
|
---|
| 190 |
|
---|
[10872] | 191 |
|
---|
[148] | 192 | _htmlfooter_ {
|
---|
| 193 | </body>
|
---|
| 194 | </html>
|
---|
| 195 | }
|
---|
| 196 |
|
---|
[23519] | 197 | _loginscript_ {
|
---|
| 198 | function appendUsernameArgs(id,addOn)
|
---|
| 199 | \{
|
---|
| 200 | var a=document.getElementById(id);
|
---|
| 201 | var url = a.getAttribute("href");
|
---|
| 202 | if (url == "") \{
|
---|
| 203 | url = document.location.toString();
|
---|
| 204 | \}
|
---|
| 205 |
|
---|
| 206 | //alert("url before = " + url);
|
---|
| 207 |
|
---|
| 208 | // clear out any earlier user name/authentication values
|
---|
| 209 | url = url.replace(/(&|\\\\?)uan=\\d\{0,1\}/g,"");
|
---|
| 210 | url = url.replace(/(&|\\\\?)un=[a-z0-9:\\-]*/g,"");
|
---|
| 211 | url = url.replace(/(&|\\\\?)pw=[a-z0-9:\\-]*/g,"");
|
---|
| 212 |
|
---|
| 213 | //alert("url after = " + url);
|
---|
| 214 |
|
---|
| 215 | var gwcgi = "_gwcgi_";
|
---|
| 216 |
|
---|
| 217 | var tailUrl = url.substr(url.length-gwcgi.length);
|
---|
| 218 |
|
---|
| 219 | url += (tailUrl == "_gwcgi_") ? "?" : "&";
|
---|
| 220 | url += addOn;
|
---|
| 221 |
|
---|
| 222 | //alert("url with add on = " + url);
|
---|
| 223 |
|
---|
| 224 | a.setAttribute("href",url);
|
---|
| 225 | \}
|
---|
| 226 | }
|
---|
| 227 |
|
---|
| 228 |
|
---|
[11117] | 229 | # imagescript only used in nav_ns4.dm
|
---|
[218] | 230 | _globalscripts_{
|
---|
[23519] | 231 | _If_("_activateweb20_" eq "2",
|
---|
| 232 | <script type="text/javascript" src="_httpscript_/gsajaxapi.js"></script>
|
---|
| 233 | _If_("_activateseaweed_" eq "1",_seaweedscript_)
|
---|
| 234 | _If_("_activatetalkback_" eq "1",_talkbackscript_)
|
---|
| 235 | )
|
---|
[19818] | 236 | _If_(_pagescriptfileextra_,_pagescriptfileextra_)
|
---|
[11117] | 237 | <script language="javascript" type="text/javascript">
|
---|
[23519] | 238 | _loginscript_
|
---|
[11117] | 239 | _If_(_pagescriptextra_,_pagescriptextra_)
|
---|
[20597] | 240 | _collectionspecificscript_
|
---|
[11117] | 241 | _imagescript_
|
---|
[218] | 242 | </script>
|
---|
[23449] | 243 |
|
---|
[218] | 244 | }
|
---|
| 245 |
|
---|
[548] | 246 | _globalscripts_ [v=1] {
|
---|
[23519] | 247 | _If_("_activateweb20_" eq "2",
|
---|
| 248 | <script type="text/javascript" src="_httpscript_/gsajaxapi.js"></script>
|
---|
| 249 | _If_("_activateseaweed_" eq "1",_seaweedscript_)
|
---|
| 250 | _If_("_activatetalkback_" eq "1",_talkbackscript_)
|
---|
| 251 | )
|
---|
| 252 | _If_(_pagescriptfileextra_,_pagescriptfileextra_)
|
---|
[10872] | 253 | <script language="javascript" type="text/javascript">
|
---|
[276] | 254 | <!--
|
---|
[23519] | 255 | _loginscript_
|
---|
[283] | 256 | _If_(_cgiargx_,_scriptdetach_)
|
---|
[23519] | 257 | _If_(_pagescriptextra_,_pagescriptextra_)
|
---|
[20597] | 258 | _collectionspecificscript_
|
---|
[276] | 259 | // -->
|
---|
| 260 | </script>
|
---|
[283] | 261 | }
|
---|
| 262 |
|
---|
| 263 | _scriptdetach_ {
|
---|
| 264 | function close\_detach() \{
|
---|
| 265 | close();
|
---|
| 266 | \}
|
---|
[876] | 267 | }
|
---|