~emersion/alps-dev

alps theme: layout settings page v1 APPLIED

Drew DeVault: 1
 alps theme: layout settings page

 2 files changed, 40 insertions(+), 0 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/alps-dev/patches/10714/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] alps theme: layout settings page Export this patch

---
Rigging this up because I'm going to add a timezone setting soon.

 themes/alps/assets/style.css | 12 ++++++++++++
 themes/alps/settings.html    | 28 ++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 themes/alps/settings.html

diff --git a/themes/alps/assets/style.css b/themes/alps/assets/style.css
index 9fc430c..5225b9d 100644
--- a/themes/alps/assets/style.css
+++ b/themes/alps/assets/style.css
@@ -549,6 +549,18 @@ main.calendar .date h4 {

main.calendar .date h4 .da { font-size: 1.2rem; }

main.settings form {
  max-width: 600px;
}

main.settings button {
  background-color: white;
}

main.settings button:hover {
  background-color: #f8f8f8;
}

input[type="submit"],
.button,
button,
diff --git a/themes/alps/settings.html b/themes/alps/settings.html
new file mode 100644
index 0000000..f6e586b
--- /dev/null
+++ b/themes/alps/settings.html
@@ -0,0 +1,28 @@
{{template "head.html" .}}
{{template "nav.html" .}}

<div class="page-wrap">
  <aside>
    <a href="/mailbox/INBOX">Back to inbox</a>
  </aside>

  <div class="container">
    <main class="settings">
      <form method="post">
        <div class="action-group">
          <label for="messages_per_page">Messages per page</label>
          <input
            type="number"
            name="messages_per_page"
            id="messages_per_page"
            value="{{.Settings.MessagesPerPage}}"
            required />
        </div>

        <button type="submit">Save settings</button>
      </form>
    </main>
  </div>
</div>

{{template "foot.html"}}
-- 
2.26.2
Pushed, thanks!