summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2014-09-17 23:46:41 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2014-09-17 23:46:41 +0200
commit8846646f54a3740d272387511b91c3d3e5ae3283 (patch)
tree7af82c3257f713d7e048a9c920ea778d1fc032d5 /templates
parentd8708c220afc84549e5e4feaa09f32aa46aba4b5 (diff)
downloadcataract-8846646f54a3740d272387511b91c3d3e5ae3283.tar.xz
theming: Make navigation bar strongly themed
Navigation bar can be complex and comprises of several different elements. Until now the navigation bar was almost hardcoded. We needed to separate different types of navigation bar elements: * NAV_BAR_FIRST - the first element, usually denoting gallery root. This element takes priority and is used when there are no other elements in the path. * NAV_BAR_ELEM - normal element used in the path between first and last elements. * NAV_BAR_LAST - ending element, guaranteed there's at least the NAV_BAR_FIRST element before. * NAV_BAR_CURRENT - non-clickable informational element displaying the current page title. Optional, in contrast to the former three defines. * NAV_BAR_CURRENT_ROOT - a special case of the latter one, displayed at the very root page. Also optional, in that case the navigation bar would become empty.
Diffstat (limited to 'templates')
-rw-r--r--templates/template_album.html20
-rw-r--r--templates/template_index.html20
-rw-r--r--templates/template_picture.html20
3 files changed, 57 insertions, 3 deletions
diff --git a/templates/template_album.html b/templates/template_album.html
index 3d0af4f..5413c5e 100644
--- a/templates/template_album.html
+++ b/templates/template_album.html
@@ -14,7 +14,25 @@
<!-- ## Navigation bar -->
<div class="navigation">
- <div class="navlinks"><!-- $(NAV_BAR) --></div>
+ <div class="navlinks">
+ <!-- $(BEGIN_NAV_BAR) -->
+ <!-- $(BEGIN_NAV_BAR_FIRST) -->
+ <a href="$(NAV_BAR_ELEM_LINK)" rel="home"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_FIRST) -->
+ <!-- $(BEGIN_NAV_BAR_ELEM) -->
+ <a href="$(NAV_BAR_ELEM_LINK)"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_ELEM) -->
+ <!-- $(BEGIN_NAV_BAR_LAST) -->
+ <a href="$(NAV_BAR_ELEM_LINK)"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_LAST) -->
+ <!-- $(BEGIN_NAV_BAR_CURRENT) -->
+ <!-- $(NAV_BAR_ELEM_TITLE) -->
+ <!-- $(END_NAV_BAR_CURRENT) -->
+ <!-- $(BEGIN_NAV_BAR_CURRENT_ROOT) -->
+ <!-- $(NAV_BAR_ELEM_TITLE) -->
+ <!-- $(END_NAV_BAR_CURRENT_ROOT) -->
+ <!-- $(END_NAV_BAR) -->
+ </div>
<div class="navposition">
<span class="navposnumber"><!-- $(TOTAL_ITEMS) --> items</span>
</div>
diff --git a/templates/template_index.html b/templates/template_index.html
index 7229933..9f90bfe 100644
--- a/templates/template_index.html
+++ b/templates/template_index.html
@@ -14,7 +14,25 @@
<!-- ## Navigation bar -->
<div class="navigation">
- <div class="navlinks"><!-- $(NAV_BAR) --></div>
+ <div class="navlinks">
+ <!-- $(BEGIN_NAV_BAR) -->
+ <!-- $(BEGIN_NAV_BAR_FIRST) -->
+ <a href="$(NAV_BAR_ELEM_LINK)" rel="home"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_FIRST) -->
+ <!-- $(BEGIN_NAV_BAR_ELEM) -->
+ <a href="$(NAV_BAR_ELEM_LINK)"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_ELEM) -->
+ <!-- $(BEGIN_NAV_BAR_LAST) -->
+ <a href="$(NAV_BAR_ELEM_LINK)"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_LAST) -->
+ <!-- $(BEGIN_NAV_BAR_CURRENT) -->
+ <!-- $(NAV_BAR_ELEM_TITLE) -->
+ <!-- $(END_NAV_BAR_CURRENT) -->
+ <!-- $(BEGIN_NAV_BAR_CURRENT_ROOT) -->
+ <!-- $(NAV_BAR_ELEM_TITLE) -->
+ <!-- $(END_NAV_BAR_CURRENT_ROOT) -->
+ <!-- $(END_NAV_BAR) -->
+ </div>
<div class="navposition">
<span class="navposnumber"><!-- $(TOTAL_ITEMS) --> albums</span>
</div>
diff --git a/templates/template_picture.html b/templates/template_picture.html
index 1e500a7..6bd5291 100644
--- a/templates/template_picture.html
+++ b/templates/template_picture.html
@@ -14,7 +14,25 @@
<!-- ## Navigation bar -->
<div class="navigation">
- <div class="navlinks"><!-- $(NAV_BAR) --></div>
+ <div class="navlinks">
+ <!-- $(BEGIN_NAV_BAR) -->
+ <!-- $(BEGIN_NAV_BAR_FIRST) -->
+ <a href="$(NAV_BAR_ELEM_LINK)" rel="home"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_FIRST) -->
+ <!-- $(BEGIN_NAV_BAR_ELEM) -->
+ <a href="$(NAV_BAR_ELEM_LINK)"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_ELEM) -->
+ <!-- $(BEGIN_NAV_BAR_LAST) -->
+ <a href="$(NAV_BAR_ELEM_LINK)"><!-- $(NAV_BAR_ELEM_TITLE) --></a> &gt;
+ <!-- $(END_NAV_BAR_LAST) -->
+ <!-- $(BEGIN_NAV_BAR_CURRENT) -->
+ <!-- $(NAV_BAR_ELEM_TITLE) -->
+ <!-- $(END_NAV_BAR_CURRENT) -->
+ <!-- $(BEGIN_NAV_BAR_CURRENT_ROOT) -->
+ <!-- $(NAV_BAR_ELEM_TITLE) -->
+ <!-- $(END_NAV_BAR_CURRENT_ROOT) -->
+ <!-- $(END_NAV_BAR) -->
+ </div>
<div class="navposition">
<span class="navposnumber"><!-- $(FILE_NO) --></span> of <span class="navposnumber"><!-- $(TOTAL_ITEMS) --></span>
<span class="navposspacer"></span>