webgen 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. data/ChangeLog +23 -187
  2. data/THANKS +8 -3
  3. data/VERSION +1 -1
  4. data/doc/examples/website_styles/1024px/README +9 -0
  5. data/doc/examples/website_styles/1024px/config.yaml +2 -0
  6. data/doc/examples/website_styles/1024px/src/about.page +12 -0
  7. data/doc/examples/website_styles/1024px/src/default.css +188 -0
  8. data/doc/examples/website_styles/1024px/src/default.template +62 -0
  9. data/doc/examples/website_styles/1024px/src/download.page +15 -0
  10. data/doc/examples/website_styles/1024px/src/features.page +8 -0
  11. data/doc/examples/website_styles/1024px/src/images/background.gif +0 -0
  12. data/doc/examples/website_styles/1024px/src/index.page +9 -0
  13. data/doc/examples/website_styles/1024px/src/screenshots.page +18 -0
  14. data/doc/examples/website_styles/andreas00/README +9 -0
  15. data/doc/examples/website_styles/andreas00/config.yaml +2 -0
  16. data/doc/examples/website_styles/andreas00/src/about.page +12 -0
  17. data/doc/examples/website_styles/andreas00/src/default.css +290 -0
  18. data/doc/examples/website_styles/andreas00/src/default.template +62 -0
  19. data/doc/examples/website_styles/andreas00/src/download.page +15 -0
  20. data/doc/examples/website_styles/andreas00/src/features.page +8 -0
  21. data/doc/examples/website_styles/andreas00/src/images/bg.gif +0 -0
  22. data/doc/examples/website_styles/andreas00/src/images/front.jpg +0 -0
  23. data/doc/examples/website_styles/andreas00/src/images/menubg.gif +0 -0
  24. data/doc/examples/website_styles/andreas00/src/images/menubg2.gif +0 -0
  25. data/doc/examples/website_styles/andreas00/src/index.page +9 -0
  26. data/doc/examples/website_styles/andreas00/src/screenshots.page +18 -0
  27. data/doc/examples/website_styles/andreas01/README +9 -0
  28. data/doc/examples/website_styles/andreas01/config.yaml +2 -0
  29. data/doc/examples/website_styles/andreas01/src/about.page +12 -0
  30. data/doc/examples/website_styles/andreas01/src/default.css +310 -0
  31. data/doc/examples/website_styles/andreas01/src/default.template +63 -0
  32. data/doc/examples/website_styles/andreas01/src/download.page +15 -0
  33. data/doc/examples/website_styles/andreas01/src/features.page +8 -0
  34. data/doc/examples/website_styles/andreas01/src/images/bg.gif +0 -0
  35. data/doc/examples/website_styles/andreas01/src/images/front.jpg +0 -0
  36. data/doc/examples/website_styles/andreas01/src/index.page +9 -0
  37. data/doc/examples/website_styles/andreas01/src/print.css +35 -0
  38. data/doc/examples/website_styles/andreas01/src/screenshots.page +18 -0
  39. data/doc/examples/website_styles/andreas03/README +9 -0
  40. data/doc/examples/website_styles/andreas03/config.yaml +2 -0
  41. data/doc/examples/website_styles/andreas03/src/about.page +12 -0
  42. data/doc/examples/website_styles/andreas03/src/default.css +223 -0
  43. data/doc/examples/website_styles/andreas03/src/default.template +60 -0
  44. data/doc/examples/website_styles/andreas03/src/download.page +15 -0
  45. data/doc/examples/website_styles/andreas03/src/features.page +8 -0
  46. data/doc/examples/website_styles/andreas03/src/images/bodybg.png +0 -0
  47. data/doc/examples/website_styles/andreas03/src/images/contbg.png +0 -0
  48. data/doc/examples/website_styles/andreas03/src/images/footerbg.png +0 -0
  49. data/doc/examples/website_styles/andreas03/src/images/gradient1.png +0 -0
  50. data/doc/examples/website_styles/andreas03/src/images/gradient2.png +0 -0
  51. data/doc/examples/website_styles/andreas03/src/index.page +9 -0
  52. data/doc/examples/website_styles/andreas03/src/screenshots.page +18 -0
  53. data/doc/examples/website_styles/andreas04/README +9 -0
  54. data/doc/examples/website_styles/andreas04/config.yaml +2 -0
  55. data/doc/examples/website_styles/andreas04/src/about.page +12 -0
  56. data/doc/examples/website_styles/andreas04/src/default.css +290 -0
  57. data/doc/examples/website_styles/andreas04/src/default.template +83 -0
  58. data/doc/examples/website_styles/andreas04/src/download.page +15 -0
  59. data/doc/examples/website_styles/andreas04/src/features.page +8 -0
  60. data/doc/examples/website_styles/andreas04/src/images/blinkarrow.gif +0 -0
  61. data/doc/examples/website_styles/andreas04/src/images/bodybg.png +0 -0
  62. data/doc/examples/website_styles/andreas04/src/images/contentbg.png +0 -0
  63. data/doc/examples/website_styles/andreas04/src/images/entrybg.png +0 -0
  64. data/doc/examples/website_styles/andreas04/src/images/flash.gif +0 -0
  65. data/doc/examples/website_styles/andreas04/src/images/flash2.gif +0 -0
  66. data/doc/examples/website_styles/andreas04/src/images/globe.gif +0 -0
  67. data/doc/examples/website_styles/andreas04/src/images/globebottom.gif +0 -0
  68. data/doc/examples/website_styles/andreas04/src/images/linkarrow.gif +0 -0
  69. data/doc/examples/website_styles/andreas04/src/images/menuhover.png +0 -0
  70. data/doc/examples/website_styles/andreas04/src/index.page +9 -0
  71. data/doc/examples/website_styles/andreas04/src/screenshots.page +18 -0
  72. data/doc/examples/website_styles/andreas05/README +9 -0
  73. data/doc/examples/website_styles/andreas05/config.yaml +2 -0
  74. data/doc/examples/website_styles/andreas05/src/about.page +12 -0
  75. data/doc/examples/website_styles/andreas05/src/default.css +33 -0
  76. data/doc/examples/website_styles/andreas05/src/default.template +42 -0
  77. data/doc/examples/website_styles/andreas05/src/download.page +15 -0
  78. data/doc/examples/website_styles/andreas05/src/features.page +8 -0
  79. data/doc/examples/website_styles/andreas05/src/images/bodybg.gif +0 -0
  80. data/doc/examples/website_styles/andreas05/src/images/front.png +0 -0
  81. data/doc/examples/website_styles/andreas05/src/index.page +9 -0
  82. data/doc/examples/website_styles/andreas05/src/screenshots.page +18 -0
  83. data/doc/examples/website_styles/andreas06/README +9 -0
  84. data/doc/examples/website_styles/andreas06/config.yaml +2 -0
  85. data/doc/examples/website_styles/andreas06/src/about.page +12 -0
  86. data/doc/examples/website_styles/andreas06/src/default.css +354 -0
  87. data/doc/examples/website_styles/andreas06/src/default.template +72 -0
  88. data/doc/examples/website_styles/andreas06/src/download.page +15 -0
  89. data/doc/examples/website_styles/andreas06/src/features.page +8 -0
  90. data/doc/examples/website_styles/andreas06/src/images/bodybg.gif +0 -0
  91. data/doc/examples/website_styles/andreas06/src/images/boxbg.gif +0 -0
  92. data/doc/examples/website_styles/andreas06/src/images/greypx.gif +0 -0
  93. data/doc/examples/website_styles/andreas06/src/images/header.jpg +0 -0
  94. data/doc/examples/website_styles/andreas06/src/images/innerbg.gif +0 -0
  95. data/doc/examples/website_styles/andreas06/src/images/leaves.jpg +0 -0
  96. data/doc/examples/website_styles/andreas06/src/images/tabs.gif +0 -0
  97. data/doc/examples/website_styles/andreas06/src/index.page +9 -0
  98. data/doc/examples/website_styles/andreas06/src/screenshots.page +18 -0
  99. data/doc/examples/website_styles/andreas07/README +9 -0
  100. data/doc/examples/website_styles/andreas07/config.yaml +2 -0
  101. data/doc/examples/website_styles/andreas07/src/about.page +12 -0
  102. data/doc/examples/website_styles/andreas07/src/browserfix.css +7 -0
  103. data/doc/examples/website_styles/andreas07/src/default.css +92 -0
  104. data/doc/examples/website_styles/andreas07/src/default.template +44 -0
  105. data/doc/examples/website_styles/andreas07/src/download.page +15 -0
  106. data/doc/examples/website_styles/andreas07/src/features.page +8 -0
  107. data/doc/examples/website_styles/andreas07/src/images/bodybg.gif +0 -0
  108. data/doc/examples/website_styles/andreas07/src/images/sidebarbg.gif +0 -0
  109. data/doc/examples/website_styles/andreas07/src/index.page +9 -0
  110. data/doc/examples/website_styles/andreas07/src/screenshots.page +18 -0
  111. data/doc/examples/website_styles/andreas08/README +9 -0
  112. data/doc/examples/website_styles/andreas08/config.yaml +2 -0
  113. data/doc/examples/website_styles/andreas08/src/about.page +12 -0
  114. data/doc/examples/website_styles/andreas08/src/default.css +224 -0
  115. data/doc/examples/website_styles/andreas08/src/default.template +53 -0
  116. data/doc/examples/website_styles/andreas08/src/download.page +15 -0
  117. data/doc/examples/website_styles/andreas08/src/features.page +8 -0
  118. data/doc/examples/website_styles/andreas08/src/index.page +9 -0
  119. data/doc/examples/website_styles/andreas08/src/screenshots.page +18 -0
  120. data/doc/examples/website_styles/andreas09/README +9 -0
  121. data/doc/examples/website_styles/andreas09/config.yaml +2 -0
  122. data/doc/examples/website_styles/andreas09/src/about.page +12 -0
  123. data/doc/examples/website_styles/andreas09/src/default.css +308 -0
  124. data/doc/examples/website_styles/andreas09/src/default.template +70 -0
  125. data/doc/examples/website_styles/andreas09/src/download.page +15 -0
  126. data/doc/examples/website_styles/andreas09/src/features.page +8 -0
  127. data/doc/examples/website_styles/andreas09/src/images/bodybg-black.jpg +0 -0
  128. data/doc/examples/website_styles/andreas09/src/images/bodybg-green.jpg +0 -0
  129. data/doc/examples/website_styles/andreas09/src/images/bodybg-orange.jpg +0 -0
  130. data/doc/examples/website_styles/andreas09/src/images/bodybg-purple.jpg +0 -0
  131. data/doc/examples/website_styles/andreas09/src/images/bodybg-red.jpg +0 -0
  132. data/doc/examples/website_styles/andreas09/src/images/bodybg.jpg +0 -0
  133. data/doc/examples/website_styles/andreas09/src/images/footerbg.jpg +0 -0
  134. data/doc/examples/website_styles/andreas09/src/images/menuhover-black.jpg +0 -0
  135. data/doc/examples/website_styles/andreas09/src/images/menuhover-green.jpg +0 -0
  136. data/doc/examples/website_styles/andreas09/src/images/menuhover-orange.jpg +0 -0
  137. data/doc/examples/website_styles/andreas09/src/images/menuhover-purple.jpg +0 -0
  138. data/doc/examples/website_styles/andreas09/src/images/menuhover-red.jpg +0 -0
  139. data/doc/examples/website_styles/andreas09/src/images/menuhover.jpg +0 -0
  140. data/doc/examples/website_styles/andreas09/src/index.page +9 -0
  141. data/doc/examples/website_styles/andreas09/src/screenshots.page +18 -0
  142. data/doc/examples/website_styles/default/README +9 -0
  143. data/doc/examples/website_styles/default/config.yaml +2 -0
  144. data/doc/examples/website_styles/default/src/about.page +12 -0
  145. data/doc/examples/website_styles/default/src/default.css +84 -0
  146. data/doc/examples/website_styles/default/src/default.template +38 -0
  147. data/doc/examples/website_styles/default/src/download.page +15 -0
  148. data/doc/examples/website_styles/default/src/features.page +8 -0
  149. data/doc/examples/website_styles/default/src/index.page +9 -0
  150. data/doc/examples/website_styles/default/src/screenshots.page +18 -0
  151. data/doc/examples/website_templates/default/README +8 -0
  152. data/doc/examples/website_templates/default/config.yaml +2 -0
  153. data/doc/examples/website_templates/default/src/default.css +84 -0
  154. data/doc/examples/website_templates/default/src/default.template +38 -0
  155. data/doc/examples/website_templates/default/src/index.page +8 -0
  156. data/doc/examples/website_templates/personal_hp/README +8 -0
  157. data/doc/examples/website_templates/personal_hp/config.yaml +2 -0
  158. data/doc/examples/website_templates/personal_hp/src/about.page +12 -0
  159. data/doc/examples/website_templates/personal_hp/src/default.css +84 -0
  160. data/doc/examples/website_templates/personal_hp/src/default.template +38 -0
  161. data/doc/examples/website_templates/personal_hp/src/index.page +9 -0
  162. data/doc/examples/website_templates/personal_hp/src/links.page +22 -0
  163. data/doc/examples/website_templates/personal_hp/src/projects.page +20 -0
  164. data/doc/examples/website_templates/project/README +9 -0
  165. data/doc/examples/website_templates/project/config.yaml +2 -0
  166. data/doc/examples/website_templates/project/src/about.page +12 -0
  167. data/doc/examples/website_templates/project/src/default.css +84 -0
  168. data/doc/examples/website_templates/project/src/default.template +38 -0
  169. data/doc/examples/website_templates/project/src/download.page +15 -0
  170. data/doc/examples/website_templates/project/src/features.page +8 -0
  171. data/doc/examples/website_templates/project/src/index.page +9 -0
  172. data/doc/examples/website_templates/project/src/screenshots.page +18 -0
  173. data/doc/plugin/gallery/slides/collage.rb +337 -0
  174. data/doc/src/default.template +4 -4
  175. data/doc/src/documentation/plugins/core/filehandler.page +6 -0
  176. data/doc/src/examples/gallery_styles/default/default.gallery +78 -0
  177. data/doc/src/examples/gallery_styles/default/gallery_gallery.template +38 -0
  178. data/doc/src/examples/gallery_styles/default/gallery_image.template +30 -0
  179. data/doc/src/examples/gallery_styles/default/gallery_main.template +18 -0
  180. data/doc/src/examples/gallery_styles/index.page +22 -0
  181. data/doc/src/examples/gallery_styles/slides/gallery_gallery.template +62 -0
  182. data/doc/src/examples/gallery_styles/slides/gallery_image.template +53 -0
  183. data/doc/src/examples/gallery_styles/slides/gallery_main.template +32 -0
  184. data/doc/src/examples/gallery_styles/slides/slides.gallery +79 -0
  185. data/doc/src/examples/sipttra_styles/default.page +5 -0
  186. data/doc/src/examples/sipttra_styles/default/css/sipttra.rcss +71 -0
  187. data/doc/src/examples/sipttra_styles/default/default.template +16 -0
  188. data/doc/src/examples/sipttra_styles/default/index.todo +60 -0
  189. data/doc/src/examples/sipttra_styles/default/js/sipttra.js +7 -0
  190. data/doc/src/examples/sipttra_styles/default/sipttra.template +105 -0
  191. data/doc/src/examples/sipttra_styles/index.page +17 -0
  192. data/doc/src/examples/website_styles/1024px.page +5 -0
  193. data/doc/src/examples/website_styles/andreas00.page +5 -0
  194. data/doc/src/examples/website_styles/andreas01.page +5 -0
  195. data/doc/src/examples/website_styles/andreas03.page +5 -0
  196. data/doc/src/examples/website_styles/andreas04.page +5 -0
  197. data/doc/src/examples/website_styles/andreas05.page +5 -0
  198. data/doc/src/examples/website_styles/andreas06.page +5 -0
  199. data/doc/src/examples/website_styles/andreas07.page +5 -0
  200. data/doc/src/examples/website_styles/andreas08.page +5 -0
  201. data/doc/src/examples/website_styles/andreas09.page +5 -0
  202. data/doc/src/examples/website_styles/default.page +5 -0
  203. data/doc/src/examples/website_styles/index.page +76 -0
  204. data/doc/src/examples/website_templates/default.page +5 -0
  205. data/doc/src/examples/website_templates/index.page +24 -0
  206. data/doc/src/examples/website_templates/personal_hp.page +5 -0
  207. data/doc/src/examples/website_templates/project.page +5 -0
  208. data/doc/src/news.page +8 -0
  209. data/lib/webgen/config.rb +1 -1
  210. data/lib/webgen/node.rb +4 -4
  211. data/lib/webgen/plugins/filehandlers/filehandler.rb +1 -1
  212. data/lib/webgen/plugins/filehandlers/gallery.rb +1 -1
  213. data/lib/webgen/plugins/filehandlers/page.rb +2 -2
  214. metadata +256 -2
@@ -0,0 +1,2 @@
1
+ Core/Configuration:
2
+ outDir: ../../../output/examples/website_templates/personal_hp
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: About Me
3
+ inMenu: true
4
+ orderInfo: 10
5
+ ---
6
+ h2. About Me
7
+
8
+ Here comes a description of myself, age, where born, what I do,...
9
+
10
+ h2. Curriculum Vitae
11
+
12
+ My curriculum vitae.
@@ -0,0 +1,84 @@
1
+
2
+ #all { background-color: #CCCCCC; }
3
+
4
+ #header {
5
+ border-bottom: 1px solid black;
6
+ padding: 1ex;
7
+ background-color: #888888;
8
+ }
9
+ #header h1 {
10
+ margin: 0ex;
11
+ font-size: 300%;
12
+ font-style: italic;
13
+ font-weight: normal;
14
+ }
15
+
16
+ , #headerbar { border-bottom: 1px solid black; }
17
+ #footer { border-top: 1px solid black; }
18
+
19
+ #body {
20
+ margin-left: 250px;
21
+ margin-right: 20px;
22
+ padding: 10px;
23
+ }
24
+
25
+ #menu {
26
+ float: left;
27
+ width: 230px;
28
+ padding: 20px 0px 0px 2px;
29
+ }
30
+
31
+ .bar {
32
+ clear: both;
33
+ padding: 3px;
34
+ text-align: center;
35
+ font-size: 90%;
36
+ background-color: #AAAAAA;
37
+ }
38
+
39
+ .left, .right {
40
+ padding: 0px 1em;
41
+ }
42
+
43
+ .left {
44
+ float: left;
45
+ text-align: left;
46
+ }
47
+
48
+ .right {
49
+ float: right;
50
+ text-align: right;
51
+ }
52
+
53
+ /* styling the menu */
54
+
55
+ #menu a, #menu span {
56
+ text-decoration: none;
57
+ font-weight: bold;
58
+ font-size: 130%;
59
+ }
60
+
61
+ #menu a:hover {
62
+ text-decoration: underline;
63
+ }
64
+
65
+ #menu .webgen-menu-item-selected {
66
+ border-left: 3px solid black;
67
+ }
68
+
69
+ #menu ul {
70
+ list-style-type: none;
71
+ padding: 0px;
72
+ margin-left: 10px;
73
+ }
74
+
75
+ #menu li > ul {
76
+ font-size: 95%;
77
+ }
78
+
79
+ #menu li {
80
+ margin: 0.0em 0px;
81
+ padding: 2px 0px;
82
+ padding-left: 5px;
83
+ border-left: 3px solid #CCCCCC;
84
+ }
@@ -0,0 +1,38 @@
1
+ --- content, html
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}">
5
+ <head>
6
+ <title>{title: }</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+ <meta name="description" content="Your description goes here..." />
9
+ <meta name="keywords" content="your,keywords,goes,here" />
10
+ <meta name="author" content="Your Name" />
11
+ <meta name="generator" content="webgen - http://webgen.rubyforge.com/" />
12
+ <link href="{relocatable: default.css}" rel="stylesheet" type="text/css" />
13
+ <link href="{resource: webgen-css}" rel="stylesheet" type="text/css" />
14
+ </head>
15
+ <body>
16
+ <div id="header">
17
+ <h1>{title: }</h1>
18
+ </div>
19
+
20
+ <div id="headerbar" class="bar">
21
+ <span class="left">Location: {breadcrumbTrail: }</span>
22
+ <span class="right">Language: {langbar: }</span>
23
+ <div style="clear:both"></div>
24
+ </div>
25
+
26
+ <div id="menu">
27
+ {menu: vertical}
28
+ </div>
29
+
30
+ <div id="body">
31
+ {block: }
32
+ </div>
33
+
34
+ <div id="footer" class="bar">
35
+ <a href="http://webgen.rubyforge.org"><img src="{resource: webgen-generated}" alt="Generated by webgen"/></a> on <b>{date: }</b>
36
+ </div>
37
+ </body>
38
+ </html>
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: Homepage
3
+ inMenu: true
4
+ orderInfo: 0
5
+ directoryName: ~
6
+ ---
7
+ h2. Welcome to my personal page!
8
+
9
+ This is my personal homepage! Have a look around to find out more about me!
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Links
3
+ inMenu: true
4
+ orderInfo: 100
5
+ ---
6
+ h2. Links
7
+
8
+ Here comes a list of web pages that I like or find useful!
9
+
10
+ h3. Personal
11
+
12
+ * "My Friend Buh":http://homepage-of-my-friend.buh - This is the homepage of my friend buh
13
+
14
+ h3. Programming
15
+
16
+ * "Ruby Homepage":http://www.ruby-lang.org - Homepage of the best computer language!
17
+ * "Freshmeat":http://freshmeat.net - Large collection of software
18
+
19
+ h3. General
20
+
21
+ * "Slashdot":http://slashdot.org - Where nerds find all their staff!
22
+ * "Heise News":http://heise.de - German news site
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: Projects
3
+ inMenu: true
4
+ orderInfo: 20
5
+ ---
6
+ h2. My Projects
7
+
8
+ Here comes a list of your software projects if you have any! Another way to do this would be to
9
+ create a subdirectory for your projects and use one page file for each project!
10
+
11
+ h3. DoItYourself V4.5
12
+
13
+ Description of project
14
+ Current version
15
+ Where to download?
16
+ Dependencies
17
+
18
+ h3. My other Project V 3.0
19
+
20
+ The same information as before
@@ -0,0 +1,9 @@
1
+ description:
2
+ This template provides the basic files for a website for a software project.
3
+ You just need to fill in the correct data in the provided files and there
4
+ you go!
5
+
6
+ author:
7
+ Thomas Leitner
8
+ ---
9
+ note: This file can be deleted!
@@ -0,0 +1,2 @@
1
+ Core/Configuration:
2
+ outDir: ../../../output/examples/website_templates/project
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: About
3
+ inMenu: true
4
+ orderInfo: 10
5
+ ---
6
+ h2. About Project XXX
7
+
8
+ Description of project!
9
+
10
+ h2. About the Author
11
+
12
+ bla bla bla
@@ -0,0 +1,84 @@
1
+
2
+ #all { background-color: #CCCCCC; }
3
+
4
+ #header {
5
+ border-bottom: 1px solid black;
6
+ padding: 1ex;
7
+ background-color: #888888;
8
+ }
9
+ #header h1 {
10
+ margin: 0ex;
11
+ font-size: 300%;
12
+ font-style: italic;
13
+ font-weight: normal;
14
+ }
15
+
16
+ , #headerbar { border-bottom: 1px solid black; }
17
+ #footer { border-top: 1px solid black; }
18
+
19
+ #body {
20
+ margin-left: 250px;
21
+ margin-right: 20px;
22
+ padding: 10px;
23
+ }
24
+
25
+ #menu {
26
+ float: left;
27
+ width: 230px;
28
+ padding: 20px 0px 0px 2px;
29
+ }
30
+
31
+ .bar {
32
+ clear: both;
33
+ padding: 3px;
34
+ text-align: center;
35
+ font-size: 90%;
36
+ background-color: #AAAAAA;
37
+ }
38
+
39
+ .left, .right {
40
+ padding: 0px 1em;
41
+ }
42
+
43
+ .left {
44
+ float: left;
45
+ text-align: left;
46
+ }
47
+
48
+ .right {
49
+ float: right;
50
+ text-align: right;
51
+ }
52
+
53
+ /* styling the menu */
54
+
55
+ #menu a, #menu span {
56
+ text-decoration: none;
57
+ font-weight: bold;
58
+ font-size: 130%;
59
+ }
60
+
61
+ #menu a:hover {
62
+ text-decoration: underline;
63
+ }
64
+
65
+ #menu .webgen-menu-item-selected {
66
+ border-left: 3px solid black;
67
+ }
68
+
69
+ #menu ul {
70
+ list-style-type: none;
71
+ padding: 0px;
72
+ margin-left: 10px;
73
+ }
74
+
75
+ #menu li > ul {
76
+ font-size: 95%;
77
+ }
78
+
79
+ #menu li {
80
+ margin: 0.0em 0px;
81
+ padding: 2px 0px;
82
+ padding-left: 5px;
83
+ border-left: 3px solid #CCCCCC;
84
+ }
@@ -0,0 +1,38 @@
1
+ --- content, html
2
+ <?xml version="1.0" encoding="UTF-8"?>
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}">
5
+ <head>
6
+ <title>{title: }</title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
+ <meta name="description" content="Your description goes here..." />
9
+ <meta name="keywords" content="your,keywords,goes,here" />
10
+ <meta name="author" content="Your Name" />
11
+ <meta name="generator" content="webgen - http://webgen.rubyforge.com/" />
12
+ <link href="{relocatable: default.css}" rel="stylesheet" type="text/css" />
13
+ <link href="{resource: webgen-css}" rel="stylesheet" type="text/css" />
14
+ </head>
15
+ <body>
16
+ <div id="header">
17
+ <h1>{title: }</h1>
18
+ </div>
19
+
20
+ <div id="headerbar" class="bar">
21
+ <span class="left">Location: {breadcrumbTrail: }</span>
22
+ <span class="right">Language: {langbar: }</span>
23
+ <div style="clear:both"></div>
24
+ </div>
25
+
26
+ <div id="menu">
27
+ {menu: vertical}
28
+ </div>
29
+
30
+ <div id="body">
31
+ {block: }
32
+ </div>
33
+
34
+ <div id="footer" class="bar">
35
+ <a href="http://webgen.rubyforge.org"><img src="{resource: webgen-generated}" alt="Generated by webgen"/></a> on <b>{date: }</b>
36
+ </div>
37
+ </body>
38
+ </html>
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Download
3
+ inMenu: true
4
+ orderInfo: 30
5
+ ---
6
+ h2. Download
7
+
8
+ Download link will be here!
9
+
10
+ List of dependencies:
11
+
12
+ * Dep One v. 3.3.3
13
+ * Dep Two v. 2.5.1 (optional)
14
+
15
+
@@ -0,0 +1,8 @@
1
+ ---
2
+ title: Features
3
+ inMenu: true
4
+ orderInfo: 20
5
+ ---
6
+ h2. Features
7
+
8
+ Here is the place where the feature list for your project should go.
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: Homepage
3
+ inMenu: true
4
+ orderInfo: 0
5
+ directoryName: Project XXX
6
+ ---
7
+ h2. Project XXX
8
+
9
+ This is the first page your viewers will see!
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: Screenshots
3
+ inMenu: true
4
+ orderInfo: 40
5
+ ---
6
+ h2. Screenshots
7
+
8
+ h3. Main View
9
+
10
+ Image of Main View
11
+
12
+ Description of image
13
+
14
+ h3. Next image
15
+
16
+ Image
17
+
18
+ bla bla bla
@@ -0,0 +1,337 @@
1
+ require 'rubygems'
2
+ require 'RMagick'
3
+
4
+ REF = self
5
+
6
+ module Collage
7
+
8
+ include REF
9
+
10
+ class Layouter < Webgen::Plugin
11
+
12
+ infos( :name => 'GalleryLayouter/slides',
13
+ :author => Webgen::AUTHOR,
14
+ :summary => 'Handles additional tasks for the gallery layout \'slides\''
15
+ )
16
+
17
+ depends_on 'Core/ResourceManager'
18
+
19
+ def initialize( plugin_manager )
20
+ super
21
+ @plugin_manager['Core/ResourceManager'].append_data( 'webgen-css', '
22
+ .thumb {
23
+ display:block;
24
+ }
25
+ ')
26
+ end
27
+
28
+ def handle_gallery( ginfo, parent )
29
+ # Create collage node
30
+ collage_writer = @plugin_manager['File/CollageWriter']
31
+ file_handler = @plugin_manager['Core/FileHandler']
32
+ node = file_handler.create_node( collage_name( ginfo ), parent, collage_writer ) do |fn, parent, h, mi|
33
+ h.create_node( fn, parent, mi, {:parent => parent, :ginfo => ginfo} )
34
+ end
35
+ ginfo[:collage_node] = node
36
+
37
+ # Create collage thumbnail node
38
+ collage_thumb_writer = @plugin_manager['File/CollageThumbWriter']
39
+ node = file_handler.create_node( collage_thumb_name( ginfo ), parent, collage_thumb_writer ) do |fn, parent, h, mi|
40
+ h.create_node( fn, parent, mi, {:parent => parent, :ginfo => ginfo} )
41
+ end
42
+ ginfo[:collage_thumb_node] = node
43
+
44
+ # Create background slide
45
+ slide_writer = @plugin_manager['File/SlideWriter']
46
+ node = file_handler.create_node( slide_name( ginfo ), parent, slide_writer ) do |fn, parent, h, mi|
47
+ h.create_node( fn, parent, mi, {:parent => parent, :ginfo => ginfo} )
48
+ end
49
+ ginfo[:slide_node] = node
50
+
51
+ slide_url = ginfo[:slide_node].to_url
52
+ css_url = slide_url + ( '/' + @plugin_manager['Core/ResourceManager'].get_resource( 'webgen-css' ).output_path )
53
+
54
+ @plugin_manager['Core/ResourceManager'].append_data( 'webgen-css', "
55
+ .thumb-#{collage_title(ginfo)} {
56
+ background: url(\"#{slide_url.route_from(css_url)}\") 0 0 no-repeat;
57
+ width: #{ginfo[:slide_node].slide_size[0]}px;
58
+ height: #{ginfo[:slide_node].slide_size[0]}px;
59
+ }
60
+ .thumb-#{collage_title(ginfo)} img {
61
+ padding: #{ginfo[:slide_node].slide_border_width}px;
62
+ }
63
+ .thumb-#{collage_title(ginfo)} img:hover {
64
+ border: 1px solid black;
65
+ }
66
+ ")
67
+ end
68
+
69
+ #######
70
+ private
71
+ #######
72
+
73
+ def collage_title( ginfo )
74
+ ginfo['title'].tr( ' ', '_' )
75
+ end
76
+
77
+ def collage_name( ginfo )
78
+ collage_title( ginfo ) + '_collage.jpg'
79
+ end
80
+
81
+ def collage_thumb_name( ginfo )
82
+ collage_title( ginfo ) + '_collage_tn.jpg'
83
+ end
84
+
85
+ def slide_name( ginfo )
86
+ collage_title( ginfo ) + '_slide.png'
87
+ end
88
+
89
+ end
90
+
91
+
92
+ class SlideWriter < FileHandlers::DefaultHandler
93
+
94
+ include Magick
95
+
96
+ infos( :name => 'File/SlideWriter',
97
+ :author => Webgen::AUTHOR,
98
+ :summary => 'Generates a slide background for image thumbnails' )
99
+
100
+ param 'borderWidth', 10, 'The width of the slide border'
101
+ param 'color', '#ffffff', 'The color of the slide'
102
+
103
+ def create_node( path, parent, meta_info, data )
104
+ node = Node.new( parent, File.basename( path ) )
105
+ node.meta_info.update( meta_info )
106
+ node.node_info[:data] = data
107
+ node.node_info[:processor] = self
108
+
109
+ node
110
+ end
111
+
112
+ def slide_size( node )
113
+ (node.node_info[:data][:ginfo]['thumbnailSize'] || param( 'thumbnailSize', 'File/ThumbnailWriter' )).split('x').collect{ |s| s.to_i + slide_border_width( node )*2 }
114
+ end
115
+
116
+ def slide_color( node )
117
+ node.node_info[:data][:ginfo]['slideColor'] || param( 'color' )
118
+ end
119
+
120
+ def slide_border_width( node )
121
+ node.node_info[:data][:ginfo]['slideBorderWidth'] || param( 'borderWidth' )
122
+ end
123
+
124
+ def create_slide( node )
125
+ return if node.node_info[:slide]
126
+
127
+ ginfo = node.node_info[:data][:ginfo]
128
+
129
+ width, height = node.slide_size
130
+ border_width = node.slide_border_width
131
+
132
+ slide = Image.new( width, height ) { self.background_color = 'transparent' }
133
+
134
+ gc = Magick::Draw.new
135
+ gc.fill_opacity(0)
136
+ gc.stroke( node.slide_color )
137
+ gc.stroke_width( border_width )
138
+ gc.roundrectangle( border_width/2, border_width/2, width-border_width/2, height-border_width/2, 5, 5)
139
+ gc.draw(slide)
140
+
141
+ node.node_info[:slide] = slide
142
+ end
143
+
144
+ def write_node( node )
145
+ return if File.exists?( node.full_path ) #TODO always create? what settings to check?
146
+ create_slide( node )
147
+ node.node_info[:slide].write( node.full_path )
148
+ end
149
+
150
+ end
151
+
152
+
153
+ # Most of the code in create_slide, backandforth and creat_collage is from Corban Brook from
154
+ # his tutorial
155
+ # http://schf.uc.org/articles/2006/10/18/render-greatlooking-collages-with-ruby-and-rmagick
156
+ # and has slightly been adapted for use in this gallery style.
157
+ class CollageWriter < FileHandlers::DefaultHandler
158
+
159
+ include Magick
160
+
161
+ infos( :name => 'File/CollageWriter',
162
+ :author => Webgen::AUTHOR,
163
+ :summary => 'Generates a pretty collage for the main gallery page' )
164
+
165
+ param 'size', '700x300', 'The size of the generated collage'
166
+ param 'color', '#CCCCCC', 'The background color of the collage'
167
+
168
+ def create_node( path, parent, meta_info, data )
169
+ node = Node.new( parent, File.basename( path ) )
170
+ node.meta_info.update( meta_info )
171
+ node.node_info[:data] = data
172
+ node.node_info[:processor] = self
173
+ node
174
+ end
175
+
176
+ def collage_size( node )
177
+ (node.node_info[:data][:ginfo]['collageSize'] || param( 'size' )).split('x').collect{ |s| s.to_i}
178
+ end
179
+
180
+ def collage_color( node )
181
+ node.node_info[:data][:ginfo]['collageColor'] || param( 'color' )
182
+ end
183
+
184
+ def create_collage( node )
185
+ return if node.node_info[:collage]
186
+ parent = node.node_info[:data][:parent]
187
+ ginfo = node.node_info[:data][:ginfo]
188
+
189
+ ginfo[:slide_node].create_slide
190
+
191
+ width, height = node.collage_size
192
+ slide_border_width = ginfo[:slide_node].slide_border_width
193
+ slide_width, slide_height = ginfo[:slide_node].slide_size
194
+
195
+ # create background
196
+ create_collage_background( node )
197
+ collage = node.node_info[:collage_background]
198
+
199
+ # fetch four random images
200
+ images = []
201
+ (1..4).each do
202
+ gal_number = rand(ginfo.galleries.length)
203
+ pic_number = rand(ginfo.galleries[gal_number].images.length)
204
+ redo if images.include?( [gal_number, pic_number] )
205
+ images << [gal_number, pic_number]
206
+ end
207
+
208
+ # create main image
209
+ base_image = images.shift
210
+ base_image = ginfo.galleries[base_image[0]].images[base_image[1]]
211
+ base_image_file = File.join( parent.node_info[:src], base_image.filename )
212
+ photo = Image.read( base_image_file ).first
213
+ photo.crop_resized!( width - slide_border_width*2, height*2/3 - slide_border_width )
214
+ collage.composite!( photo, slide_border_width, slide_border_width, OverCompositeOp )
215
+
216
+ # Arrange the other three images
217
+ (images.size-1).downto(0) do |i|
218
+ image = ginfo.galleries[i[0]].images[i[1]]
219
+ image_file = File.join( parent.node_info[:src], image.filename )
220
+ slide = create_slide( ginfo, image_file, slide_width, slide_height, slide_border_width )
221
+ collage.composite!( slide, width/2 - slide_width*3/2 + i * slide_width*2/3 + rand(15),
222
+ height*2/3 - slide_height*2/3 + rand(15), OverCompositeOp)
223
+ end
224
+
225
+ node.node_info[:collage] = collage
226
+ end
227
+
228
+ def write_node( node )
229
+ return if File.exists?( node.full_path ) #TODO always create? what settings to check?
230
+ return if node.node_info[:data][:ginfo].galleries.length == 1
231
+ create_collage( node )
232
+ node.node_info[:collage].write( node.full_path )
233
+ end
234
+
235
+ #######
236
+ private
237
+ #######
238
+
239
+ def create_collage_background( node )
240
+ return if node.node_info[:collage_background]
241
+
242
+ ginfo = node.node_info[:data][:ginfo]
243
+ width, height = node.collage_size
244
+ color = node.collage_color
245
+ slide_color = ginfo[:slide_node].slide_color
246
+ slide_border_width = ginfo[:slide_node].slide_border_width
247
+
248
+ temp = Image.new( width, height ) { self.background_color = color }
249
+ pic = Image.new( width, height) { self.background_color = 'transparent' }
250
+
251
+ gc = Draw.new
252
+ gc.fill( color )
253
+ gc.stroke( slide_color )
254
+ gc.stroke_width( slide_border_width )
255
+ gc.rectangle( slide_border_width/2, slide_border_width/2, width-slide_border_width/2-3, height*2/3 )
256
+ gc.draw(pic)
257
+
258
+ shadow = pic.shadow( 0, 0, 0.1, '20%' )
259
+ temp.composite!( shadow, 3, 3, OverCompositeOp )
260
+ temp.composite!( pic, 0, 0, OverCompositeOp )
261
+
262
+ node.node_info[:collage_background] = temp
263
+ end
264
+
265
+ def backandforth(degree)
266
+ polarity = rand(2) * -1
267
+ (polarity < 0 ? rand(degree) * polarity : rand(degree) )
268
+ end
269
+
270
+ def create_slide( ginfo, filename, s_width, s_height, s_border_width )
271
+ slide = ginfo[:slide_node].node_info[:slide].clone
272
+ slide_background = Image.new( slide.columns, slide.rows ) { self.background_color = 'transparent' }
273
+ photo = Image.read( filename ).first
274
+
275
+ i_width = s_width - s_border_width*2
276
+ i_height = s_height - s_border_width*2
277
+
278
+ # create a grey scale gradient fill for our mask
279
+ mask_fill = GradientFill.new( 0, 0, 0, i_height, '#FFFFFF', '#AAAAAA' )
280
+ mask = Image.new( i_width, i_height, mask_fill )
281
+ # create thumbnail sized square image of photo
282
+ photo.crop_resized!( i_width, i_height )
283
+
284
+ # apply alpha mask to slide
285
+ photo.matte = true
286
+ mask.matte = false
287
+ photo.composite!( mask, 0, 0, CopyOpacityCompositeOp )
288
+
289
+ # composite photo and slide on transparent background
290
+ slide_background.composite!( photo, s_border_width, s_border_width, OverCompositeOp)
291
+ slide_background.composite!( slide, 0, 0, OverCompositeOp)
292
+
293
+ # rotate slide a little bit
294
+ slide_background.rotate!( backandforth(40) )
295
+
296
+ # create workspace to apply shadow
297
+ workspace = Image.new( slide_background.columns+5, slide_background.rows+5 ) { self.background_color = 'transparent' }
298
+ shadow = slide_background.shadow( 0, 0, 0.1, '20%' )
299
+ workspace.composite!( shadow, 3, 3, OverCompositeOp )
300
+ workspace.composite!( slide_background, NorthWestGravity, OverCompositeOp )
301
+
302
+ return workspace
303
+ end
304
+
305
+ end
306
+
307
+
308
+ class CollageThumbWriter < FileHandlers::DefaultHandler
309
+
310
+ include Magick
311
+
312
+ infos( :name => 'File/CollageThumbWriter',
313
+ :author => Webgen::AUTHOR,
314
+ :summary => 'Generates a thumbnail of a collage image' )
315
+
316
+ def create_node( path, parent, meta_info, data )
317
+ node = Node.new( parent, File.basename( path ) )
318
+ node.meta_info.update( meta_info )
319
+ node.node_info[:data] = data
320
+ node.node_info[:processor] = self
321
+ node
322
+ end
323
+
324
+ def write_node( node )
325
+ return if File.exists?( node.full_path ) #TODO always create? what settings to check?
326
+ return if node.node_info[:data][:ginfo].galleries.length == 1
327
+ ginfo = node.node_info[:data][:ginfo]
328
+ ginfo[:collage_node].create_collage
329
+ collage = ginfo[:collage_node].node_info[:collage]
330
+ collage.change_geometry( ginfo[:slide_node].slide_size.collect {|s| s*2}.join('x') ) {|c,r,i| i.resize!( c, r )}
331
+ collage.write( node.full_path )
332
+ end
333
+
334
+ end
335
+
336
+
337
+ end