gf-ralbum 0.0.2 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -0
- data/bin/{ralbum.rb → ralbum} +1 -1
- data/example/example.sh +2 -1
- data/example/test_jalbum_phototree/jalbum-settings.jap +321 -0
- data/example/test_jalbum_phototree/src/albumfiles.txt +9 -0
- data/example/test_jalbum_phototree/src/comments.properties +0 -0
- data/example/test_jalbum_phototree/src/flowers/albumfiles.txt +14 -0
- data/example/test_jalbum_phototree/src/meta.properties +2 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/album.xml +0 -0
- data/example/test_rubyphoto_phototree/flowers/IMG_1469.wt.jpg +0 -0
- data/example/test_rubyphoto_phototree/flowers/IMG_2291.jpg +0 -0
- data/example/test_rubyphoto_phototree/flowers/IMG_2598.jpg +0 -0
- data/example/test_rubyphoto_phototree/flowers/IMG_3068.jpg +0 -0
- data/example/test_rubyphoto_phototree/flowers/IMG_3323.jpg +0 -0
- data/example/test_rubyphoto_phototree/flowers/IMG_3348.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/r_photo01.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/r_photo01.jpg.xml +0 -0
- data/example/{test_phototree/catalog_data → test_rubyphoto_phototree/ralbum}/md5_to_key.yaml +0 -0
- data/example/{test_phototree/catalog_data → test_rubyphoto_phototree/ralbum}/md5_to_key.yaml.test +0 -0
- data/example/{test_phototree/catalog_data → test_rubyphoto_phototree/ralbum}/project.xml +206 -3
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/album.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo01.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo01.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo02.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo02.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo03.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo03.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo04.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum01/subalbum01_photo04.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/album.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo01.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo01.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo02.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo02.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo03.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo03.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo04.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo04.jpg.xml +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo05.jpg +0 -0
- data/example/{test_phototree → test_rubyphoto_phototree}/subalbum02/subalbum02_photo05.jpg.xml +0 -0
- data/lib/ralbum.rb +9 -5
- data/lib/ralbum/album_tree/album.rb +74 -0
- data/lib/ralbum/album_tree/generate_album_tree_node_visitor.rb +73 -0
- data/lib/ralbum/album_tree/image_file.rb +88 -0
- data/lib/ralbum/{image_pool.rb → album_tree/image_pool.rb} +16 -4
- data/lib/ralbum/catalog.rb +7 -7
- data/lib/ralbum/cli/cli_ralbum.rb +66 -25
- data/lib/ralbum/image_strategies/copy_image_strategy.rb +16 -0
- data/lib/ralbum/image_strategies/linked_image_strategy.rb +18 -0
- data/lib/ralbum/image_strategies/scaled_image_strategy.rb +52 -0
- data/lib/ralbum/image_strategies/sepia_scaled_image_strategy.rb +50 -0
- data/lib/{ralbum-common → ralbum}/object_with_properties.rb +0 -0
- data/lib/{ralbum-common → ralbum}/object_with_validation.rb +0 -0
- data/lib/ralbum/photo_tree/jalbum_photo_tree.rb +83 -0
- data/lib/ralbum/photo_tree/photo_file.rb +149 -0
- data/lib/ralbum/photo_tree/photo_tree_item.rb +68 -0
- data/lib/ralbum/{photo_tree_node.rb → photo_tree/photo_tree_node.rb} +16 -13
- data/lib/ralbum/{photo_tree_builder.rb → photo_tree/rubyphoto_photo_tree.rb} +64 -46
- data/lib/ralbum/project.rb +48 -12
- data/lib/ralbum/skin.rb +34 -27
- data/lib/ralbum/skin_engine.rb +32 -17
- data/lib/ralbum/skin_engines/erb_skin_engine.rb +2 -5
- data/lib/ralbum/skin_engines/kwartz_skin_engine.rb +6 -9
- data/lib/ralbum/skin_manager.rb +11 -2
- data/lib/ralbum/skins/cgi/cgi_skin.rb +21 -23
- data/lib/ralbum/skins/cgi/res/model.rb +30 -32
- data/lib/ralbum/skins/gfold/inc/menu_bottom.html +53 -53
- data/lib/ralbum/skins/gfold/inc/menu_top.html +71 -71
- data/lib/ralbum/skins/gfold/inc/page_footer.html +28 -28
- data/lib/ralbum/skins/gfold/out/album_page.rb +316 -316
- data/lib/ralbum/skins/gfold/out/image_page.rb +231 -231
- data/lib/ralbum/skins/gfold/out/tree_page.rb +96 -96
- data/lib/ralbum/skins/gfold/res/prototype.js +3277 -3277
- data/lib/ralbum/skins/gfold/template/album_page.html +161 -161
- data/lib/ralbum/skins/gfold/template/album_page.plogic +127 -127
- data/lib/ralbum/skins/gfold/template/image_page.html +91 -91
- data/lib/ralbum/skins/gfold/template/image_page.plogic +70 -70
- data/lib/ralbum/skins/gfold/template/tree_page.html +79 -79
- data/lib/ralbum/skins/gfold/template/tree_page.plogic +45 -45
- data/lib/ralbum/skins/js/out/album_page.rb +2 -2
- data/lib/ralbum/skins/js/out/tree_page.rb +18 -17
- data/lib/ralbum/skins/js/template/album_page.html +2 -2
- data/lib/ralbum/skins/js/template/tree_page.html +1 -1
- data/lib/ralbum/skins/test_erb/template/album_page.rhtml +22 -0
- data/lib/ralbum/skins/test_erb/template/image_page.rhtml +44 -0
- data/lib/ralbum/tasks/compile_skins.rb +8 -0
- data/test/ralbum/cli/tc_cli_ralbum.rb +35 -0
- data/test/ralbum/image_strategies/tc_scaled_image_strategy.rb +18 -0
- data/test/ralbum/image_strategies/tc_sepia_scaled_image_strategy.rb +18 -0
- data/test/ralbum/photo_tree/tc_jalbum_photo_tree.rb +39 -0
- data/test/ralbum/photo_tree/tc_photo_file.rb +13 -0
- data/test/ralbum/{tc_01_photo_tree.rb → photo_tree/tc_photo_tree.rb} +10 -12
- data/test/ralbum/photo_tree/tc_rubyalbum_photo_tree.rb +20 -0
- data/test/ralbum/tc_album.rb +55 -0
- data/test/ralbum/tc_catalog.rb +8 -4
- data/test/ralbum/tc_image_pool.rb +37 -0
- data/test/ralbum/{tc_05_kwartz_skin_engine.rb → tc_kwartz_skin_engine.rb} +1 -1
- data/test/ralbum/{tc_04_skin_manager.rb → tc_skin_manager.rb} +8 -3
- data/test/ralbum/test_helper.rb +16 -1
- data/test_data/ralbum/test_data/is_test/dummy.txt +0 -0
- metadata +78 -81
- data/bin/ralbum-JPG2jpg.rb +0 -90
- data/bin/ralbum-compile_skins.rb +0 -18
- data/bin/ralbum-myconv.rb +0 -81
- data/bin/ralbum-readexif.rb +0 -18
- data/bin/ralbum-reorder.rb +0 -200
- data/lib/ralbum/album.rb +0 -66
- data/lib/ralbum/generate_album_tree_node_visitor.rb +0 -60
- data/lib/ralbum/image_file.rb +0 -81
- data/lib/ralbum/image_strategy.rb +0 -143
- data/lib/ralbum/photo_tree_item.rb +0 -89
- data/test/ralbum/cli/test_cli_ralbum.rb +0 -13
- data/test/ralbum/tc_02_photo_tree_builder.rb +0 -20
- data/test/ralbum/tc_03_album.rb +0 -42
- data/test/ralbum/tc_06_image_strategy.rb +0 -21
- data/test/test_ralbum.rb +0 -14
- data/test_data/ralbum/test_data/is_test/r_photo01_scaled.jpg +0 -0
- data/test_data/ralbum/test_data/is_test/r_photo01_sepia_scaled.jpg +0 -0
@@ -1,231 +1,231 @@
|
|
1
|
-
module View
|
2
|
-
|
3
|
-
(@@proc_table ||= {})['image_page'] = proc do
|
4
|
-
_buf = ""; _buf << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
|
5
|
-
pagename='albums'
|
6
|
-
_buf << "<html>\n";
|
7
|
-
language=nil
|
8
|
-
_buf << "<head>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
|
20
|
-
<table align=\"center\" summary=\"\" width=\"100%\">
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
if pagename=='index' then
|
25
|
-
_buf << "
|
26
|
-
end
|
27
|
-
if pagename!='index' then
|
28
|
-
_buf << "
|
29
|
-
end
|
30
|
-
_buf << "
|
31
|
-
if pagename=='albums' then
|
32
|
-
_buf << "
|
33
|
-
end
|
34
|
-
if pagename!='albums' then
|
35
|
-
_buf << "
|
36
|
-
end
|
37
|
-
_buf << "
|
38
|
-
|
39
|
-
<span class=\"menusel\" id=\"if:pagename=='projects'\">Projects</span>
|
40
|
-
<a class=\"menu\" href=\"/projects.html\" id=\"if:pagename!='projects'\">Projects</a>
|
41
|
-
|
|
42
|
-
-->\n";
|
43
|
-
if pagename=='guestbook' then
|
44
|
-
_buf << "
|
45
|
-
end
|
46
|
-
if pagename!='guestbook' then
|
47
|
-
_buf << "
|
48
|
-
|
49
|
-
|
50
|
-
end
|
51
|
-
_buf << "
|
52
|
-
if pagename=='cv' then
|
53
|
-
_buf << "
|
54
|
-
end
|
55
|
-
if pagename!='cv' then
|
56
|
-
_buf << "
|
57
|
-
end
|
58
|
-
_buf << "
|
59
|
-
if pagename=='contactme' then
|
60
|
-
_buf << "
|
61
|
-
end
|
62
|
-
if pagename!='contactme' then
|
63
|
-
_buf << "
|
64
|
-
end
|
65
|
-
_buf << "
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<script language=\"javascript\" type=\"text/javascript\">
|
75
|
-
writemenu();
|
76
|
-
</script>
|
77
|
-
-->
|
78
|
-
|
79
|
-
if not language.nil? then
|
80
|
-
_buf << "
|
81
|
-
|
82
|
-
if language=='it' then
|
83
|
-
_buf << "
|
84
|
-
end
|
85
|
-
if language!='it' then
|
86
|
-
_buf << "
|
87
|
-
end
|
88
|
-
_buf << "
|
89
|
-
if language=='en' then
|
90
|
-
_buf << "
|
91
|
-
end
|
92
|
-
if language!='en' then
|
93
|
-
_buf << "
|
94
|
-
end
|
95
|
-
end
|
96
|
-
_buf << "
|
97
|
-
|
98
|
-
|
99
|
-
</table>
|
100
|
-
|
101
|
-
<table class=\"maintable\" align=\"center\"
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
item_ctr = 0
|
108
|
-
for item in @image.breadcrumbs
|
109
|
-
item_ctr += 1
|
110
|
-
if item_ctr > 1
|
111
|
-
_buf << "
|
112
|
-
end
|
113
|
-
item_path = item[:path] # retrieve path and
|
114
|
-
item_title = item[:title] # title from a hash
|
115
|
-
if item_path.nil? # if path is null then
|
116
|
-
_buf << (item_title).to_s; else
|
117
|
-
_buf << "
|
118
|
-
_buf << (item_title).to_s; _buf << "
|
119
|
-
end
|
120
|
-
end
|
121
|
-
_buf << "
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
if @image.
|
142
|
-
_buf << "
|
143
|
-
|
144
|
-
end
|
145
|
-
if @image.
|
146
|
-
_buf << "
|
147
|
-
|
148
|
-
end
|
149
|
-
_buf << "
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
if @image.
|
181
|
-
_buf << "
|
182
|
-
|
183
|
-
end
|
184
|
-
if @image.
|
185
|
-
_buf << "
|
186
|
-
|
187
|
-
end
|
188
|
-
_buf << "
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
</table>
|
196
|
-
|
197
|
-
<div id=\"footer\">
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
</div>
|
212
|
-
|
213
|
-
</body>
|
214
|
-
</html>
|
215
|
-
|
216
|
-
\n";
|
217
|
-
; _buf
|
218
|
-
end#proc
|
219
|
-
|
220
|
-
module_function
|
221
|
-
def expand_image_page(context={})
|
222
|
-
if context.is_a?(Hash)
|
223
|
-
hash = context
|
224
|
-
context = Object.new
|
225
|
-
hash.each { |key, val| context.instance_variable_set("@#{key}", val) }
|
226
|
-
end
|
227
|
-
proc_obj = @@proc_table['image_page']
|
228
|
-
context.instance_eval(&proc_obj)
|
229
|
-
end
|
230
|
-
|
231
|
-
end
|
1
|
+
module View
|
2
|
+
|
3
|
+
(@@proc_table ||= {})['image_page'] = proc do
|
4
|
+
_buf = ""; _buf << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
|
5
|
+
pagename='albums'
|
6
|
+
_buf << "<html>\n";
|
7
|
+
language=nil
|
8
|
+
_buf << " <head>
|
9
|
+
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>
|
10
|
+
<title>Giovanni Ferro - "; _buf << ERB::Util.h(@image.name); _buf << "</title>
|
11
|
+
<meta name=\"Description\" content=\"Giovanni Ferro photos\"/>
|
12
|
+
<meta name=\"keywords\" content=\"Giovanni Ferro,photo,pictures,digital photography\"/>
|
13
|
+
<link rel=\"stylesheet\" type=\"text/css\" href=\""; _buf << ("#{@image.relroot}res/style1.css").to_s; _buf << "\" media=\"screen\" title=\"style1\"/>
|
14
|
+
<link rel=\"alternate stylesheet\" type=\"text/css\" href=\""; _buf << ("#{@image.relroot}res/style2.css").to_s; _buf << "\" media=\"screen\" title=\"style2\"/>
|
15
|
+
<script type=\"text/javascript\" src=\""; _buf << ("#{@image.relroot}res/prototype.js").to_s; _buf << "\"></script>
|
16
|
+
<script type=\"text/javascript\" src=\""; _buf << ("#{@image.relroot}res/styleswitcher.js").to_s; _buf << "\"></script>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
|
20
|
+
<table align=\"center\" summary=\"\" width=\"100%\">
|
21
|
+
<tr>
|
22
|
+
<td align=\"center\">
|
23
|
+
\n";
|
24
|
+
if pagename=='index' then
|
25
|
+
_buf << " <span class=\"menusel\">Home</span>\n";
|
26
|
+
end
|
27
|
+
if pagename!='index' then
|
28
|
+
_buf << " <a class=\"menu\" href=\"/index.html\">Home</a>\n";
|
29
|
+
end
|
30
|
+
_buf << " |\n";
|
31
|
+
if pagename=='albums' then
|
32
|
+
_buf << " <span class=\"menusel\">Albums</span>\n";
|
33
|
+
end
|
34
|
+
if pagename!='albums' then
|
35
|
+
_buf << " <a class=\"menu\" href=\"/albums/html/\">Albums</a>\n";
|
36
|
+
end
|
37
|
+
_buf << " |
|
38
|
+
<!--
|
39
|
+
<span class=\"menusel\" id=\"if:pagename=='projects'\">Projects</span>
|
40
|
+
<a class=\"menu\" href=\"/projects.html\" id=\"if:pagename!='projects'\">Projects</a>
|
41
|
+
|
|
42
|
+
-->\n";
|
43
|
+
if pagename=='guestbook' then
|
44
|
+
_buf << " <span class=\"menusel\">Guestbook</span>\n";
|
45
|
+
end
|
46
|
+
if pagename!='guestbook' then
|
47
|
+
_buf << " <a class=\"menu\" href=\"/guestbook/gb.cgi?act=view\">
|
48
|
+
Guestbook
|
49
|
+
</a>\n";
|
50
|
+
end
|
51
|
+
_buf << " |\n";
|
52
|
+
if pagename=='cv' then
|
53
|
+
_buf << " <span class=\"menusel\">Curriculum</span>\n";
|
54
|
+
end
|
55
|
+
if pagename!='cv' then
|
56
|
+
_buf << " <a class=\"menu\" href=\"/cv_it.html\">Curriculum</a>\n";
|
57
|
+
end
|
58
|
+
_buf << " |\n";
|
59
|
+
if pagename=='contactme' then
|
60
|
+
_buf << " <span class=\"menusel\">Contact Me</span>\n";
|
61
|
+
end
|
62
|
+
if pagename!='contactme' then
|
63
|
+
_buf << " <a class=\"menu\" href=\"/contactme/contactme.cgi\">Contact Me</a>\n";
|
64
|
+
end
|
65
|
+
_buf << "
|
66
|
+
-
|
67
|
+
|
68
|
+
<span class=\"menutext\"> style: </span>
|
69
|
+
<a class=\"menu\" href=\"#\" onclick=\"javascript: as.enable('style1');return false;\">1</a>
|
70
|
+
<span class=\"menutext\"> | </span>
|
71
|
+
<a class=\"menu\" href=\"#\" onclick=\"javascript: as.enable('style2'); return false;\">2</a>
|
72
|
+
|
73
|
+
<!--
|
74
|
+
<script language=\"javascript\" type=\"text/javascript\">
|
75
|
+
writemenu();
|
76
|
+
</script>
|
77
|
+
-->
|
78
|
+
\n";
|
79
|
+
if not language.nil? then
|
80
|
+
_buf << " -
|
81
|
+
<span class=\"menutext\"> lang: </span>\n";
|
82
|
+
if language=='it' then
|
83
|
+
_buf << " <span class=\"menusel\">it</span>\n";
|
84
|
+
end
|
85
|
+
if language!='it' then
|
86
|
+
_buf << " <a class=\"menu\" href=\""; _buf << ERB::Util.h(pagename); _buf << "_it.html\">it</a>\n";
|
87
|
+
end
|
88
|
+
_buf << " |\n";
|
89
|
+
if language=='en' then
|
90
|
+
_buf << " <span class=\"menusel\">en</span>\n";
|
91
|
+
end
|
92
|
+
if language!='en' then
|
93
|
+
_buf << " <a class=\"menu\" href=\""; _buf << ERB::Util.h(pagename); _buf << "_en.html\">en</a>\n";
|
94
|
+
end
|
95
|
+
end
|
96
|
+
_buf << "
|
97
|
+
</td>
|
98
|
+
</tr>
|
99
|
+
</table>
|
100
|
+
|
101
|
+
<table class=\"maintable\" align=\"center\"
|
102
|
+
border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
|
103
|
+
|
104
|
+
<!-- Breadcrumbs or Trail -->
|
105
|
+
<tr>
|
106
|
+
<td class=\"album_breadcrumbs\">\n";
|
107
|
+
item_ctr = 0
|
108
|
+
for item in @image.breadcrumbs
|
109
|
+
item_ctr += 1
|
110
|
+
if item_ctr > 1
|
111
|
+
_buf << " <span class=\"album_treepathdots\">::</span>\n";
|
112
|
+
end
|
113
|
+
item_path = item[:path] # retrieve path and
|
114
|
+
item_title = item[:title] # title from a hash
|
115
|
+
if item_path.nil? # if path is null then
|
116
|
+
_buf << (item_title).to_s; else
|
117
|
+
_buf << " <a class=\"album_treepath\" href=\""; _buf << ERB::Util.h(@image.relroot + item_path); _buf << "\">\n";
|
118
|
+
_buf << (item_title).to_s; _buf << " </a>\n";
|
119
|
+
end
|
120
|
+
end
|
121
|
+
_buf << " </td>
|
122
|
+
<td class=\"album_breadcrumbs\" align=\"right\">
|
123
|
+
"; _buf << ERB::Util.h(@image.name); _buf << "
|
124
|
+
</td>
|
125
|
+
</tr>
|
126
|
+
|
127
|
+
<!-- description + navigation buttons -->
|
128
|
+
<tr>
|
129
|
+
<td>
|
130
|
+
"; _buf << ERB::Util.h(@image.description); _buf << "
|
131
|
+
</td>
|
132
|
+
<td align=\"right\" valign=\"top\" width=\"30%\" nowrap=\"nowrap\">
|
133
|
+
|
134
|
+
<span id=\"nav_buttons\">
|
135
|
+
<a href=\""; _buf << ERB::Util.h(@image.relroot_with_prefix); _buf << "index.html\" title=\"Up to top\"><img
|
136
|
+
src=\""; _buf << ("#{@image.relroot}res/top.gif").to_s; _buf << "\" border=\"0\" alt=\"Top\"/></a>
|
137
|
+
|
138
|
+
<a title=\"Up to album\" href=\"index.html\"><img
|
139
|
+
src=\""; _buf << ("#{@image.relroot}res/up.gif").to_s; _buf << "\" border=\"0\" alt=\"Up\"/></a>
|
140
|
+
\n";
|
141
|
+
if @image.prev_page_url!=nil then
|
142
|
+
_buf << " <a title=\"Prev photo\" href=\""; _buf << ERB::Util.h(@image.prev_page_url); _buf << "\"><img
|
143
|
+
src=\""; _buf << ("#{@image.relroot}res/left.gif").to_s; _buf << "\" border=\"0\" alt=\"Prev\"/></a>\n";
|
144
|
+
end
|
145
|
+
if @image.next_page_url!=nil then
|
146
|
+
_buf << " <a title=\"Next photo\" href=\""; _buf << ERB::Util.h(@image.next_page_url); _buf << "\"><img
|
147
|
+
src=\""; _buf << ("#{@image.relroot}res/right.gif").to_s; _buf << "\" border=\"0\" alt=\"Next\"/></a>\n";
|
148
|
+
end
|
149
|
+
_buf << " </span>
|
150
|
+
|
151
|
+
</td>
|
152
|
+
</tr>
|
153
|
+
|
154
|
+
<!-- image -->
|
155
|
+
<tr>
|
156
|
+
<td colspan=\"2\" align=\"center\">
|
157
|
+
<a href=\""; _buf << ERB::Util.h(@image.relroot + @image.src_url); _buf << "\"><img border=\"0\"
|
158
|
+
src=\""; _buf << ("#{@image.relroot + @image.page_url}").to_s; _buf << "\"
|
159
|
+
alt=\"Giovanni Ferro - "; _buf << ERB::Util.h(@image.name); _buf << "\"/></a>
|
160
|
+
</td>
|
161
|
+
</tr>
|
162
|
+
|
163
|
+
<!-- image footer -->
|
164
|
+
<tr>
|
165
|
+
<td colspan=\"2\">
|
166
|
+
<table width=\"100%\">
|
167
|
+
<tr>
|
168
|
+
<td align=\"left\" class=\"small\">
|
169
|
+
"; _buf << ERB::Util.h(@image.size); _buf << "K JPEG image,
|
170
|
+
"; _buf << ERB::Util.h(@image.width); _buf << "X"; _buf << ERB::Util.h(@image.height); _buf << " pixels
|
171
|
+
</td>
|
172
|
+
<td align=\"right\">
|
173
|
+
<span id=\"nav_buttons\">
|
174
|
+
<a href=\""; _buf << ERB::Util.h(@image.relroot_with_prefix); _buf << "index.html\" title=\"Up to top\"><img
|
175
|
+
src=\""; _buf << ("#{@image.relroot}res/top.gif").to_s; _buf << "\" border=\"0\" alt=\"Top\"/></a>
|
176
|
+
|
177
|
+
<a title=\"Up to album\" href=\"index.html\"><img
|
178
|
+
src=\""; _buf << ("#{@image.relroot}res/up.gif").to_s; _buf << "\" border=\"0\" alt=\"Up\"/></a>
|
179
|
+
\n";
|
180
|
+
if @image.prev_page_url!=nil then
|
181
|
+
_buf << " <a title=\"Prev photo\" href=\""; _buf << ERB::Util.h(@image.prev_page_url); _buf << "\"><img
|
182
|
+
src=\""; _buf << ("#{@image.relroot}res/left.gif").to_s; _buf << "\" border=\"0\" alt=\"Prev\"/></a>\n";
|
183
|
+
end
|
184
|
+
if @image.next_page_url!=nil then
|
185
|
+
_buf << " <a title=\"Next photo\" href=\""; _buf << ERB::Util.h(@image.next_page_url); _buf << "\"><img
|
186
|
+
src=\""; _buf << ("#{@image.relroot}res/right.gif").to_s; _buf << "\" border=\"0\" alt=\"Next\"/></a>\n";
|
187
|
+
end
|
188
|
+
_buf << " </span>
|
189
|
+
</td>
|
190
|
+
</tr>
|
191
|
+
</table>
|
192
|
+
</td>
|
193
|
+
</tr>
|
194
|
+
|
195
|
+
</table>
|
196
|
+
|
197
|
+
<div id=\"footer\">
|
198
|
+
<div class=\"left\">
|
199
|
+
Copyright © 2002-2004, <b>Giovanni Ferro</b>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
<div class=\"right\">
|
203
|
+
<a href=\"http://validator.w3.org/check?uri=referer\"><img
|
204
|
+
style=\"border:0;\" src=\""; _buf << ("#{@image.relroot}res/valid-xhtml.png").to_s; _buf << "\"
|
205
|
+
alt=\"Valid XHTML\"/></a>
|
206
|
+
|
207
|
+
<a href=\"http://jigsaw.w3.org/css-validator/check/referer/\"><img
|
208
|
+
style=\"border:0;\" src=\""; _buf << ("#{@image.relroot}res/valid-css.png").to_s; _buf << "\"
|
209
|
+
alt=\"Valid CSS\"/></a>
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
</body>
|
214
|
+
</html>
|
215
|
+
|
216
|
+
\n";
|
217
|
+
; _buf
|
218
|
+
end#proc
|
219
|
+
|
220
|
+
module_function
|
221
|
+
def expand_image_page(context={})
|
222
|
+
if context.is_a?(Hash)
|
223
|
+
hash = context
|
224
|
+
context = Object.new
|
225
|
+
hash.each { |key, val| context.instance_variable_set("@#{key}", val) }
|
226
|
+
end
|
227
|
+
proc_obj = @@proc_table['image_page']
|
228
|
+
context.instance_eval(&proc_obj)
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|