throw error on empty save

This commit is contained in:
2026-04-21 09:31:12 +02:00
parent d0923ef4ed
commit d9ed72a5af
4 changed files with 42 additions and 4 deletions
+12
View File
@@ -224,6 +224,18 @@ code.with-line-numbers {
background: var(--secondary);
}
.error-banner {
background-color: rgba(248, 81, 73, 0.1);
border: 1px solid rgba(248, 81, 73, 0.4);
color: #f85149;
padding: 0.75rem 1rem;
border-radius: 6px;
margin-bottom: 1rem;
font-size: 0.85rem;
display: flex;
align-items: center;
}
.sr-only {
position: absolute;
width: 1px;
+6 -1
View File
@@ -60,10 +60,15 @@
</script>
{{ else }}
<div class="content-wrapper">
{{ if .Error }}
<div class="error-banner">
{{ .Error }}
</div>
{{ end }}
<form id="paste-form" action="/" method="post">
<label for="content-editor" class="sr-only">Paste Content</label>
<textarea id="content-editor" name="content" placeholder="Paste something interesting here..." autofocus
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">{{ .Content }}</textarea>
</form>
</div>
<script>