From cc015536faff14908017da89cdcb98e47b4c74e6 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 27 Feb 2022 10:12:47 -0800 Subject: [PATCH] Adds theme instructions --- bookwyrm/forms.py | 4 +-- bookwyrm/templates/settings/themes.html | 41 +++++++++++++------------ 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py index 926aaecf..4e6bab16 100644 --- a/bookwyrm/forms.py +++ b/bookwyrm/forms.py @@ -466,9 +466,7 @@ class ThemeForm(CustomForm): fields = ["name", "path"] widgets = { "name": forms.TextInput(attrs={"aria-describedby": "desc_name"}), - "path": ClearableFileInputWithWarning( - attrs={"aria-describedby": "desc_path"} - ), + "path": forms.TextInput(attrs={"aria-describedby": "desc_path", "placeholder": _("example-theme.scss")}), } diff --git a/bookwyrm/templates/settings/themes.html b/bookwyrm/templates/settings/themes.html index 6e9eb61c..3eac261d 100644 --- a/bookwyrm/templates/settings/themes.html +++ b/bookwyrm/templates/settings/themes.html @@ -16,21 +16,24 @@ {% endif %}
-
-

- {% trans "Default theme:" %} {{ site.default_theme.name }} -

- -

- - {% trans "Set default theme" %} - -

+
+

{% trans "How to add a theme" %}

+
    +
  1. + {% trans "Copy the theme file into the bookwyrm/static/css/ directory on your server from the command line." %} +
  2. +
  3. + {% trans "Run ./bw-dev compilescss." %} +
  4. +
  5. + {% trans "Add the file name using the form below to make it available in the application interface." %} +
  6. +
-

{% trans "Upload theme" %}

+

{% trans "Add theme" %}

{% if theme_form.errors %}
@@ -60,17 +63,17 @@
-
- +
@@ -92,13 +95,11 @@ {% for theme in themes %} {{ theme.name }} - {{ theme.theme_path }} + {{ theme.path }} - {% if theme.theme_file %}
- +
- {% endif %} {% endfor %}