Improve theming support

main
Thomas Sileo 2022-08-04 19:10:57 +02:00
parent 70cdde5d46
commit 6d2db24c33
2 changed files with 4 additions and 3 deletions

View File

@ -49,6 +49,7 @@ class Config(pydantic.BaseModel):
trusted_hosts: list[str] = ["127.0.0.1"] trusted_hosts: list[str] = ["127.0.0.1"]
manually_approves_followers: bool = False manually_approves_followers: bool = False
privacy_replace: list[_PrivacyReplace] | None = None privacy_replace: list[_PrivacyReplace] | None = None
code_highlighting_theme = "friendly_grayscale"
# Config items to make tests easier # Config items to make tests easier
sqlalchemy_database: str | None = None sqlalchemy_database: str | None = None
@ -106,8 +107,7 @@ EMOJI_TPL = '<img src="/static/twemoji/{filename}.svg" alt="{raw}" class="emoji"
_load_emojis(ROOT_DIR, BASE_URL) _load_emojis(ROOT_DIR, BASE_URL)
# TODO(ts): allow to override this CODE_HIGHLIGHTING_THEME = CONFIG.code_highlighting_theme
CODE_HIGHLIGHTING_THEME = "friendly_grayscale"
session_serializer = URLSafeTimedSerializer( session_serializer = URLSafeTimedSerializer(

View File

@ -8,6 +8,7 @@ $form-background-color: #ccc;
$form-text-color: #333; $form-text-color: #333;
$muted-color: #555; // solarized comment text $muted-color: #555; // solarized comment text
$primary-button-text-color: #fff; $primary-button-text-color: #fff;
$code-highlight-background: #f0f0f0;
// Load custom theme // Load custom theme
@import "theme.scss"; @import "theme.scss";
@ -60,7 +61,7 @@ a {
} }
div.highlight { div.highlight {
background: #f0f0f0; background: $code-highlight-background;
padding: 0 10px; padding: 0 10px;
overflow: auto; overflow: auto;
display: block; display: block;