diff options
author | Andrew Godwin | 2022-11-16 17:23:46 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-16 17:23:46 -0700 |
commit | 44af0d4c59eed1c3715e9044e75c159cfddf54cc (patch) | |
tree | d2c87f953de12a526a158f2c03def5eb08b2d203 /templates | |
parent | 495e955378d62dc439c4c210785e5d401bc77f64 (diff) | |
download | takahe-44af0d4c59eed1c3715e9044e75c159cfddf54cc.tar.gz takahe-44af0d4c59eed1c3715e9044e75c159cfddf54cc.tar.bz2 takahe-44af0d4c59eed1c3715e9044e75c159cfddf54cc.zip |
Add start of a settings (config) system
Diffstat (limited to 'templates')
-rw-r--r-- | templates/activities/compose.html | 2 | ||||
-rw-r--r-- | templates/activities/home.html | 2 | ||||
-rw-r--r-- | templates/base.html | 12 | ||||
-rw-r--r-- | templates/settings/_settings_identity_menu.html | 5 | ||||
-rw-r--r-- | templates/settings/_settings_system_menu.html | 3 | ||||
-rw-r--r-- | templates/settings/settings_identity.html | 7 | ||||
-rw-r--r-- | templates/settings/settings_system.html | 18 |
7 files changed, 45 insertions, 4 deletions
diff --git a/templates/activities/compose.html b/templates/activities/compose.html index ad0457b..dfa6d1e 100644 --- a/templates/activities/compose.html +++ b/templates/activities/compose.html @@ -13,7 +13,7 @@ {% include "forms/_field.html" %} {% endfor %} <div class="buttons"> - <button>Post</button> + <button>{% if config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button> </div> </form> {% endblock %} diff --git a/templates/activities/home.html b/templates/activities/home.html index bfa11f7..08e338e 100644 --- a/templates/activities/home.html +++ b/templates/activities/home.html @@ -32,7 +32,7 @@ {{ form.content_warning }} <div class="buttons"> <span class="button toggle" _="on click toggle .enabled then toggle .hidden on #id_content_warning">CW</span> - <button>Post</button> + <button>{% if config_identity.toot_mode %}Toot!{% else %}Post{% endif %}</button> </div> </form> </div> diff --git a/templates/base.html b/templates/base.html index 553a2cc..e392cb9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,6 +11,11 @@ <link rel="manifest" href="/manifest.json" /> <script src="{% static "js/hyperscript.min.js" %}"></script> <script src="{% static "js/htmx.min.js" %}"></script> + <style> + body { + --color-highlight: {{ config.highlight_color }}; + } + </style> {% block extra_head %}{% endblock %} </head> <body class="{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'> @@ -23,8 +28,11 @@ </a> <menu> {% if user.is_authenticated %} - <a href="/compose/"><i class="fa-solid fa-feather"></i> Compose</a> - <a href="/settings/"><i class="fa-solid fa-gear"></i> Settings</a> + <a href="/compose/" title="Compose"><i class="fa-solid fa-feather"></i> Compose</a> + <a href="/settings/" title="Settings"><i class="fa-solid fa-gear"></i> Settings</a> + {% if request.user.admin %} + <a href="/settings/system/" title="Admin"><i class="fa-solid fa-toolbox"></i> Admin</a> + {% endif %} <div class="gap"></div> <a href="/identity/select/" class="identity"> {% if not request.identity %} diff --git a/templates/settings/_settings_identity_menu.html b/templates/settings/_settings_identity_menu.html new file mode 100644 index 0000000..bdae143 --- /dev/null +++ b/templates/settings/_settings_identity_menu.html @@ -0,0 +1,5 @@ +<nav> + <a href="#" {% if section == "profile" %}class="selected"{% endif %}>Profile</a> + <a href="#" {% if section == "interface" %}class="selected"{% endif %}>Interface</a> + <a href="#" {% if section == "filtering" %}class="selected"{% endif %}>Filtering</a> +</nav> diff --git a/templates/settings/_settings_system_menu.html b/templates/settings/_settings_system_menu.html new file mode 100644 index 0000000..fb4da02 --- /dev/null +++ b/templates/settings/_settings_system_menu.html @@ -0,0 +1,3 @@ +<nav> + <a href="#" {% if section == "basic" %}class="selected"{% endif %}>Basic</a> +</nav> diff --git a/templates/settings/settings_identity.html b/templates/settings/settings_identity.html new file mode 100644 index 0000000..cdbf197 --- /dev/null +++ b/templates/settings/settings_identity.html @@ -0,0 +1,7 @@ +{% extends "settings/settings_system.html" %} + +{% block title %}{{ section.title }} - Settings{% endblock %} + +{% block menu %} + {% include "settings/_settings_identity_menu.html" %} +{% endblock %} diff --git a/templates/settings/settings_system.html b/templates/settings/settings_system.html new file mode 100644 index 0000000..c10964f --- /dev/null +++ b/templates/settings/settings_system.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} - System Settings{% endblock %} + +{% block content %} + {% block menu %} + {% include "settings/_settings_system_menu.html" %} + {% endblock %} + <form action="." method="POST"> + {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} + <div class="buttons"> + <button>Save</button> + </div> + </form> +{% endblock %} |