Add contact antispam and fix gallery video playback.
English-only messages, rate limiting, min fill time, and normalized email validation; improve modal video serving with posters, correct MIME types, and no gzip on gallery media. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -65,7 +65,15 @@ templ ImageModal(img gallery.Image, prevPath, nextPath string) {
|
||||
</button>
|
||||
<figure class="modal-figure">
|
||||
if img.IsVideo {
|
||||
<video src={ img.URL } controls playsinline preload="metadata"></video>
|
||||
<div class="modal-video">
|
||||
<video controls playsinline preload="auto" poster={ img.ThumbURL }>
|
||||
<source src={ img.URL } type={ videoMIME(img.Filename) }/>
|
||||
</video>
|
||||
<p class="video-unavailable" hidden>
|
||||
Playback is not supported in this browser.
|
||||
<a href={ img.URL } download={ img.Filename }>Download the video</a>
|
||||
</p>
|
||||
</div>
|
||||
} else {
|
||||
<img src={ img.URL } alt={ img.Filename }/>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user