equal
deleted
inserted
replaced
12 XXX: URLEncode unicode -> str! |
12 XXX: URLEncode unicode -> str! |
13 """ |
13 """ |
14 |
14 |
15 return tags.a(href=to_page.path_from(from_page)) |
15 return tags.a(href=to_page.path_from(from_page)) |
16 |
16 |
17 def image_link (from_page, image) : |
17 def image_link (from_page, image, image_html) : |
18 """ |
18 """ |
19 Link to the given image |
19 Link to the given image |
20 """ |
20 """ |
21 |
21 |
22 return link_from(from_page, imgae.html)( |
22 return link_from(from_page, image_html)( |
23 tags.img(src=image.path_from(from_page)) |
23 tags.img(src=image.path_from(from_page)) |
24 ) |
24 ) |
25 |
25 |
26 def image_page (image) : |
26 def image_page (image) : |
27 """ |
27 """ |
34 tags.h1(image.title) if image.title else None, |
34 tags.h1(image.title) if image.title else None, |
35 |
35 |
36 # image-links |
36 # image-links |
37 tags.p( |
37 tags.p( |
38 # prev thumb |
38 # prev thumb |
39 image_link(image.html, image.prev.thumb) if image.prev else None, |
39 image_link(image.html, image.prev.thumb, image.prev.html) if image.prev else None, |
40 |
40 |
41 # preview |
41 # preview |
42 image_link(image.html, image.preview), |
42 image_link(image.html, image.preview, image), |
43 |
43 |
44 # next thumb |
44 # next thumb |
45 image_link(image.html, image.next.thumb) if image.next else None |
45 image_link(image.html, image.next.thumb, image.next.html) if image.next else None |
46 ), |
46 ), |
47 |
47 |
48 # optional description |
48 # optional description |
49 tags.p(image.description) if image.description else None, |
49 tags.p(image.description) if image.description else None, |
50 ), |
50 ), |
120 # upper paginate |
120 # upper paginate |
121 paginate, |
121 paginate, |
122 |
122 |
123 # image thumbnails |
123 # image thumbnails |
124 (( |
124 (( |
125 image_link(folder, image) |
125 image_link(folder, image, image.html) |
126 ) for image in folder.images), |
126 ) for image in folder.images), |
127 |
127 |
128 # lower paginate |
128 # lower paginate |
129 paginate, |
129 paginate, |
130 |
130 |