summaryrefslogtreecommitdiff
path: root/templates/template_index.html
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2015-01-04 19:58:05 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2015-01-04 19:58:05 +0100
commit1f9e7dee25dfd002b6b1ab4636faa9a24f74d09f (patch)
treefb8343fddb4e6931cd361f78b30b292532a03dfa /templates/template_index.html
parent6f6d8002d318d502ca1f645f95a4c018871c70b3 (diff)
downloadcataract-1f9e7dee25dfd002b6b1ab4636faa9a24f74d09f.tar.xz
generators: Use single function for all templates
This commit makes use of a common function for all template parsing and page writing. The behaviour is controlled by the "item" argument passed in. This allows us to have a single code that generates code for list of items as well as for a single item. In the future, this can be used for e.g. combining thumbnails and large images on the same page. Other than that this commit also brings several other changes: - further clarification of theming setup XML file - <protected_thumbnail> tag has been moved out of the <album> structure into the <index> structure where it functionally belongs. Only whole albums can be protected and the substitute thumbnail is displayed on index pages. - position marker format has been broken out to a constant - added few more FIXMEs to mark places that will change soon - some template variables have been renamed
Diffstat (limited to 'templates/template_index.html')
-rw-r--r--templates/template_index.html34
1 files changed, 6 insertions, 28 deletions
diff --git a/templates/template_index.html b/templates/template_index.html
index 9f90bfe..36d4eec 100644
--- a/templates/template_index.html
+++ b/templates/template_index.html
@@ -52,39 +52,17 @@
<!-- ## Albums -->
<div class="index_thumbs">
<!-- $(BEGIN_IMG_LIST) -->
- <!-- $(BEGIN_IMG_LIST_LANDSCAPE) -->
+ <!-- $(BEGIN_LIST_PICTURE) -->
<div class="index_item">
- <div class="position_marker" id="$(IMG_LIST_ID)"></div>
+ <div class="position_marker" id="$(IMG_POS_MARKER)"></div>
<a href="$(ALBUM_SUBPATH)">
- <img src="$(IMG_THUMBNAIL)" width="$(IMG_SIZE_THUMB_W)" height="$(IMG_SIZE_THUMB_H)" alt="" />
- <span class="album_text"><!-- $(IMG_TITLE) --></span><br />
- <span class="album_subtext"><!-- $(IMG_DESCRIPTION) --><!-- $(ifdef(IS_PROTECTED)) --><span class="album_protected_note"><br /><br />(This album is password protected)</span><!-- $(endif(IS_PROTECTED)) --></span>
+ <img src="$(IMG_SRC_THUMB)" width="$(IMG_SIZE_THUMB_W)" height="$(IMG_SIZE_THUMB_H)" alt="" />
+ <span class="album_text_$(THUMB_ORIENTATION)"><!-- $(IMG_TITLE) --></span><br />
+ <span class="album_subtext_$(THUMB_ORIENTATION)"><!-- $(IMG_DESCRIPTION) --><!-- $(ifdef(IS_PROTECTED)) --><span class="album_protected_note"><br /><br />(This album is password protected)</span><!-- $(endif(IS_PROTECTED)) --></span>
<span class="album_note">(<!-- $(ALBUM_NUM_ITEMS) --> items)</span>
</a>
</div>
- <!-- $(END_IMG_LIST_LANDSCAPE) -->
- <!-- $(BEGIN_IMG_LIST_PORTRAIT) -->
- <div class="index_item">
- <div class="position_marker" id="$(IMG_LIST_ID)"></div>
- <a href="$(ALBUM_SUBPATH)">
- <img src="$(IMG_THUMBNAIL)" width="$(IMG_SIZE_THUMB_W)" height="$(IMG_SIZE_THUMB_H)" alt="" />
- <span class="album_text_portrait"><!-- $(IMG_TITLE) --></span><br />
- <span class="album_subtext_portrait"><!-- $(IMG_DESCRIPTION) --><!-- $(ifdef(IS_PROTECTED)) --><span class="album_protected_note"><br /><br />(This album is password protected)</span><!-- $(endif(IS_PROTECTED)) --></span>
- <span class="album_note">(<!-- $(ALBUM_NUM_ITEMS) --> items)</span>
- </a>
- </div>
- <!-- $(END_IMG_LIST_PORTRAIT) -->
- <!-- $(BEGIN_IMG_LIST_SQUARED) -->
- <div class="index_item">
- <div class="position_marker" id="$(IMG_LIST_ID)"></div>
- <a href="$(ALBUM_SUBPATH)">
- <img src="$(IMG_THUMBNAIL)" width="$(IMG_SIZE_THUMB_W)" height="$(IMG_SIZE_THUMB_H)" alt="" />
- <span class="album_text_squared"><!-- $(IMG_TITLE) --></span><br />
- <span class="album_subtext_squared"><!-- $(IMG_DESCRIPTION) --><!-- $(ifdef(IS_PROTECTED)) --><span class="album_protected_note"><br /><br />(This album is password protected)</span><!-- $(endif(IS_PROTECTED)) --></span>
- <span class="album_note">(<!-- $(ALBUM_NUM_ITEMS) --> items)</span>
- </a>
- </div>
- <!-- $(END_IMG_LIST_SQUARED) -->
+ <!-- $(END_LIST_PICTURE) -->
<!-- $(BEGIN_LIST_SEPARATOR) -->
<div class="separators">
<div class="album_list_separator"><!-- $(LIST_SEPARATOR_TITLE) --></div>