diff options
Diffstat (limited to 'themes/alps')
-rw-r--r-- | themes/alps/assets/style.css | 10 | ||||
-rw-r--r-- | themes/alps/delete-mailbox.html | 24 | ||||
-rw-r--r-- | themes/alps/messages-header.html | 6 | ||||
-rw-r--r-- | themes/alps/util.html | 14 |
4 files changed, 47 insertions, 7 deletions
diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css index 388f25f..8b80504 100644 --- a/themes/alps/assets/style.css +++ b/themes/alps/assets/style.css @@ -766,3 +766,13 @@ button:active, color: #ccc; background-color: #f8f8f8; } + +.alert { + padding: 0.5rem; + border: 1px solid transparent; + margin: 1rem 0; + background: #f8d7da; + color: #721c24; + border-color: #f5c6cb; + max-width: 600px; +} diff --git a/themes/alps/delete-mailbox.html b/themes/alps/delete-mailbox.html new file mode 100644 index 0000000..0429fe0 --- /dev/null +++ b/themes/alps/delete-mailbox.html @@ -0,0 +1,24 @@ +{{template "head.html" .}} +{{template "nav.html" .}} +{{template "util.html" .}} + +<div class="page-wrap"> + {{ template "aside" . }} + <div class="container"> + <main class="create-update"> + <form method="POST"> + <h2>Delete "{{ .Mailbox.Name }}"?</h2> + <div class="alert"> + <strong>Warning!</strong> This will permanently delete all messages + in "{{.Mailbox.Name}}". + </div> + <div class="actions"> + <button type="submit">Delete "{{.Mailbox.Name}}"</button> + <a class="button-link" href="/">Cancel</a> + </div> + </form> + </main> + </div> +</div> + +{{template "foot.html"}} diff --git a/themes/alps/messages-header.html b/themes/alps/messages-header.html index 13e4872..df70e06 100644 --- a/themes/alps/messages-header.html +++ b/themes/alps/messages-header.html @@ -26,6 +26,12 @@ <div class="action-group"> <a href="{{ .GlobalData.URL.String }}" class="button-link">Refresh</a> </div> + + <div class="action-group"> + {{ if not (eq .Mailbox.Name "INBOX") }} + <a class="button-link" href="/delete-mailbox/{{.Mailbox.Name | pathescape}}">Delete folder</a> + {{ end }} + </div> </div> <form method="get" class="actions-search"> diff --git a/themes/alps/util.html b/themes/alps/util.html index 5ee456a..64aae3a 100644 --- a/themes/alps/util.html +++ b/themes/alps/util.html @@ -28,13 +28,13 @@ {{ if eq $.GlobalData.URL.Path "/compose" }}active{{ end }} ">Compose mail</a> {{ with .CategorizedMailboxes }} - {{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end}} - {{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end}} - {{ with .Common.Outbox }}{{ template "mbox-link" . }}{{ end}} - {{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end}} - {{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end}} - {{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end}} - {{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end}} + {{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }} + {{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }} + {{ with .Common.Outbox }}{{ template "mbox-link" . }}{{ end }} + {{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }} + {{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }} + {{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }} + {{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }} {{ if .Additional }} <hr /> {{ range .Additional }} |