diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-05-13 10:58:22 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-13 16:58:48 +0200 |
commit | 1cf95af41ea24ab76cba8a0761d349b65c08c294 (patch) | |
tree | f7a5fd00a63498f00768aeba140b68a5d4a74431 /themes/alps | |
parent | 0191b739969e00cdba0faa5a05159fd5f83d5d9e (diff) | |
download | alps-1cf95af41ea24ab76cba8a0761d349b65c08c294.tar.gz alps-1cf95af41ea24ab76cba8a0761d349b65c08c294.zip |
Add <meta refresh> to mailbox view
This causes the mailbox to automatically reload the page every 60
seconds, without JavaScript.
This also updates the base template data to include the full URL, and
replaces the earlier "Path" field with a pre-split array of path
components, which is more immediately useful to most templates given the
limitations of string munging with text/template primitives.
Diffstat (limited to 'themes/alps')
-rw-r--r-- | themes/alps/compose.html | 2 | ||||
-rw-r--r-- | themes/alps/head.html | 3 | ||||
-rw-r--r-- | themes/alps/login.html | 2 | ||||
-rw-r--r-- | themes/alps/mailbox.html | 4 | ||||
-rw-r--r-- | themes/alps/message.html | 2 | ||||
-rw-r--r-- | themes/alps/messages-header.html | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/themes/alps/compose.html b/themes/alps/compose.html index 7b58a5f..6bd516e 100644 --- a/themes/alps/compose.html +++ b/themes/alps/compose.html @@ -1,4 +1,4 @@ -{{template "head.html"}} +{{template "head.html" .}} {{template "nav.html" .}} diff --git a/themes/alps/head.html b/themes/alps/head.html index a6f679f..899f7d6 100644 --- a/themes/alps/head.html +++ b/themes/alps/head.html @@ -4,6 +4,9 @@ <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="theme-color" content="#ffffff"> + {{- if eq (index .GlobalData.Path 0) "mailbox"}} + <meta id="refresh" http-equiv="refresh" content="60"> + {{end -}} <title>Webmail</title> <link rel="stylesheet" href="/themes/alps/assets/style.css"> </head> diff --git a/themes/alps/login.html b/themes/alps/login.html index cc21966..f599535 100644 --- a/themes/alps/login.html +++ b/themes/alps/login.html @@ -1,4 +1,4 @@ -{{template "head.html"}} +{{template "head.html" .}} <h1>alps webmail</h1> <form method="post" action="/login"> diff --git a/themes/alps/mailbox.html b/themes/alps/mailbox.html index 6453d69..8e3331f 100644 --- a/themes/alps/mailbox.html +++ b/themes/alps/mailbox.html @@ -1,5 +1,5 @@ -{{template "head.html"}} -{{template "nav.html" . }} +{{template "head.html" .}} +{{template "nav.html" .}} <div class="page-wrap"> <aside> diff --git a/themes/alps/message.html b/themes/alps/message.html index 6d383ae..9257967 100644 --- a/themes/alps/message.html +++ b/themes/alps/message.html @@ -1,4 +1,4 @@ -{{template "head.html"}} +{{template "head.html" .}} {{template "nav.html" .}} <div class="page-wrap"> diff --git a/themes/alps/messages-header.html b/themes/alps/messages-header.html index 9384fb6..8e018db 100644 --- a/themes/alps/messages-header.html +++ b/themes/alps/messages-header.html @@ -21,7 +21,7 @@ {{ end }} - <a href="{{ .GlobalData.Path }}" class="button-link">Refresh</a> + <a href="{{ .GlobalData.URL.String }}" class="button-link">Refresh</a> </div> <form action="" method="post" class="actions-search"> |