update icon and template handling

This commit is contained in:
2026-04-14 22:24:03 +02:00
parent ab22952e3d
commit c30c4d3a0d
14 changed files with 164 additions and 22 deletions

View File

@@ -0,0 +1,7 @@
{{if .Photos}}
<div class="diary-photo-grid">
{{range .Photos}}
<a href="{{.URL}}" target="_blank"><img src="{{.URL}}" alt="{{.Name}}" loading="lazy"></a>
{{end}}
</div>
{{end}}

View File

@@ -0,0 +1,15 @@
{{range .Days}}
<div class="diary-section">
<h2 class="diary-heading">
{{if .URL}}<a href="{{.URL}}">{{.Heading}}</a>{{else}}{{.Heading}}{{end}}
</h2>
{{if .Content}}<div class="content">{{.Content}}</div>{{end}}
{{if .Photos}}
<div class="diary-photo-grid">
{{range .Photos}}
<a href="{{.URL}}" target="_blank"><img src="{{.URL}}" alt="{{.Name}}" loading="lazy"></a>
{{end}}
</div>
{{end}}
</div>
{{end}}

View File

@@ -0,0 +1,8 @@
{{range .Months}}
<div class="diary-section">
<h2 class="diary-heading">
<a href="{{.URL}}">{{.Name}}</a>
{{if .PhotoCount}}<span class="diary-photo-count">({{.PhotoCount}} photos)</span>{{end}}
</h2>
</div>
{{end}}

7
assets/icons/archive.svg Normal file
View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="miter" shape-rendering="crispEdges">
<rect x="1" y="1" width="14" height="4"/>
<path d="M1 5v10h14V5M7 3h2"/>
<rect x="7" y="6" width="2" height="2" fill="currentColor" stroke="none"/>
<rect x="7" y="9" width="2" height="1" fill="currentColor" stroke="none"/>
</svg>

After

Width:  |  Height:  |  Size: 435 B

7
assets/icons/audio.svg Normal file
View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="currentColor" stroke="none" shape-rendering="crispEdges">
<path d="M2 6h3l4-3v10l-4-3H2z"/>
<rect x="11" y="5" width="2" height="1"/>
<rect x="11" y="7" width="3" height="1"/>
<rect x="11" y="9" width="2" height="1"/>
</svg>

After

Width:  |  Height:  |  Size: 329 B

4
assets/icons/doc.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="miter" shape-rendering="crispEdges">
<path d="M3 1h7l4 4v10H3zM10 1v4h4M5 8h6M5 11h4"/>
</svg>

After

Width:  |  Height:  |  Size: 257 B

4
assets/icons/folder.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="miter" shape-rendering="crispEdges">
<path d="M1 6h14v8H1zm0 0V4h5l1 2"/>
</svg>

After

Width:  |  Height:  |  Size: 243 B

4
assets/icons/generic.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="miter" shape-rendering="crispEdges">
<path d="M3 1h7l4 4v10H3zM10 1v4h4"/>
</svg>

After

Width:  |  Height:  |  Size: 244 B

6
assets/icons/image.svg Normal file
View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="miter" shape-rendering="crispEdges">
<rect x="1" y="2" width="14" height="12"/>
<path d="M1 11l4-4 3 3 2-2 5 5"/>
<rect x="10" y="4" width="2" height="2" fill="currentColor" stroke="none"/>
</svg>

After

Width:  |  Height:  |  Size: 363 B

5
assets/icons/video.svg Normal file
View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="1em" height="1em"
fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="miter" shape-rendering="crispEdges">
<rect x="1" y="3" width="14" height="10"/>
<path d="M6 6v4l5-2z" fill="currentColor" stroke="none"/>
</svg>

After

Width:  |  Height:  |  Size: 309 B