commit cb5c82533ed114613a1d2e2e661d83f0c195f45b
parent c9f0bdb44e29bc1fea0cb94e89911c83e568e892
Author: breadcat <breadcat@users.noreply.github.com>
Date: Sun, 17 May 2026 20:05:21 +0100
Reusable recent files block
Diffstat:
3 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/templates/_recent.html b/templates/_recent.html
@@ -0,0 +1,16 @@
+{{define "_recent"}}
+
+ <script src="/static/hover-preview.js" defer></script>
+
+ <div style="flex: 1; min-width: 200px;">
+ <h4 style="margin-top: 0;">Recent Files (for reference)</h4>
+ {{range .Data.RecentFiles}}
+ <div class="file-item">
+ <span class="file-id">ID {{.ID}}:</span> <a href="/file/{{.ID}}" title="{{.Filename}}">{{.Filename}}</a>
+ </div>
+ {{else}}
+ <div class="file-item">No files found</div>
+ {{end}}
+ </div>
+
+{{end}}
+\ No newline at end of file
diff --git a/templates/admin.html b/templates/admin.html
@@ -326,16 +326,7 @@
</form>
</div>
- <div style="flex: 1; min-width: 200px;">
- <h4 style="margin-top: 0;">Recent Files (for reference)</h4>
- {{range .Data.RecentFiles}}
- <div class="file-item">
- <span class="file-id">ID {{.ID}}:</span> <a href="/file/{{.ID}}" title="{{.Filename}}">{{.Filename}}</a>
- </div>
- {{else}}
- <div class="file-item">No files found</div>
- {{end}}
- </div>
+ {{template "_recent" .}}
</div>
</div>
diff --git a/templates/bulk-tag.html b/templates/bulk-tag.html
@@ -10,6 +10,11 @@
<strong>Success:</strong> {{.Data.Success}}
</div>
{{end}}
+
+ <div style="display: flex; gap: 30px; align-items: flex-start;">
+
+ <div style="flex: 0 0 auto;">
+
<form method="POST">
<div class="form-section">
<h3>Select Files</h3>
@@ -91,16 +96,13 @@
</div>
<button type="submit" class="text-button">Apply Tags</button>
</form>
- <br>
- <details><summary>Recent Files (for reference)</summary>
- {{range .Data.RecentFiles}}
- <div class="file-item">
- <span class="file-id">ID {{.ID}}:</span> <a href="/file/{{.ID}}" title="{{.Filename}}">{{.Filename}}</a>
- </div>
- {{else}}
- <div class="file-item">No files found</div>
- {{end}}
- </details>
+
+ </div>
+
+{{template "_recent" .}}
+
<script src="/static/bulk-tag.js" defer></script>
- <script src="/static/hover-preview.js" defer></script>
+
+ </div>
+
{{template "_footer"}}
\ No newline at end of file