mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Improve theming support
This commit is contained in:
parent
70cdde5d46
commit
6d2db24c33
2 changed files with 4 additions and 3 deletions
|
@ -49,6 +49,7 @@ class Config(pydantic.BaseModel):
|
|||
trusted_hosts: list[str] = ["127.0.0.1"]
|
||||
manually_approves_followers: bool = False
|
||||
privacy_replace: list[_PrivacyReplace] | None = None
|
||||
code_highlighting_theme = "friendly_grayscale"
|
||||
|
||||
# Config items to make tests easier
|
||||
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)
|
||||
|
||||
# TODO(ts): allow to override this
|
||||
CODE_HIGHLIGHTING_THEME = "friendly_grayscale"
|
||||
CODE_HIGHLIGHTING_THEME = CONFIG.code_highlighting_theme
|
||||
|
||||
|
||||
session_serializer = URLSafeTimedSerializer(
|
||||
|
|
|
@ -8,6 +8,7 @@ $form-background-color: #ccc;
|
|||
$form-text-color: #333;
|
||||
$muted-color: #555; // solarized comment text
|
||||
$primary-button-text-color: #fff;
|
||||
$code-highlight-background: #f0f0f0;
|
||||
|
||||
// Load custom theme
|
||||
@import "theme.scss";
|
||||
|
@ -60,7 +61,7 @@ a {
|
|||
}
|
||||
|
||||
div.highlight {
|
||||
background: #f0f0f0;
|
||||
background: $code-highlight-background;
|
||||
padding: 0 10px;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
|
|
Loading…
Reference in a new issue