From a35c462972a950fdc1db69bae8aa8d98c3045939 Mon Sep 17 00:00:00 2001 From: g_it Date: Tue, 31 Mar 2026 14:15:50 +0200 Subject: [PATCH] Update styling. --- Dockerfile | 1 + app/main.py | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 57dd8fb..6f88fdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,3 +12,4 @@ EXPOSE 8000 ENV ROOT_PATH=/technical/api CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--root-path", "/technical/api"] + \ No newline at end of file diff --git a/app/main.py b/app/main.py index 31d59d2..7e0f8aa 100644 --- a/app/main.py +++ b/app/main.py @@ -48,7 +48,38 @@ with [Scalar](https://scalar.com/). CUSTOM_CSS=""" .darklight-reference-promo { display: none !important; } - .darklight-reference { display: none !important; } + .darklight-reference { display: none !important; } + + .light-mode { + --scalar-color-1: #343434; + --scalar-color-2: #666666; + --scalar-color-3: #979797; + --scalar-color-accent: #C9C9C9; + --scalar-background-1: #FAFAFA; + --scalar-background-2: #FFFFFF; + --scalar-background-3: #FFFFFF; + --scalar-background-accent: #FFFFFF; + --scalar-border-color: transparent; + } + + @font-face { + font-display: swap; + font-family: 'DM Sans'; + font-style: normal; + font-weight: 100 700; + src: url('https://gugulet.hu/technical/git/g_it/site/raw/branch/main/content/assets/fonts/dm-sans.ttf') format('truetype'); + } + + @font-face { + font-display: swap; + font-family: 'DM Mono'; + font-style: normal; + font-weight: 100 700; + src: url('https://gugulet.hu/technical/git/g_it/site/raw/branch/main/content/assets/fonts/dm-mono.ttf') format('truetype'); + } + + body { font-family: 'DM Sans', monospace !important; } + code, pre { font-family: 'DM Mono', monospace !important; } """ app = FastAPI( @@ -66,6 +97,7 @@ async def scalar_docs(): title=app.title, force_dark_mode_state="light", hide_dark_mode_toggle=True, + with_default_fonts=False, scalar_favicon_url="https://gugulet.hu/technical/git/g_it/site/raw/branch/main/content/assets/media/face-favicon-512x512.png", default_open_all_tags=False, custom_css=CUSTOM_CSS,