mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 02:31:00 +00:00
Simple user stylesheet support. (#258)
This commit is contained in:
parent
cda7467802
commit
801c807a2b
3 changed files with 11 additions and 0 deletions
|
@ -246,3 +246,5 @@ class Config(models.Model):
|
|||
|
||||
# wellness Options
|
||||
visible_reaction_counts: bool = True
|
||||
|
||||
custom_css: str | None
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
}
|
||||
{% endif %}
|
||||
</style>
|
||||
{% if config_identity.custom_css %}
|
||||
<style>{{ config_identity.custom_css }}</style>
|
||||
{% endif %}
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
<body class="{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
||||
|
|
|
@ -20,9 +20,15 @@ class InterfacePage(SettingsPage):
|
|||
"title": "Show Boost and Like Counts",
|
||||
"help_text": "Disable to hide the number of Likes and Boosts on a 'Post'",
|
||||
},
|
||||
"custom_css": {
|
||||
"title": "Custom CSS",
|
||||
"help_text": "Theme the website however you'd like, just for you. You should probably not use this unless you know what you're doing.",
|
||||
"display": "textarea",
|
||||
},
|
||||
}
|
||||
|
||||
layout = {
|
||||
"Posting": ["toot_mode", "default_post_visibility"],
|
||||
"Wellness": ["visible_reaction_counts"],
|
||||
"Appearance": ["custom_css"],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue