webgen 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +201 -0
- data/Rakefile +3 -2
- data/TODO +31 -4
- data/VERSION +1 -1
- data/data/webgen/example/config.yaml +2 -0
- data/data/webgen/example/src/default.css +84 -0
- data/data/webgen/example/src/default.template +32 -0
- data/data/webgen/example/src/index.page +8 -0
- data/{doc/src → data/webgen/images}/generated_by_webgen.png +0 -0
- data/data/webgen/images/valid-css.gif +0 -0
- data/data/webgen/images/valid-xhtml11.png +0 -0
- data/data/webgen/images/webgen_logo.png +0 -0
- data/doc/config.yaml +2 -0
- data/doc/plugin/extension.rb +8 -4
- data/doc/plugin/resources.rb +30 -0
- data/doc/src/default.css +251 -149
- data/doc/src/default.template +8 -8
- data/doc/src/documentation/gettingstarted.page +1 -1
- data/doc/src/documentation/index.page +6 -2
- data/doc/src/documentation/plugins/filehandler/backing.page +22 -9
- data/doc/src/documentation/plugins/filehandler/galleryhandler.page +1 -1
- data/doc/src/documentation/plugins/filehandler/index.page +9 -4
- data/doc/src/documentation/plugins/filehandler/pagehandler.page +33 -10
- data/doc/src/documentation/plugins/index.page +9 -1
- data/doc/src/documentation/plugins/menustyles/horizontal-dropdown.page +42 -0
- data/doc/src/documentation/plugins/menustyles/horizontal.page +21 -0
- data/doc/src/documentation/plugins/menustyles/index.page +12 -0
- data/doc/src/documentation/plugins/menustyles/partial.page +27 -0
- data/doc/src/documentation/plugins/menustyles/vertical-dropdown.page +23 -0
- data/doc/src/documentation/plugins/menustyles/vertical.page +32 -0
- data/doc/src/documentation/plugins/resourcemanager.page +30 -0
- data/doc/src/documentation/plugins/tags/index.page +2 -2
- data/doc/src/documentation/plugins/tags/langbar.page +4 -4
- data/doc/src/documentation/plugins/tags/menu.page +6 -17
- data/doc/src/documentation/plugins/tags/navbar.page +2 -1
- data/doc/src/documentation/plugins/tags/resource.page +22 -0
- data/doc/src/download.page +1 -1
- data/doc/src/features.page +32 -9
- data/doc/src/index.page +24 -10
- data/doc/src/meta.info +16 -6
- data/install.rb +1 -1
- data/lib/webgen/configuration.rb +24 -2
- data/lib/webgen/node.rb +29 -5
- data/lib/webgen/plugin.rb +1 -5
- data/lib/webgen/plugins/contenthandler/textile.rb +3 -3
- data/lib/webgen/plugins/filehandler/backing.rb +5 -4
- data/lib/webgen/plugins/filehandler/directory.rb +3 -3
- data/lib/webgen/plugins/filehandler/filehandler.rb +8 -4
- data/lib/webgen/plugins/filehandler/page.rb +33 -18
- data/lib/webgen/plugins/filehandler/picturegallery.rb +10 -8
- data/lib/webgen/plugins/menustyles/defaultmenustyle.rb +73 -0
- data/lib/webgen/plugins/menustyles/horizontal.rb +93 -0
- data/lib/webgen/plugins/menustyles/horizontal_dropdown.rb +113 -0
- data/lib/webgen/plugins/menustyles/partial.rb +95 -0
- data/lib/webgen/plugins/menustyles/vertical.rb +107 -0
- data/lib/webgen/plugins/menustyles/vertical_dropdown.rb +107 -0
- data/lib/webgen/plugins/resourcemanager.rb +264 -0
- data/lib/webgen/plugins/tags/langbar.rb +9 -5
- data/lib/webgen/plugins/tags/menu.rb +4 -66
- data/lib/webgen/plugins/treewalker.rb +7 -6
- data/lib/webgen/webgen.rb +72 -161
- metadata +37 -6
- data/doc/src/logo.png +0 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
module OtherPlugins
|
2
|
+
|
3
|
+
class PredefinedResourcesTag < Tags::DefaultTag
|
4
|
+
|
5
|
+
summary "Creates a table of all predefined resources"
|
6
|
+
depends_on 'Tags'
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
super
|
10
|
+
@processOutput = false
|
11
|
+
register_tag( 'predefinedResources' )
|
12
|
+
end
|
13
|
+
|
14
|
+
def process_tag( tag, node, refNode )
|
15
|
+
res = Webgen::Plugin.config[Webgen::ResourceManager].resources
|
16
|
+
output = '<table style="width: 100%; border: 1px solid black" summary="List of predefined resources" rules="cols" frame="border">'
|
17
|
+
output << '<thead><tr><th>Name</th><th>Type</th><th>Output path</th><th>Description</th></tr></thead>'
|
18
|
+
output << '<tbody>'
|
19
|
+
res.sort.each do |name, r|
|
20
|
+
logger.info { "At resource #{r.name}..." }
|
21
|
+
next unless r.predefined
|
22
|
+
logger.info { "Describing resource #{r.name}..." }
|
23
|
+
output << "<tr><td>#{r.name}</td><td>#{r.type.to_s}</td><td>#{r.output_path}</td><td>#{r.predefined}</td></tr>"
|
24
|
+
end
|
25
|
+
output << '</tbody></table>'
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
data/doc/src/default.css
CHANGED
@@ -1,150 +1,252 @@
|
|
1
1
|
/*
|
2
|
-
#5C73B8 -> background
|
3
|
-
#405080 -> headings
|
4
|
-
#CFD4E6 -> code
|
5
|
-
#3054BF -> other
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
#
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
2
|
+
#5C73B8 -> background
|
3
|
+
#405080 -> headings
|
4
|
+
#CFD4E6 -> code
|
5
|
+
#3054BF -> other
|
6
|
+
*/
|
7
|
+
|
8
|
+
body {
|
9
|
+
margin: 0px 2em;
|
10
|
+
font-size: 12px;
|
11
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
12
|
+
border: 1px solid black;
|
13
|
+
color: black;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1, h2, h3, h4, h5 { color: #405080}
|
17
|
+
|
18
|
+
a:visited { color: #405080; }
|
19
|
+
a { color: #5C73B8; }
|
20
|
+
.bar a { color: white }
|
21
|
+
.bar a:visited { color: white }
|
22
|
+
|
23
|
+
#all { background-color: #CFD4E6; }
|
24
|
+
|
25
|
+
#header {
|
26
|
+
border-bottom: 1px solid black;
|
27
|
+
padding: 1ex;
|
28
|
+
background-color: #5C73B8;
|
29
|
+
}
|
30
|
+
#header img {
|
31
|
+
padding-right: 5em;
|
32
|
+
}
|
33
|
+
#header h1 {
|
34
|
+
margin: 0ex;
|
35
|
+
font-size: 300%;
|
36
|
+
font-style: italic;
|
37
|
+
font-weight: normal;
|
38
|
+
color: white;
|
39
|
+
}
|
40
|
+
|
41
|
+
#headerbar { border-bottom: 1px solid black; }
|
42
|
+
#footer { border-top: 1px solid black; }
|
43
|
+
|
44
|
+
#body {
|
45
|
+
margin-left: 17em;
|
46
|
+
margin-right: 20px;
|
47
|
+
padding: 10px;
|
48
|
+
}
|
49
|
+
|
50
|
+
.bar {
|
51
|
+
clear: both;
|
52
|
+
padding: 3px;
|
53
|
+
text-align: center;
|
54
|
+
font-size: 90%;
|
55
|
+
background-color: #3054BF;
|
56
|
+
}
|
57
|
+
|
58
|
+
.left, .right {
|
59
|
+
padding: 3px 1em;
|
60
|
+
}
|
61
|
+
|
62
|
+
.left {
|
63
|
+
float: left;
|
64
|
+
text-align: left;
|
65
|
+
}
|
66
|
+
|
67
|
+
.right {
|
68
|
+
float: right;
|
69
|
+
text-align: right;
|
70
|
+
}
|
71
|
+
|
72
|
+
/** styling the website menus **/
|
73
|
+
|
74
|
+
#menu, #quickmenu {
|
75
|
+
float: left;
|
76
|
+
margin: 1em;
|
77
|
+
border: 1px solid black;
|
78
|
+
width: 15em;
|
79
|
+
text-align: center;
|
80
|
+
background: #3054bf;
|
81
|
+
}
|
82
|
+
|
83
|
+
#quickmenu {
|
84
|
+
clear: both;
|
85
|
+
}
|
86
|
+
|
87
|
+
#quickmenu > div > a { border-bottom: 3px double black; }
|
88
|
+
|
89
|
+
/** styling the sample menus **/
|
90
|
+
|
91
|
+
/* horizontal menu */
|
92
|
+
|
93
|
+
.horiz-menu a { color: white }
|
94
|
+
.horiz-menu a:visited { color: white }
|
95
|
+
|
96
|
+
.horiz-menu {
|
97
|
+
padding: 3px;
|
98
|
+
}
|
99
|
+
|
100
|
+
.horiz-menu ul {
|
101
|
+
background-color: #3054BF;
|
102
|
+
}
|
103
|
+
|
104
|
+
/* vertical menu */
|
105
|
+
|
106
|
+
.vert-menu ul {
|
107
|
+
list-style-type: none;
|
108
|
+
}
|
109
|
+
|
110
|
+
.vert-menu li {
|
111
|
+
border-left: 3px solid #ccc;
|
112
|
+
}
|
113
|
+
|
114
|
+
.vert-menu .webgen-menu-item-selected {
|
115
|
+
border-left: 3px solid #405080;
|
116
|
+
}
|
117
|
+
|
118
|
+
.vert-menu .webgen-menu-submenu > a {
|
119
|
+
background-color: #ccc;
|
120
|
+
}
|
121
|
+
|
122
|
+
.vert-menu .webgen-menu-submenu-inhierarchy > a {
|
123
|
+
background-color: #aaa;
|
124
|
+
}
|
125
|
+
|
126
|
+
/* partial menu */
|
127
|
+
|
128
|
+
.partial-menu ul {
|
129
|
+
background: #3054bf;
|
130
|
+
margin: 0px;
|
131
|
+
padding: 0px;
|
132
|
+
list-style-type: none;
|
133
|
+
}
|
134
|
+
|
135
|
+
.partial-menu ul { text-align: left; }
|
136
|
+
|
137
|
+
.partial-menu li {
|
138
|
+
margin: 0px;
|
139
|
+
padding: 3px 1em;
|
140
|
+
}
|
141
|
+
|
142
|
+
.partial-menu .webgen-menu-item-selected {
|
143
|
+
font-weight: bold;
|
144
|
+
}
|
145
|
+
|
146
|
+
.partial-menu a {
|
147
|
+
color: white;
|
148
|
+
display: block;
|
149
|
+
}
|
150
|
+
|
151
|
+
.partial-menu a:visited { color: white; }
|
152
|
+
|
153
|
+
.partial-menu ul li:hover a, .partial-menu ul li:hover a:visited { color: #3054bf; }
|
154
|
+
|
155
|
+
.partial-menu ul li:hover {
|
156
|
+
background: #fff;
|
157
|
+
color: #3054bf;
|
158
|
+
}
|
159
|
+
|
160
|
+
/* horizontal dd menu */
|
161
|
+
|
162
|
+
.horiz-dd-menu {
|
163
|
+
background: #3054bf;
|
164
|
+
float: left;
|
165
|
+
}
|
166
|
+
|
167
|
+
.horiz-dd-menu a { color: white }
|
168
|
+
.horiz-dd-menu a:visited { color: white }
|
169
|
+
|
170
|
+
.horiz-dd-menu a {
|
171
|
+
display: block;
|
172
|
+
margin: 0px;
|
173
|
+
padding: 3px 1em;
|
174
|
+
text-align: left;
|
175
|
+
background: #3054bf;
|
176
|
+
}
|
177
|
+
|
178
|
+
.horiz-dd-menu li.webgen-menu-submenu > a {
|
179
|
+
background: #405080;
|
180
|
+
}
|
181
|
+
|
182
|
+
.horiz-dd-menu li:hover > a {
|
183
|
+
background: #fff;
|
184
|
+
color: #3054bf;
|
185
|
+
}
|
186
|
+
|
187
|
+
/* vertical dd menu */
|
188
|
+
|
189
|
+
.vert-dd-menu ul {
|
190
|
+
background: #3054bf;
|
191
|
+
}
|
192
|
+
|
193
|
+
.vert-dd-menu a { color: white }
|
194
|
+
.vert-dd-menu a:visited { color: white }
|
195
|
+
|
196
|
+
.vert-dd-menu a {
|
197
|
+
display: block;
|
198
|
+
margin: 0px;
|
199
|
+
padding: 3px 1em;
|
200
|
+
text-align: left;
|
201
|
+
background: #3054bf;
|
202
|
+
}
|
203
|
+
|
204
|
+
.vert-dd-menu li.webgen-menu-submenu > a {
|
205
|
+
background: #405080;
|
206
|
+
}
|
207
|
+
|
208
|
+
.vert-dd-menu li:hover > a {
|
209
|
+
background: #fff;
|
210
|
+
color: #3054bf;
|
211
|
+
}
|
212
|
+
|
213
|
+
/** styling the content **/
|
214
|
+
|
215
|
+
h2 {
|
216
|
+
padding: 0px;
|
217
|
+
letter-spacing: 0.2em;
|
218
|
+
font-size: 150%;
|
219
|
+
font-weight: bold;
|
220
|
+
border-bottom: 1px solid #405080;
|
221
|
+
}
|
222
|
+
|
223
|
+
pre {
|
224
|
+
padding-left: 10px;
|
225
|
+
margin: 0px 10px;
|
226
|
+
border-left: 3px solid #5C73B8;
|
227
|
+
}
|
228
|
+
|
229
|
+
dt {
|
230
|
+
font-weight: bold;
|
231
|
+
}
|
232
|
+
|
233
|
+
.webgen-picture {
|
234
|
+
text-align: center;
|
235
|
+
}
|
236
|
+
|
237
|
+
.webgen-picture img {
|
238
|
+
border: 1px solid black;
|
239
|
+
}
|
240
|
+
|
241
|
+
.webgen-gallery {
|
242
|
+
text-align: center;
|
243
|
+
}
|
244
|
+
|
245
|
+
.webgen-gallery table {
|
246
|
+
width: 100%;
|
247
|
+
}
|
248
|
+
|
249
|
+
.webgen-gallery table td{
|
250
|
+
text-align: center;
|
251
|
+
border: 1px solid black;
|
252
|
+
}
|
data/doc/src/default.template
CHANGED
@@ -2,7 +2,8 @@
|
|
2
2
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}">
|
4
4
|
<head>
|
5
|
-
<title>{title: }</title>
|
5
|
+
<title>webgen - {title: }</title>
|
6
|
+
<link href="{resource: webgen-css}" rel="stylesheet" />
|
6
7
|
<link href="{relocatable: default.css}" rel="stylesheet" />
|
7
8
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
8
9
|
</head>
|
@@ -12,7 +13,7 @@
|
|
12
13
|
<div id="header">
|
13
14
|
<table>
|
14
15
|
<tr>
|
15
|
-
<td><img src="{
|
16
|
+
<td><img src="{resource: webgen-logo}" alt="Logo" title="Logo" /></td>
|
16
17
|
<td><h1>webgen<span style="font-size: 60%"> - template based static website generator</span></h1>
|
17
18
|
<p>The solution for your static website generation needs!</p></td>
|
18
19
|
</tr>
|
@@ -26,18 +27,17 @@
|
|
26
27
|
<div style="clear:both"></div>
|
27
28
|
</div>
|
28
29
|
|
29
|
-
<div id="menu">
|
30
|
-
|
31
|
-
</div>
|
30
|
+
<div id="menu">Menu: {menu: {menuStyle: vertical-dropdown, options: {divClass: vert-dd-menu}}}</div>
|
31
|
+
<div id="quickmenu">Directory quick menu: {menu: {menuStyle: partial, options: {divClass: partial-menu}}}</div>
|
32
32
|
|
33
33
|
<div id="body">
|
34
34
|
{content: }
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div id="footer" class="bar">
|
38
|
-
<a href="http://validator.w3.org/check?uri=referer"><img src="
|
39
|
-
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="
|
40
|
-
<a href="http://webgen.rubyforge.org"><img src="
|
38
|
+
<a href="http://validator.w3.org/check?uri=referer"><img src="{resource: w3c-valid-xhtml11}" alt="Valid XHTML 1.1!" height="31" width="88" /></a>
|
39
|
+
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="{resource: w3c-valid-css}" alt="Valid CSS!" height="31" width="88" /></a>
|
40
|
+
<a href="http://webgen.rubyforge.org"><img src="{resource: webgen-generated}" alt="Generated by webgen" height="31" width="88"/></a> on <b>{date: }</b>
|
41
41
|
</div>
|
42
42
|
</div>
|
43
43
|
<!-- Start of StatCounter Code -->
|