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