basic page rendering

This commit is contained in:
Nick Pegg 2024-08-03 18:02:02 -07:00
parent 4f5bd76f8a
commit 321cbee134
7 changed files with 117 additions and 29 deletions

View file

@ -1 +1,29 @@
This is the album template
{% extends "base.html" %}
{% block content %}
{% if album_dir.children %}
<h1>Albums</h1>
<div id="albums">
{% for child in album_dir.children %}
<div class="album">
<a href="{{child.path.name}}/">
{{child.path.name}}
</a>
</div>
{% endfor %}
</div>
{% endif %}
{% if album_dir.images %}
<h1>Photos</h1>
<div id="photos">
{% for image in album_dir.images %}
<div class="thumbnail">
<a href="slides/{{image.html_filename()}}">
<img src="slides/{{image.thumbnail_filename()}}" />
</a>
</div>
{% endfor %}
</div>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ static_dir }}/index.css" type="text/css">
<title>My Photos</title>
</head>
<body>
{% block content %}
{% endblock %}
</body>
</html>

View file

@ -1 +1,17 @@
This is the photo template
{% extends "base.html" %}
{% block content %}
<div id="nav">
prev
<a href="..">up</a>
next
</div>
<div id="photo">
<img src="{{image_path.display_filename()}}" />
</div>
<div id="download">
<a href="../{{image_path.path.name}}">view full size</a>
</div>
{% endblock %}