Basic file upload for thread creation

This commit is contained in:
Dominic Ferrando
2025-04-18 15:03:54 -04:00
parent 4265b8583b
commit 00c8057b5b
4 changed files with 45 additions and 15 deletions
+3 -1
View File
@@ -13,7 +13,9 @@ templ ThreadsCatalog(previews []CatalogThreadPreview) {
<div id="catalog">
for _, preview := range previews {
<div class="catalog-preview">
<img class="catalog-preview-img" src={ fmt.Sprintf("/static/img/posts/%s", preview.MediaPath) } />
<a href={ templ.SafeURL(preview.ThreadURL) }>
<img class="catalog-preview-img" src={ fmt.Sprintf("/static/img/posts/%s", preview.MediaPath) } />
</a>
<h1><a href={ templ.SafeURL(preview.ThreadURL) } class="catalog-preview-link">{ preview.Subject }</a></h1>
<p>{ preview.Body }</p>
</div>