mirror of
https://github.com/thumbsup/thumbsup
synced 2024-11-17 15:25:50 +00:00
e36464a76a
The main changes are - this introduces relative paths, since some HTML files have to go ".." to get to public/media - it also introduces the difference between album.path (OS dependent) and album.url (forward slashes)
97 lines
2.6 KiB
Handlebars
97 lines
2.6 KiB
Handlebars
<div id="content">
|
|
|
|
<!--
|
|
Gallery title
|
|
-->
|
|
<header style="color: #17baef;">
|
|
<h1><a href="{{relative gallery.home.url}}">{{gallery.title}}</a></h1>
|
|
</header>
|
|
|
|
<!--
|
|
Breadcrumbs of parent albums
|
|
-->
|
|
|
|
<nav class="breadcrumbs">
|
|
<div class="mask"></div>
|
|
{{#each breadcrumbs~}}
|
|
<a class="breadcrumb-item" href="{{relative url}}">{{title}}</a>
|
|
<span class="separator">></span>
|
|
{{~/each~}}
|
|
<a class="breadcrumb-item" href="{{relative album.url}}">{{album.title}}</a>
|
|
</nav>
|
|
|
|
<!--
|
|
Main gallery panel
|
|
-->
|
|
<section id="content">
|
|
|
|
<!--
|
|
Nested albums, if any
|
|
-->
|
|
<ul id="albums">
|
|
{{#each album.albums~}}
|
|
<li>
|
|
<a href="{{relative url}}">
|
|
<h3>{{title}}</h3>
|
|
<div class="meta">
|
|
<time>{{{date stats.fromDate}}} - {{{date stats.toDate}}}</time><span class="separator">,</span>
|
|
<span class="summary">{{summary}}</span>
|
|
</div>
|
|
<ul class="grid clearfix">
|
|
{{~#slice previews count=8~}}
|
|
<li><img src="{{relative this.urls.thumb}}" /></li>
|
|
{{~/slice}}
|
|
</ul>
|
|
</a>
|
|
</li>
|
|
{{~/each}}
|
|
</ul>
|
|
|
|
<!--
|
|
All photos and videos
|
|
-->
|
|
<ul id="media">
|
|
{{#each album.files}}
|
|
{{#if isVideo~}}
|
|
<li data-html="#media{{id}}"
|
|
data-poster="{{relative urls.poster}}"
|
|
data-download-url="{{{relative (download this)}}}">
|
|
<a href="{{{relative (download this)}}}">
|
|
<img src="{{relative urls.thumb}}"
|
|
width="{{@root.gallery.thumbSize}}"
|
|
height="{{@root.gallery.thumbSize}}"
|
|
alt="{{relative filename}}" />
|
|
</a>
|
|
<img class="video-overlay" src="{{relative 'public/play.png'}}" />
|
|
</li>
|
|
{{else}}
|
|
<li data-src="{{relative urls.large}}"
|
|
data-sub-html="{{caption}}"
|
|
data-download-url="{{{relative (download this)}}}">
|
|
<a href="{{{relative (download this)}}}">
|
|
<img src="{{relative urls.thumb}}"
|
|
width="{{@root.gallery.thumbSize}}"
|
|
height="{{@root.gallery.thumbSize}}"
|
|
alt="{{relative filename}}" />
|
|
</a>
|
|
{{#if isAnimated}}
|
|
<img class="video-overlay" src="{{relative 'public/play.png'}}" />
|
|
{{/if}}
|
|
</li>
|
|
{{~/if}}
|
|
{{/each}}
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
<!--
|
|
Optional footer
|
|
-->
|
|
{{#if gallery.footer}}
|
|
<footer>
|
|
<p>{{{gallery.footer}}}</p>
|
|
</footer>
|
|
{{/if}}
|
|
|
|
</div>
|