Implement image display

This commit is contained in:
Zoey 2022-12-14 21:39:19 -08:00
parent 97b9fbf46d
commit c0ed59b2cd
19 changed files with 730 additions and 25 deletions

View file

@ -2,7 +2,6 @@
<html lang="en">
<head>
{{{head}}}
<meta name="referrer" content="no-referrer">
<link rel="stylesheet" href="/styles/index.css">
</head>
@ -14,6 +13,7 @@
<span class="pronouns">she/they</span>
</span>
<span class="spacer"></span>
<a href="/images/">Images</a> |
<a href="https://github.com/Zyllian/zyllian.github.io" rel="noopener noreferrer">Source</a>
</header>
<main class="page">

View file

@ -0,0 +1,8 @@
<h1>{{title}}</h1>
<div class="link-list">
<ul>
{{#each links}}
<li><a href="{{this.link}}">{{this.title}}</a></li>
{{/each}}
</ul>
</div>

15
site/templates/image.hbs Normal file
View file

@ -0,0 +1,15 @@
<div class="image-full">
<h1 class="title">{{title}}</h1>
<span class="timestamp">{{timestamp}}</span>
<img class="image-actual" src="{{src}}" alt="{{alt}}">
{{#if desc}}
<p>{{desc}}</p>
{{/if}}
<p><a href="{{src}}">View full size image</a></p>
<h3 class="tags-title">Tags</h3>
<div class="image-tags">
{{#each tags}}
<a class="tag" href="/i/tag/{{this}}/">{{this}}</a>{{#unless @last}},{{/unless}}
{{/each}}
</div>
</div>

22
site/templates/images.hbs Normal file
View file

@ -0,0 +1,22 @@
{{#if tag}}
<h1>Images tagged {{tag}}</h1>
<p><a href="/images/">View all images</a></p>
{{else}}
<h1>Images</h1>
<p><a href="/i/tags">View image tags</a></p>
{{/if}}
<h3>Page {{page}}/{{page_max}}</h3>
{{#if previous}}
<a href="./{{previous}}">Previous page</a>
{{/if}}
{{#if next}}
<a href="./{{next}}">Next page</a>
{{/if}}
<div class="images-list">
{{#each images}}
<a class="image" href="/i/{{id}}">
<img class="image-actual" src="{{src}}" alt="{{alt}}">
<span class="title">{{title}}</span>
</a>
{{/each}}
</div>

View file

@ -0,0 +1 @@
<img src="{{src}}" alt="{{alt}}">