mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-28 03:07:40 +02:00
throw error on empty save
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user