album page rendering
This commit is contained in:
parent
f1c007845a
commit
5e54b84f04
14 changed files with 554 additions and 327 deletions
|
|
@ -1,13 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if not album_dir.is_root %}
|
||||
{% if root_path %}
|
||||
<h1>
|
||||
<a href="{{root_path}}">Home</a>
|
||||
{% for href, name in breadcrumbs %}
|
||||
/ <a href="{{href}}">{{name}}</a>
|
||||
{% for crumb in breadcrumbs %}
|
||||
/ <a href="{{crumb.path}}">{{crumb.name}}</a>
|
||||
{% endfor %}
|
||||
/ {{album_dir.path.name}}
|
||||
/ {{name}}
|
||||
</h1>
|
||||
<hr>
|
||||
{% endif %}
|
||||
|
|
@ -18,20 +18,18 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if album_dir.children %}
|
||||
{% if children %}
|
||||
<h2>Albums</h2>
|
||||
<div id="album-children">
|
||||
{% for child in album_dir.children %}
|
||||
{% for child in children %}
|
||||
<div class="album">
|
||||
<a href="{{child.path.name}}/">
|
||||
<a href="{{child.name}}/">
|
||||
<div>
|
||||
{% if child.cover_path %}
|
||||
<img
|
||||
src="{{child.cover_path.path.parent.relative_to(album_dir.path)}}/slides/{{child.cover_path.thumbnail_filename()}}" />
|
||||
{% endif %}
|
||||
src="{{child.cover_thumbnail_path}}" />
|
||||
</div>
|
||||
<div>
|
||||
{{child.path.name}}
|
||||
{{child.name}}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -39,14 +37,14 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
{% if album_dir.images %}
|
||||
{% if album_dir.children %}
|
||||
{% if children %}
|
||||
<h2>Photos</h2>
|
||||
{% endif %}
|
||||
<div id="album-photos">
|
||||
{% for image in album_dir.images %}
|
||||
<div class="thumbnail">
|
||||
<a href="slides/{{image.html_filename()}}">
|
||||
<img src="slides/{{image.thumbnail_filename()}}" />
|
||||
<a href="slides/{{image.html_filename}}">
|
||||
<img src="slides/{{image.thumb_filename}}" />
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
document.onkeydown = function(event) {
|
||||
if (event.key == "ArrowLeft") {
|
||||
{% if prev_image %}
|
||||
location.href = "{{prev_image.html_filename()}}";
|
||||
location.href = "{{prev_image.html_path}}";
|
||||
{% endif %}
|
||||
} else if (event.key == "ArrowRight") {
|
||||
{% if next_image %}
|
||||
location.href = "{{next_image.html_filename()}}";
|
||||
location.href = "{{next_image.html_path}}";
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
|
||||
{% block content %}
|
||||
<div id="photo">
|
||||
<img src="{{image_path.display_filename()}}" />
|
||||
<img src="{{image_path.screen_path}}" />
|
||||
</div>
|
||||
|
||||
<div id="nav">
|
||||
<div>
|
||||
{% if prev_image %}
|
||||
<a href="{{prev_image.html_filename()}}">
|
||||
<a href="{{prev_image.html_path}}">
|
||||
<i class="arrow arrow-left"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div>
|
||||
{% if next_image %}
|
||||
<a href="{{next_image.html_filename()}}">
|
||||
<a href="{{next_image.html_path}}">
|
||||
<i class="arrow arrow-right"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue