* 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 -3
View File
@@ -2,16 +2,16 @@
@use plume_models::instance::Instance;
@use template_utils::*;
@use routes::*;
@use std::path::Path;
@(ctx: BaseContext, title: String, head: Content, header: Content, content: Content)
<!DOCTYPE html>
<html>
<html class="@ctx.2.clone().and_then(|u| u.preferred_theme).unwrap_or_else(|| CONFIG.default_theme.clone())">
<head>
<meta charset="utf-8" />
<title>@title ⋅ @i18n!(ctx.1, "Plume")</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="@uri!(plume_static_files: file = "css/main.css", _build_id = CACHE_NAME)" />
<link rel="stylesheet" href="@uri!(plume_static_files: file = "css/feather.css", _build_id = CACHE_NAME)" />
<link rel="stylesheet" href="@uri!(plume_static_files: file = Path::new("css").join(ctx.2.clone().and_then(|u| u.preferred_theme).unwrap_or_else(|| CONFIG.default_theme.clone())).join("theme.css"), _build_id = CACHE_NAME)" />
<link rel="manifest" href="@uri!(instance::web_manifest)" />
<link rel="icon" type="image/png" href="@uri!(plume_static_files: file = CONFIG.logo.favicon.as_str(), _build_id = CACHE_NAME)">
<meta content='#282c37' name='theme-color'/>