webgen 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/ChangeLog +201 -0
  2. data/Rakefile +3 -2
  3. data/TODO +31 -4
  4. data/VERSION +1 -1
  5. data/data/webgen/example/config.yaml +2 -0
  6. data/data/webgen/example/src/default.css +84 -0
  7. data/data/webgen/example/src/default.template +32 -0
  8. data/data/webgen/example/src/index.page +8 -0
  9. data/{doc/src → data/webgen/images}/generated_by_webgen.png +0 -0
  10. data/data/webgen/images/valid-css.gif +0 -0
  11. data/data/webgen/images/valid-xhtml11.png +0 -0
  12. data/data/webgen/images/webgen_logo.png +0 -0
  13. data/doc/config.yaml +2 -0
  14. data/doc/plugin/extension.rb +8 -4
  15. data/doc/plugin/resources.rb +30 -0
  16. data/doc/src/default.css +251 -149
  17. data/doc/src/default.template +8 -8
  18. data/doc/src/documentation/gettingstarted.page +1 -1
  19. data/doc/src/documentation/index.page +6 -2
  20. data/doc/src/documentation/plugins/filehandler/backing.page +22 -9
  21. data/doc/src/documentation/plugins/filehandler/galleryhandler.page +1 -1
  22. data/doc/src/documentation/plugins/filehandler/index.page +9 -4
  23. data/doc/src/documentation/plugins/filehandler/pagehandler.page +33 -10
  24. data/doc/src/documentation/plugins/index.page +9 -1
  25. data/doc/src/documentation/plugins/menustyles/horizontal-dropdown.page +42 -0
  26. data/doc/src/documentation/plugins/menustyles/horizontal.page +21 -0
  27. data/doc/src/documentation/plugins/menustyles/index.page +12 -0
  28. data/doc/src/documentation/plugins/menustyles/partial.page +27 -0
  29. data/doc/src/documentation/plugins/menustyles/vertical-dropdown.page +23 -0
  30. data/doc/src/documentation/plugins/menustyles/vertical.page +32 -0
  31. data/doc/src/documentation/plugins/resourcemanager.page +30 -0
  32. data/doc/src/documentation/plugins/tags/index.page +2 -2
  33. data/doc/src/documentation/plugins/tags/langbar.page +4 -4
  34. data/doc/src/documentation/plugins/tags/menu.page +6 -17
  35. data/doc/src/documentation/plugins/tags/navbar.page +2 -1
  36. data/doc/src/documentation/plugins/tags/resource.page +22 -0
  37. data/doc/src/download.page +1 -1
  38. data/doc/src/features.page +32 -9
  39. data/doc/src/index.page +24 -10
  40. data/doc/src/meta.info +16 -6
  41. data/install.rb +1 -1
  42. data/lib/webgen/configuration.rb +24 -2
  43. data/lib/webgen/node.rb +29 -5
  44. data/lib/webgen/plugin.rb +1 -5
  45. data/lib/webgen/plugins/contenthandler/textile.rb +3 -3
  46. data/lib/webgen/plugins/filehandler/backing.rb +5 -4
  47. data/lib/webgen/plugins/filehandler/directory.rb +3 -3
  48. data/lib/webgen/plugins/filehandler/filehandler.rb +8 -4
  49. data/lib/webgen/plugins/filehandler/page.rb +33 -18
  50. data/lib/webgen/plugins/filehandler/picturegallery.rb +10 -8
  51. data/lib/webgen/plugins/menustyles/defaultmenustyle.rb +73 -0
  52. data/lib/webgen/plugins/menustyles/horizontal.rb +93 -0
  53. data/lib/webgen/plugins/menustyles/horizontal_dropdown.rb +113 -0
  54. data/lib/webgen/plugins/menustyles/partial.rb +95 -0
  55. data/lib/webgen/plugins/menustyles/vertical.rb +107 -0
  56. data/lib/webgen/plugins/menustyles/vertical_dropdown.rb +107 -0
  57. data/lib/webgen/plugins/resourcemanager.rb +264 -0
  58. data/lib/webgen/plugins/tags/langbar.rb +9 -5
  59. data/lib/webgen/plugins/tags/menu.rb +4 -66
  60. data/lib/webgen/plugins/treewalker.rb +7 -6
  61. data/lib/webgen/webgen.rb +72 -161
  62. metadata +37 -6
  63. 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
- 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: 250px;
46
- margin-right: 20px;
47
- padding: 10px;
48
- }
49
-
50
- #menu {
51
- float: left;
52
- width: 230px;
53
- padding: 20px 0px 0px 2px;
54
- }
55
-
56
- .bar {
57
- clear: both;
58
- padding: 3px;
59
- text-align: center;
60
- font-size: 90%;
61
- background-color: #3054BF;
62
- }
63
-
64
- .left, .right {
65
- padding: 0px 1em;
66
- }
67
-
68
- .left {
69
- float: left;
70
- text-align: left;
71
- }
72
-
73
- .right {
74
- float: right;
75
- text-align: right;
76
- }
77
-
78
- /* styling the menu */
79
-
80
- #menu a {
81
- text-decoration: none;
82
- font-weight: bold;
83
- font-size: 130%;
84
- }
85
-
86
- #menu a:hover {
87
- text-decoration: underline;
88
- }
89
-
90
- #menu .webgen-menuitem-selected {
91
- border-left: 3px solid #405080;
92
- }
93
-
94
- #menu ul {
95
- list-style-type: none;
96
- padding: 0px;
97
- margin-left: 10px;
98
- }
99
-
100
- #menu li > ul {
101
- font-size: 95%;
102
- }
103
-
104
- #menu li {
105
- margin: 0.0em 0px;
106
- padding: 2px 0px;
107
- padding-left: 5px;
108
- border-left: 3px solid #CCCCCC;
109
- }
110
-
111
- /* styling the content */
112
-
113
- h2 {
114
- padding: 0px;
115
- letter-spacing: 0.2em;
116
- font-size: 150%;
117
- font-weight: bold;
118
- border-bottom: 1px solid #405080;
119
- }
120
-
121
- pre {
122
- padding-left: 10px;
123
- margin: 0px 10px;
124
- border-left: 3px solid #5C73B8;
125
- }
126
-
127
- dt {
128
- font-weight: bold;
129
- }
130
-
131
- .webgen-picture {
132
- text-align: center;
133
- }
134
-
135
- .webgen-picture img {
136
- border: 1px solid black;
137
- }
138
-
139
- .webgen-gallery {
140
- text-align: center;
141
- }
142
-
143
- .webgen-gallery table {
144
- width: 100%;
145
- }
146
-
147
- .webgen-gallery table td{
148
- text-align: center;
149
- border: 1px solid black;
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
+ }
@@ -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="{relocatable: logo.png}" alt="Logo" title="Logo" /></td>
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
- {menu: {subtreeLevel: 4}}
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="http://www.w3.org/Icons/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="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" /></a>
40
- <a href="http://webgen.rubyforge.org"><img src="generated_by_webgen.png" alt="Generated by webgen" /></a> on <b>{date: }</b>
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 -->