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:
@@ -4,7 +4,7 @@ templ ContactForm(enabled bool) {
|
||||
<section id="contact" class="contact">
|
||||
<h2>Contact</h2>
|
||||
<p class="contact-intro">
|
||||
Interested in a project or collaboration? Send a message below.
|
||||
Interested in a project or collaboration? Send a message below. Messages must be in English.
|
||||
</p>
|
||||
if !enabled {
|
||||
<p class="contact-unavailable">
|
||||
@@ -33,7 +33,7 @@ templ ContactForm(enabled bool) {
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="message">Message</label>
|
||||
<textarea id="message" name="message" required rows="6" maxlength="8000"></textarea>
|
||||
<textarea id="message" name="message" required minlength="20" rows="6" maxlength="8000" placeholder="Write at least a few sentences in English."></textarea>
|
||||
</div>
|
||||
<input
|
||||
class="hp-field"
|
||||
@@ -74,3 +74,9 @@ templ ContactSendError() {
|
||||
<a href="mailto:hello@technical.kiwi">hello@technical.kiwi</a>.</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ContactRateLimited() {
|
||||
<div class="alert alert-error" role="alert">
|
||||
<p>Too many messages from your network. Please try again later.</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user