* Theming

- Custom CSS for blogs
- Custom themes for instance
- New dark theme
- UI to choose your instance theme
- Option to disable blog themes if you prefer to only have the instance theme
- UI to choose a blog theme
This commit is contained in:
Ana Gelez
2019-08-21 00:42:04 +02:00
committed by GitHub
parent fb60236a54
commit a6c84daa1a
203 changed files with 667 additions and 334 deletions
+18
View File
@@ -1,5 +1,6 @@
@use templates::base;
@use template_utils::*;
@use plume_models::instance::Instance;
@use routes::user::UpdateUserForm;
@use validator::ValidationErrors;
@use routes::*;
@@ -22,6 +23,23 @@
<label for="summary">@i18n!(ctx.1, "Summary")</label>
<textarea id="summary" name="summary">@form.summary</textarea>
@if let Ok(themes) = Instance::list_themes() {
<label for="theme">@i18n!(ctx.1, "Theme")</label>
<select name="theme" id="theme">
<option value="" @if form.theme.is_none() { selected }>@i18n!(ctx.1, "Default theme")</option>
@for theme in themes {
<option value="@theme" @if Some(theme.clone()) == form.theme { selected }>@theme</option>
}
</select>
} else {
<p class="error">@i18n!(ctx.1, "Error while loading theme selector.")</p>
}
<label for="hide_custom_css">
<input type="checkbox" name="hide_custom_css" id="hide_custom_css" @if form.hide_custom_css { checked }>
@i18n!(ctx.1, "Never load blogs custom themes")
</label>
<input type="submit" value="@i18n!(ctx.1, "Update account")"/>
</form>