[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_}
|
---|
[276] | 26 | _pagescriptextra_ {}
|
---|
[148] | 27 | _pagebannerextra_ {}
|
---|
| 28 | _pagefooterextra_ {}
|
---|
| 29 |
|
---|
| 30 | # it also relies on lots of Globals, the most important of these are:
|
---|
| 31 | # _cookie_ - put in the cgi header
|
---|
| 32 | # _globalscripts_ - javascript stuff
|
---|
| 33 | # _imagecollection_
|
---|
| 34 | # _imagehome_
|
---|
| 35 | # _imagehelp_
|
---|
| 36 | # _imagepref_
|
---|
[11155] | 37 | # _imagethispage_ (this is now not an image, but text. should be renamed?)
|
---|
[148] | 38 | # _linkotherversion_
|
---|
| 39 |
|
---|
[10872] | 40 | # _httpiconchalk_ - the image down the left of the page - is now done
|
---|
| 41 | # by the style sheet.
|
---|
| 42 |
|
---|
[148] | 43 | _header_ {_cgihead_
|
---|
[10872] | 44 | _htmlhead_(class="bgimage")_startspacer__pagebanner_
|
---|
[148] | 45 | }
|
---|
| 46 |
|
---|
[548] | 47 | _header_[v=1] {_cgihead_
|
---|
[148] | 48 | _htmlhead__pagebanner_
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | # _cgihead_ {Content-type: text/html
|
---|
| 52 | # _cookie_
|
---|
| 53 | #
|
---|
| 54 | # }
|
---|
| 55 | _cgihead_{}
|
---|
| 56 |
|
---|
[11354] | 57 | # may be set in collection's extra.dm
|
---|
| 58 | _collectionspecificstyle_ {}
|
---|
| 59 |
|
---|
[10919] | 60 | # any declarations relating to CSS that should go in the html head part.
|
---|
| 61 | # declarations containing images are done here so the path is correct
|
---|
| 62 | # at runtime.
|
---|
[13429] | 63 |
|
---|
| 64 | _csslink_{
|
---|
| 65 | <link rel="stylesheet" href="_cssfilelink_" type="text/css"
|
---|
[12491] | 66 | title="Greenstone Style" charset="UTF-8" _linktagend_
|
---|
[13429] | 67 | <link rel="alternate stylesheet" href="_httpimg_/style-print.css"
|
---|
[12491] | 68 | type="text/css" title="Printer" charset="UTF-8" media="print, screen" _linktagend_
|
---|
[13429] | 69 | <link rel="stylesheet" href="_httpimg_/style-print.css" type="text/css"
|
---|
| 70 | title="Printer" charset="UTF-8" media="print" _linktagend_
|
---|
| 71 | }
|
---|
[11354] | 72 |
|
---|
[13429] | 73 | _cssheader_ {
|
---|
| 74 | _csslink_
|
---|
[11543] | 75 | <style type="text/css">
|
---|
[10919] | 76 | body.bgimage \{ background-image: url("_httpimg_/chalk.gif"); \}
|
---|
[10957] | 77 | div.navbar \{ background-image: url("_httpimg_/bg_green.png"); \}
|
---|
| 78 | div.divbar \{ background-image: url("_httpimg_/bg_green.png"); \}
|
---|
[11796] | 79 | a.navlink \{ background-image: url("_httpimg_/bg_off.png"); \}
|
---|
| 80 | a.navlink_sel \{ background-image: url("_httpimg_/bg_green.png"); \}
|
---|
| 81 | a.navlink:hover \{ background-image: url("_httpimg_/bg_on.png"); \}
|
---|
[11821] | 82 | p.bannertitle \{background-image: url("_httpimg_/banner_bg.png"); \}
|
---|
| 83 | p.collectiontitle \{background-image: url("_httpimg_/banner_bg.png"); \}
|
---|
[11369] | 84 | </style>
|
---|
[11354] | 85 | _collectionspecificstyle_
|
---|
[10919] | 86 |
|
---|
| 87 | }
|
---|
| 88 |
|
---|
[11117] | 89 | # separate macro so it can be easily overridden for customised collections
|
---|
| 90 | _cssfilelink_ {_httpimg_/style.css}
|
---|
| 91 |
|
---|
[13133] | 92 | # Languages that should be displayed right-to-left
|
---|
| 93 | _htmlextra_ [l=ar] { dir=rtl }
|
---|
| 94 | _htmlextra_ [l=fa] { dir=rtl }
|
---|
| 95 | _htmlextra_ [l=he] { dir=rtl }
|
---|
| 96 | _htmlextra_ [l=ur] { dir=rtl }
|
---|
[14426] | 97 | _htmlextra_ [l=ps] { dir=rtl }
|
---|
| 98 | _htmlextra_ [l=prs] { dir=rtl }
|
---|
[13133] | 99 |
|
---|
[148] | 100 | # htmlhead uses:
|
---|
| 101 | # _1_ - extra parameters for the body tag
|
---|
| 102 | # _pagetitle_
|
---|
| 103 | # _globalscripts_
|
---|
[14263] | 104 | _htmlhead_ {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
---|
| 105 | "http://www.w3.org/TR/html4/loose.dtd">
|
---|
[10872] | 106 |
|
---|
[876] | 107 | <html_htmlextra_>
|
---|
[148] | 108 | <head>
|
---|
| 109 | <title>_pagetitle_</title>
|
---|
[12491] | 110 | <meta name="_status:textversion_" content="_versionnum_" _metatagend_
|
---|
[148] | 111 | _globalscripts_
|
---|
[10919] | 112 | _cssheader_
|
---|
[12944] | 113 | _document:documentheader_
|
---|
[276] | 114 | </head>
|
---|
[148] | 115 |
|
---|
[10872] | 116 | <body _1_>
|
---|
[148] | 117 | }
|
---|
| 118 |
|
---|
[12491] | 119 | # Link and meta tags must be closed differently for HTML/XHTML validation
|
---|
| 120 | _linktagend_ {_If_("_compliance_" eq "xhtml",/>,>)}
|
---|
| 121 | _metatagend_ {_If_("_compliance_" eq "xhtml",/>,>)}
|
---|
[148] | 122 |
|
---|
[9333] | 123 | _spacerwidth_ {65}
|
---|
| 124 |
|
---|
| 125 | # _startspacer_ is a spacer that gives pages a left-hand margin.
|
---|
[10872] | 126 | # It must eventually be closed by _endspacer_.
|
---|
[148] | 127 | _startspacer_ {
|
---|
[10872] | 128 | <div id="page">
|
---|
[148] | 129 | }
|
---|
| 130 |
|
---|
[11156] | 131 | # _bannertitle_ is defined in nav_css/ns4.dm, and is either text or
|
---|
| 132 | # a banner image
|
---|
[148] | 133 | _pagebanner_ {
|
---|
[276] | 134 | <!-- page banner (\_style:pagebanner\_) -->
|
---|
[10872] | 135 | <div id="banner">
|
---|
| 136 | <div class="pageinfo">
|
---|
| 137 | <p class="bannerlinks">_globallinks_</p>
|
---|
[11156] | 138 | _bannertitle_
|
---|
[10872] | 139 | </div>
|
---|
| 140 | <div class="collectimage">_imagecollection_</div>
|
---|
| 141 | </div>
|
---|
| 142 | <div class="bannerextra">_pagebannerextra_</div>
|
---|
[276] | 143 | <!-- end of page banner -->
|
---|
[148] | 144 | }
|
---|
| 145 |
|
---|
[548] | 146 | _pagebanner_[v=1] {
|
---|
| 147 | <!-- page banner - text version [v=1] (\_style:pagebanner\_) -->
|
---|
[148] | 148 | <center><h2><b><u>_imagecollection_</u></b></h2></center><p>
|
---|
[10872] | 149 | _globallinks_
|
---|
[148] | 150 | _pagebannerextra_
|
---|
| 151 | <p>
|
---|
[276] | 152 | <!-- end of page banner -->
|
---|
[148] | 153 | }
|
---|
| 154 |
|
---|
[4830] | 155 | # note we no longer close off one of the startspacer tables here!!
|
---|
[148] | 156 | _footer_ {
|
---|
[276] | 157 | <!-- page footer (\_style:footer\_) -->
|
---|
[10872] | 158 | _pagefooterextra__endspacer__htmlfooter_
|
---|
[148] | 159 | }
|
---|
| 160 |
|
---|
[4830] | 161 | # v=1 footer: not using startspacer in the header, so dont put it in the footer
|
---|
| 162 | _footer_ [v=1]{
|
---|
| 163 | <!-- page footer [v=1] (\_style:footer\_) -->
|
---|
| 164 | _pagefooterextra_
|
---|
| 165 | _htmlfooter_
|
---|
[148] | 166 | }
|
---|
| 167 |
|
---|
[10872] | 168 | # close off anything opened by startspacer
|
---|
[4830] | 169 | _endspacer_ {
|
---|
[11155] | 170 | </div> <!-- id=page -->
|
---|
[4830] | 171 | }
|
---|
| 172 |
|
---|
[10872] | 173 |
|
---|
[148] | 174 | _htmlfooter_ {
|
---|
| 175 | </body>
|
---|
| 176 | </html>
|
---|
| 177 | }
|
---|
| 178 |
|
---|
[11117] | 179 | # imagescript only used in nav_ns4.dm
|
---|
[218] | 180 | _globalscripts_{
|
---|
[11117] | 181 | <script language="javascript" type="text/javascript">
|
---|
| 182 | _If_(_pagescriptextra_,_pagescriptextra_)
|
---|
| 183 | _imagescript_
|
---|
[218] | 184 | </script>
|
---|
| 185 | }
|
---|
| 186 |
|
---|
[548] | 187 | _globalscripts_ [v=1] {
|
---|
[10872] | 188 | <script language="javascript" type="text/javascript">
|
---|
[276] | 189 | <!--
|
---|
[283] | 190 | _If_(_cgiargx_,_scriptdetach_)
|
---|
[276] | 191 | _pagescriptextra_
|
---|
| 192 | // -->
|
---|
| 193 | </script>
|
---|
[283] | 194 | }
|
---|
| 195 |
|
---|
| 196 | _scriptdetach_ {
|
---|
| 197 | function close\_detach() \{
|
---|
| 198 | close();
|
---|
| 199 | \}
|
---|
[876] | 200 | }
|
---|