2fd3bc7cef4bf7151593a46ddfa1b762df8fd2cb
[project-aon.git] / scripts / create-css.pl
1 #!/usr/bin/perl -w
2
3 # See the following about font-size-adjust:
4 # http://www.w3.org/TR/REC-CSS2/fonts.html#font-size-props
5
6 #"Verdana, Arial, Helvetica", "Georgia, Times New Roman, Times", "Courier New, Courier". 
7
8 #Commonly-installed typefaces on Macs and PCs
9 # (Windows then Mac)
10 #
11 # Serif:
12 #  Georgia
13 #  MS Serif
14 #  Book Antiqua
15 #  Times New Roman 
16 #
17 #  Georgia*
18 #  New York
19 #  Palatino
20 #  Times  
21 #
22 # Sans-serif:
23 #  Verdana
24 #  MS Sans Serif
25 #  Arial
26 #  Trebuchet
27 #
28 #  Verdana*
29 #  Geneva
30 #  Helvetica
31 #  Chicago 
32 #
33 # Monospace:
34 #  Courier New
35 #  Courier 
36
37 #( $bookPath, $textColor, $backgroundColor, $scrollbarBaseColor, $scrollbarTrackColor, $scrollbarArrowColor, $linkColor, $alinkColor, $hlinkBackgroundColor, $hlinkColor, $hlinkLightBorderColor, $hlinkDarkBorderColor ) = @ARGV;
38
39 ( $bookPath, $textColor, $backgroundColor, $linkColor, $alinkColor, $hlinkBackgroundColor, $hlinkColor ) = @ARGV;
40
41 open( CSSFILE, ">${bookPath}/main.css" ) or die( "Can\'t output to file: \"${bookPath}/main.css\"\n\t$!" );
42
43 print CSSFILE << "(END OF CSS)";
44 \@import url( more.css );
45
46 html, body {
47  background-color: ${backgroundColor};
48  color: ${textColor};
49  font-family: Souvenir, Georgia, "Times New Roman", Times, serif;
50 }
51
52 #title {
53  position: absolute;
54  top: 0px;
55  left: 0px;
56  width: 550px;
57  height: 100px;
58  padding: 0px;
59  border: 0px none;
60  margin: 0px;
61 }
62
63 #body {
64  position: absolute;
65  top: 95px;
66  left: 100px;
67  width: 450px;
68  padding: 0px;
69  border: 0px none;
70  margin: 0px;
71 }
72
73 #footnotes {
74  font-size: 0.8em;
75 }
76
77 hr { margin-left: 0px; }
78
79 p, ol, ul, dl, blockquote { text-align: justify }
80
81 ul.unbulleted { list-style-type: none }
82
83 b { font-weight: bold }
84
85 h1, h2, h3, h4, h5, h6 {
86  margin-top: 0px;
87  border: 0px none;
88  padding: 0px;
89  clear: left;
90  text-align: left;
91 }
92
93 :link:focus, :visited:focus {
94 }
95
96 :link, :visited {
97  background-color: transparent;
98  color: ${linkColor};
99  text-decoration: none;
100  font-weight: bold;
101 }
102
103 :link:hover, :visited:hover {
104  background-color: ${hlinkBackgroundColor};
105  color: ${hlinkColor};
106  text-decoration: none;
107  font-weight: bold;
108 }
109
110 .navigation :link:hover, .navigation :visited:hover {
111  background-color: transparent;
112  color: ${hlinkColor};
113  text-decoration: none;
114  font-weight: bold;
115 }
116
117 :link:active, :visited:active {
118  background-color: transparent;
119  color: ${alinkColor};
120  text-decoration: none;
121  font-weight: bold;
122 }
123
124 dt {
125  font-weight: bold;
126 }
127
128 .navigation, .signpost, .illustraion, .caption, .center {
129  text-align: center;
130 }
131
132 .author {
133  text-align: center;
134  font-weight: bold;
135 }
136
137 .dedication {
138  text-align: center;
139  font-style: italic;
140  font-weight: bold;
141  margin-top: 15ex;
142  margin-bottom: 15ex;
143 }
144
145 .copyright {
146  text-align: center;
147  font-style: italic;
148 }
149
150 .choice, .combat {
151  text-align: left;
152  margin-left: 15px;
153  width: 435px;
154 }
155
156 .smallcaps {
157  font-size: 0.8em;
158 }
159 (END OF CSS)
160
161 close CSSFILE;
162
163 open( CSSFILE, ">${bookPath}/more.css" ) or die( "Can\'t output to file: \"${bookPath}/more.css\"\n\t$!" );
164
165 print CSSFILE << "(END OF MORE CSS)";
166 p {
167   padding-top: 1px;
168   padding-bottom: 1px;
169 }
170
171 div.numbered h3 {
172  position: absolute;
173  top: -56px;
174  left: 404px;
175  width: 39px;
176  height: 18pt;
177  margin: 0px;
178  border: 0px none;
179  padding: 0px;
180  font-size: 14pt;
181  background-color: transparent;
182  text-align: center;
183  vertical-align: middle;
184 }
185
186 div.glossary h3 {
187  position: absolute;
188  top: -56px;
189  left: 404px;
190  width: 39px;
191  height: 18pt;
192  margin: 0px;
193  border: 0px none;
194  padding: 0px;
195  font-size: 14pt;
196  background-color: transparent;
197  text-align: center;
198  vertical-align: middle;
199 }
200
201 img.accent {
202   margin-top: 5px;
203   margin-right: 10px;
204   margin-bottom: 5px;
205 }
206 (END OF MORE CSS)
207
208 close CSSFILE;