* 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
+3
View File
@@ -181,6 +181,7 @@ pub struct EditForm {
pub summary: String,
pub icon: Option<i32>,
pub banner: Option<i32>,
pub theme: Option<String>,
}
#[get("/~/<name>/edit")]
@@ -207,6 +208,7 @@ pub fn edit(name: String, rockets: PlumeRocket) -> Result<Ructe, ErrorPage> {
summary: blog.summary.clone(),
icon: blog.icon_id,
banner: blog.banner_id,
theme: blog.theme.clone(),
},
ValidationErrors::default()
)))
@@ -318,6 +320,7 @@ pub fn update(
);
blog.icon_id = form.icon;
blog.banner_id = form.banner;
blog.theme = form.theme.clone();
blog.save_changes::<Blog>(&*conn)
.expect("Couldn't save blog changes");
Ok(Flash::success(