diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 831274b..0ca8f12 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -21,5 +21,5 @@ jobs: - name: Run Labeler uses: actions/labeler@v6 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.GH_TOKEN }} configuration-path: .github/labeler.yml diff --git a/fasthttp/openapi/swagger.py b/fasthttp/openapi/swagger.py index fbe867e..8ce068a 100644 --- a/fasthttp/openapi/swagger.py +++ b/fasthttp/openapi/swagger.py @@ -18,6 +18,22 @@ --color-text-gray: #9f9f9f; --color-gray: #f4f4f4; --color-white: #ffffff; + --bg-primary: #f4f4f4; + --bg-secondary: #ffffff; + --text-primary: #1e1e1e; + --text-secondary: #9f9f9f; + --border-color: #e0e0e0; + } + + [data-theme="dark"] { + --color-gray: #1a1a1a; + --color-total-black: #f4f4f4; + --color-text-gray: #9f9f9f; + --bg-primary: #121212; + --bg-secondary: #1e1e1e; + --text-primary: #f4f4f4; + --text-secondary: #9f9f9f; + --border-color: #333333; } *, *::before, *::after { @@ -27,19 +43,20 @@ } html { - background-color: var(--color-gray); + background-color: var(--bg-primary); -webkit-text-size-adjust: 100%; } body { - background-color: var(--color-gray); - color: var(--color-total-black); + background-color: var(--bg-primary); + color: var(--text-primary); font-family: var(--font-urbanist), var(--font-manrope), system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; align-items: center; line-height: 1.5; + transition: background-color 0.3s ease, color 0.3s ease; } .container { @@ -70,12 +87,13 @@ left: 0; width: 35%; height: 100%; - background: var(--color-white); + background: var(--bg-secondary); border-top-left-radius: 16px; border-bottom-left-radius: 28px; transform: skewX(-14deg); transform-origin: bottom left; z-index: 1; + transition: background-color 0.3s ease; } .header-bg-right { @@ -84,9 +102,10 @@ right: 0; width: 85%; height: 100%; - background: var(--color-white); + background: var(--bg-secondary); border-radius: 16px; z-index: 0; + transition: background-color 0.3s ease; } .logo { @@ -98,6 +117,8 @@ font-size: 20px; font-weight: 600; letter-spacing: -0.02em; + color: var(--text-primary); + transition: color 0.3s ease; } .logo span { @@ -117,7 +138,7 @@ padding: 8px 16px; font-size: 14px; font-weight: 600; - color: var(--color-total-black); + color: var(--text-primary); text-decoration: none; background: rgba(46, 115, 255, 0.1); border-radius: 10px; @@ -128,6 +149,39 @@ background: rgba(46, 115, 255, 0.2); } + /* Theme Toggle */ + .theme-toggle { + display: flex; + align-items: center; + justify-content: center; + width: 40px; + height: 40px; + border-radius: 10px; + background: var(--bg-secondary); + border: none; + cursor: pointer; + transition: all 0.2s ease; + position: relative; + z-index: 10; + } + + .theme-toggle:hover { + background: rgba(46, 115, 255, 0.1); + } + + .theme-toggle svg { + width: 20px; + height: 20px; + fill: var(--text-primary); + transition: fill 0.3s ease; + } + + .theme-toggle .sun-icon { display: none; } + .theme-toggle .moon-icon { display: block; } + + [data-theme="dark"] .theme-toggle .sun-icon { display: block; } + [data-theme="dark"] .theme-toggle .moon-icon { display: none; } + /* Main */ main { flex: 1; @@ -145,11 +199,12 @@ justify-content: center; align-items: center; padding: 60px 40px; - background: var(--color-white); + background: var(--bg-secondary); border-radius: 24px; text-align: center; max-width: 600px; width: 100%; + transition: background-color 0.3s ease; } .error-code { @@ -169,14 +224,17 @@ letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 12px; + color: var(--text-primary); + transition: color 0.3s ease; } .subtitle { - color: var(--color-text-gray); + color: var(--text-secondary); font-size: 16px; max-width: 400px; line-height: 1.5; margin-bottom: 32px; + transition: color 0.3s ease; } .btn { @@ -239,7 +297,62 @@ width: 100%; } } + + /* Footer */ + .footer { + margin-top: auto; + padding: 24px 0; + width: 100%; + } + + .footer-content { + display: flex; + align-items: center; + justify-content: center; + gap: 16px; + } + + .footer-link { + display: flex; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + border-radius: 12px; + background: var(--bg-secondary); + color: var(--text-primary); + transition: all 0.2s ease; + text-decoration: none; + } + + .footer-link:hover { + background: var(--color-brand-blue); + color: var(--color-white); + transform: translateY(-2px); + } + + .footer-link svg { + width: 22px; + height: 22px; + } +
@@ -251,6 +364,15 @@ __FASTHTTP_DOCS_URL__ __FASTHTTP_OPENAPI_URL__ +
@@ -265,6 +387,16 @@ + + """ @@ -288,9 +420,53 @@ def get_not_found_html(*, docs_url: str = "/docs", openapi_url: str = "/openapi. +
+ +