mirror of
				https://git.sr.ht/~tsileo/microblog.pub
				synced 2025-06-05 21:59:23 +02:00 
			
		
		
		
	Improve theming support
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user