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