Skip to content

Commit

Permalink
Latest updates, slideshow, about
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Bayfield committed Mar 27, 2015
1 parent 9672119 commit 8f4d3d1
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 9 deletions.
20 changes: 19 additions & 1 deletion less/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,25 @@ body {
text-overflow: ellipsis;
}

#navigationButtons {
text-align: center;
margin-bottom: 15px;
font-size: 1.6em;
a {
text-decoration: none;
}
span.glyphicon {
margin-left: 25px;
margin-right: 25px;
}
}

#slideshow {
#navigationButtons {
margin-top: 20px;
}
}

#theImage {
position: relative;
overflow-x: hidden;
Expand Down Expand Up @@ -192,7 +211,6 @@ body {
a {
padding-left: 20px;
padding-right: 20px;
text-decoration:none;
}
}

Expand Down
23 changes: 23 additions & 0 deletions template/about.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<div class="navbar-brand"><a href="{$U_HOME}">{'Home'|@translate}</a>{$LEVEL_SEPARATOR}<a href>{'About'|@translate}</a></div>
</div>
</div>
</nav>

{include file='infos_errors.tpl'}

<div class="container">
{$ABOUT_MESSAGE}
{if isset($THEME_ABOUT) }
<ul>
<li>{$THEME_ABOUT}</li>
</ul>
{/if}
{if not empty($about_msgs)}
{foreach from=$about_msgs item=elt}
{$elt}
{/foreach}
{/if}
</div>
2 changes: 2 additions & 0 deletions template/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@
</div>
</nav>

{if !isset($slideshow)}
<div class="jumbotron">
<div class="container">
{$PAGE_BANNER}
</div>
</div>
{/if}

{if not empty($header_msgs)}
{foreach from=$header_msgs item=msg}
Expand Down
6 changes: 3 additions & 3 deletions template/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
{if isset($favorite)}
<li>
<a href="{$favorite.U_FAVORITE}" title="{'Delete all photos from your favorites'|@translate}" rel="nofollow">
<span class="glyphicon glyphicon-remove"></span><span class="glyphicon-text">{'Delete all photos from your favorites'|@translate}</span>
<span class="glyphicon glyphicon-heart"></span><span class="glyphicon-text">{'Delete all photos from your favorites'|@translate}</span>
</a>
</li>
{/if}
{if isset($U_CADDIE)}
<li>
<a href="{$U_CADDIE}" title="{'Add to caddie'|@translate}">
<span class="glyphicon glyphicon-flag"></span><span class="glyphicon-text">{'Caddie'|@translate}</span>
<span class="glyphicon glyphicon-plus-sign"></span><span class="glyphicon-text">{'Caddie'|@translate}</span>
</a>
</li>
{/if}
Expand Down Expand Up @@ -81,7 +81,7 @@
{if isset($U_MODE_NORMAL)}
<li>
{strip}<a href="{$U_MODE_NORMAL}" title="{'return to normal view mode'|@translate}">
<span class="glyphicon glyphicon-repeat"></span><span class="glyphicon-text">{'return to normal view mode'|@translate}</span>
<span class="glyphicon glyphicon-home"></span><span class="glyphicon-text">{'return to normal view mode'|@translate}</span>
</a>{/strip}
</li>
{/if}
Expand Down
12 changes: 8 additions & 4 deletions template/picture.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
{/if}
{if isset($U_SLIDESHOW_START)}
<li>
<a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow">
<span class="glyphicon glyphicon-play"></span><span class="glyphicon-text">{'slideshow'|@translate}</span>
<a href="{$U_SLIDESHOW_START}" title="{'Slideshow'|@translate}" rel="nofollow">
<span class="glyphicon glyphicon-play"></span><span class="glyphicon-text">{'Slideshow'|@translate}</span>
</a>
</li>
{/if}
Expand All @@ -68,14 +68,14 @@
{/if}
{if isset($favorite)}
<li>
<a href="{$favorite.U_FAVORITE}" title="{if $favorite.IS_FAVORITE}{'delete this photo from your favorites'|@translate}{else}{'add this photo to your favorites'|@translate}{/if}" rel="nofollow">
<a href="{$favorite.U_FAVORITE}" title="{if $favorite.IS_FAVORITE}{'Delete this photo from your favorites'|@translate}{else}{'Add this photo to your favorites'|@translate}{/if}" rel="nofollow">
<span class="glyphicon glyphicon-heart{if !$favorite.IS_FAVORITE}-empty{/if}"></span><span class="glyphicon-text">{'Favorites'|@translate}</span>
</a>
</li>
{/if}
{if isset($U_SET_AS_REPRESENTATIVE)}
<li>
<a id="cmdSetRepresentative" href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" rel="nofollow">
<a id="cmdSetRepresentative" href="{$U_SET_AS_REPRESENTATIVE}" title="{'Set as album representative'|@translate}" rel="nofollow">
<span class="glyphicon glyphicon-link"></span><span class="glyphicon-text">{'representative'|@translate}</span>
</a>
</li>
Expand Down Expand Up @@ -112,6 +112,10 @@

{include file='infos_errors.tpl'}

<div class="container">
{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
</div>

<div id="theImage">
{$ELEMENT_CONTENT}
</div>
Expand Down
119 changes: 119 additions & 0 deletions template/picture_nav_buttons.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<div id="navigationButtons">
{if $DISPLAY_NAV_BUTTONS or isset($slideshow)}
{if isset($slideshow)}
{if isset($slideshow.U_INC_PERIOD)}
<a href="{$slideshow.U_INC_PERIOD}" title="{'Reduce diaporama speed'|@translate}" class="pwg-state-default pwg-button">
<span class="glyphicon glyphicon-minus"></span><span class="glyphicon-text">{'Reduce diaporama speed'|@translate}</span>
</a>
{else}
<span class="glyphicon glyphicon-minus"></span><span class="glyphicon-text">{'Reduce diaporama speed'|@translate}</span>
{/if}
{if isset($slideshow.U_DEC_PERIOD)}
<a href="{$slideshow.U_DEC_PERIOD}" title="{'Accelerate diaporama speed'|@translate}" class="pwg-state-default pwg-button">
<span class="glyphicon glyphicon-plus"></span><span class="glyphicon-text">{'Accelerate diaporama speed'|@translate}</span>
</a>
{else}
<span class="glyphicon glyphicon-plus"></span><span class="glyphicon-text">{'Accelerate diaporama speed'|@translate}</span>
{/if}
{/if}
{if isset($slideshow.U_START_REPEAT)}
<a href="{$slideshow.U_START_REPEAT}" title="{'Repeat the slideshow'|@translate}" class="pwg-state-default pwg-button">
<span class="glyphicon glyphicon-repeat"></span><span class="glyphicon-text">{'Repeat the slideshow'|@translate}</span>
</a>
{/if}
{* TODO need an icon for this
{if isset($slideshow.U_STOP_REPEAT)}
<a href="{$slideshow.U_STOP_REPEAT}" title="{'Not repeat the slideshow'|@translate}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-repeat-stop"></span><span class="glyphicon-text">{'Not repeat the slideshow'|@translate}</span>
</a>
{/if} *}
{*<!--{strip}{if isset($first)}
<a href="{$first.U_IMG}" title="{'First'|@translate} : {$first.TITLE}" class="pwg-state-default pwg-button">
<span class="pwg-icon pwg-icon-arrowstop-w">&nbsp;</span><span class="pwg-button-text">{'First'|@translate}</span>
</a>
{else}
<span class="pwg-state-disabled pwg-button">
<span class="pwg-icon pwg-icon-arrowstop-w">&nbsp;</span><span class="pwg-button-text">{'First'|@translate}</span>
</span>
{/if}{/strip}-->*}
{strip}{if isset($previous)}
<a href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE_ESC}">
<span class="glyphicon glyphicon-chevron-left"></span><span class="glyphicon-text">{'Previous'|@translate}</span>
</a>
{else}
<span class="glyphicon glyphicon-chevron-left"></span><span class="glyphicon-text">{'Previous'|@translate}</span>
{/if}{/strip}
{strip}{if isset($U_UP) and !isset($slideshow)}
<a href="{$U_UP}" title="{'Thumbnails'|@translate}">
<span class="glyphicon glyphicon-home"></span><span class="glyphicon-text">{'Thumbnails'|@translate}</span>
</a>
{/if}{/strip}
{if isset($slideshow.U_START_PLAY)}
<a href="{$slideshow.U_START_PLAY}" title="{'Play slideshow'|@translate}">
<span class="glyphicon glyphicon-play"></span><span class="glyphicon-text">{'Play slideshow'|@translate}</span>
</a>
{/if}
{if isset($slideshow.U_STOP_PLAY)}
<a href="{$slideshow.U_STOP_PLAY}" title="{'Pause slideshow'|@translate}">
<span class="glyphicon glyphicon-pause"></span><span class="glyphicon-text">{'Pause slideshow'|@translate}</span>
</a>
{/if}
{if isset($U_SLIDESHOW_STOP) }
<a href="{$U_SLIDESHOW_STOP}" title="{'Stop slideshow'|@translate}">
<span class="glyphicon glyphicon-stop"></span><span class="glyphicon-text">{'Stop slideshow'|@translate}</span>
</a>
{/if}
{strip}{if isset($next)}
<a href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE_ESC}">
<span class="glyphicon glyphicon-chevron-right"></span><span class="glyphicon-text">{'Next'|@translate}</span>
</a>
{else}
<span class="glyphicon glyphicon-chevron-right"></span><span class="glyphicon-text">{'Next'|@translate}</span>
{/if}{/strip}
{*<!--{strip}{if isset($last)}
<a href="{$last.U_IMG}" title="{'Last'|@translate} : {$last.TITLE}" class="pwg-state-default pwg-button pwg-button-icon-right">
<span class="pwg-icon pwg-icon-arrowstop-e"></span><span class="pwg-button-text">{'Last'|@translate}</span>
</a>
{else}
<span class="pwg-state-disabled pwg-button pwg-button-icon-right">
<span class="pwg-icon pwg-icon-arrowstop-e">&nbsp;</span><span class="pwg-button-text">{'Last'|@translate}</span>
</span>
{/if}{/strip}-->*}
{/if}
</div>
{strip}
{footer_script}
document.onkeydown = function(e){ldelim}
e=e||window.event;
if (e.altKey) return true;
var target=e.target||e.srcElement;
if (target && target.type) return true;{* an input editable element *}
var keyCode=e.keyCode||e.which, docElem=document.documentElement, url;
switch(keyCode){ldelim}
{if isset($next)}
case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth)url="{$next.U_IMG}"; break;
{/if}
{if isset($previous)}
case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0)url="{$previous.U_IMG}"; break;
{/if}
{if isset($first)}
{* Home *}case 36: if (e.ctrlKey)url="{$first.U_IMG}"; break;
{/if}
{if isset($last)}
{* End *}case 35: if (e.ctrlKey)url="{$last.U_IMG}"; break;
{/if}
{if isset($U_UP) and !isset($slideshow)}
{* Up *}case 38: if (e.ctrlKey)url="{$U_UP}"; break;
{/if}
{if isset($slideshow.U_START_PLAY)}
{* Pause *}case 32: url="{$slideshow.U_START_PLAY}"; break;
{/if}
{if isset($slideshow.U_STOP_PLAY)}
{* Play *}case 32: url="{$slideshow.U_STOP_PLAY}"; break;
{/if}
}
if (url) {ldelim}window.location=url.replace("&amp;","&"); return false;}
return true;
}
{/footer_script}
{/strip}
15 changes: 15 additions & 0 deletions template/slideshow.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div id="slideshow">
{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}

<div id="theImage">
{$ELEMENT_CONTENT}
</div>

{if isset($COMMENT_IMG)}
<div class="container">
<section id="important-info">
<p class="imageComment">{$COMMENT_IMG}</p>
</section>
</div>
{/if}
<div>
16 changes: 15 additions & 1 deletion theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,21 @@ body {
overflow: hidden;
text-overflow: ellipsis;
}
#navigationButtons {
text-align: center;
margin-bottom: 15px;
font-size: 1.6em;
}
#navigationButtons a {
text-decoration: none;
}
#navigationButtons span.glyphicon {
margin-left: 25px;
margin-right: 25px;
}
#slideshow #navigationButtons {
margin-top: 20px;
}
#theImage {
position: relative;
overflow-x: hidden;
Expand Down Expand Up @@ -784,7 +799,6 @@ body {
#share a {
padding-left: 20px;
padding-right: 20px;
text-decoration: none;
}
#commentList .comment {
clear: both;
Expand Down

0 comments on commit 8f4d3d1

Please sign in to comment.