diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 00000000..78948be9 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,154 @@ +/* Theme color definitions */ +:root { + --brand-font-size-xl: 6rem; + --brand-font-size-lg: 5rem; + --brand-font-size-md: 4rem; + --brand-font-size-sm: 3rem; + --brand-font-size-xs: 2.2rem; + --brand-font-size-xxs: 1.6rem; + + --brand-letter-spacing-xl: 0.25em; + --brand-letter-spacing-lg: 0.2em; + --brand-letter-spacing-md: 0.1em; + --brand-letter-spacing-sm: 0.05em; + --brand-letter-spacing-xs: 0.03em; +} + +html.light { + --sl-color-primary: #202235; + --sl-color-secondary: #edb641; + --sl-color-accent: #ffd480; + --sl-color-text-1: var(--sl-color-primary); + --sl-color-text-2: var(--sl-color-secondary); + --sy-c-foot-background: #f0f0f0; + --yue-c-text: #000; + --brand-text-glow: + 0 0 10px rgba(32, 34, 53, 0.3), 0 0 20px rgba(32, 34, 53, 0.2), + 0 0 30px rgba(237, 182, 65, 0.1); +} + +html.dark { + --sl-color-text-1: var(--sl-color-secondary); + --sy-c-foot-background: black; + --yue-c-text: #fff; + --brand-text-glow: + 0 0 10px rgba(237, 182, 65, 0.4), 0 0 20px rgba(237, 182, 65, 0.3), + 0 0 30px rgba(237, 182, 65, 0.2); +} + +.title-with-logo { + display: flex; + align-items: center; + justify-content: center; + margin: 5rem auto 4rem; + width: 100%; + padding: 0 2rem; + user-select: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; +} + +html[class] .title-with-logo .brand-text { + font-family: var(--sl-font-sans); + font-weight: 300; + font-size: var(--brand-font-size-lg); + letter-spacing: var(--brand-letter-spacing-xl); + text-transform: uppercase; + text-align: center; + line-height: 1.4; + max-width: 100%; + white-space: nowrap; + word-break: break-word; + word-wrap: break-word; + overflow-wrap: break-word; + hyphens: auto; + -webkit-hyphens: auto; + -ms-hyphens: auto; + transition: + color var(--sl-transition), + text-shadow var(--sl-transition); +} + +html.light .title-with-logo .brand-text { + color: var(--sl-color-text-1); + text-shadow: var(--brand-text-glow); +} + +html.dark .title-with-logo .brand-text { + color: var(--sl-color-text-2); + text-shadow: var(--brand-text-glow); +} + +/* Button container wrapping */ +.buttons.wrap { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.buttons.wrap .btn-no-wrap { + flex: 0 0 auto; +} + +/* Large screens */ +@media (min-width: 1200px) { + html[class] .title-with-logo .brand-text { + font-size: var(--brand-font-size-xl); + } +} + +/* Medium-small screens */ +@media (max-width: 991px) { + html[class] .title-with-logo .brand-text { + font-size: var(--brand-font-size-md); + letter-spacing: var(--brand-letter-spacing-lg); + } +} + +/* Small screens */ +@media (max-width: 767px) { + html[class] .title-with-logo .brand-text { + font-size: var(--brand-font-size-sm); + letter-spacing: var(--brand-letter-spacing-md); + } + + html[class] .title-with-logo { + margin: 2rem auto 1.5rem; + } +} + +/* Extra small screens */ +@media (max-width: 480px) { + html[class] .title-with-logo .brand-text { + font-size: var(--brand-font-size-xs); + letter-spacing: var(--brand-letter-spacing-sm); + line-height: 1.2; + } + + html[class] .title-with-logo { + margin: 1.5rem auto 1rem; + padding: 0 1rem; + } +} + +/* Smallest screens */ +@media (max-width: 360px) { + html[class] .title-with-logo .brand-text { + font-size: var(--brand-font-size-xxs); + letter-spacing: var(--brand-letter-spacing-xs); + } +} + +/* Preserve existing layout styles */ +#badges img { + margin-top: 0; + margin-bottom: 0; +} + +#badges { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-bottom: 3em; +} diff --git a/docs/_static/logo-default.png b/docs/_static/logo-default.png new file mode 100644 index 00000000..e60b9252 Binary files /dev/null and b/docs/_static/logo-default.png differ diff --git a/docs/conf.py b/docs/conf.py index ab3def6c..c45ca4c2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -113,15 +113,15 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # -- Style configuration ----------------------------------------------------- -html_theme = "litestar_sphinx_theme" +html_theme = "shibuya" html_title = "Polyfactory" -# pygments_style = "lightbulb" +pygments_style = "dracula" todo_include_todos = True +html_favicon = "_static/logo-default.png" html_static_path = ["_static"] templates_path = ["_templates"] -html_js_files = ["versioning.js"] -html_css_files = ["style.css"] +html_css_files = ["custom.css"] html_show_sourcelink = True html_copy_source = True @@ -131,18 +131,17 @@ "source_user": "litestar-org", "source_repo": "polyfactory", "current_version": "latest", - "versions": [ - ("latest", "/latest"), - ("development", "/main"), - ], "version": release, } html_theme_options = { "logo_target": "/", - "github_repo_name": "polyfactory", + "accent_color": "amber", "github_url": "https://github.com/litestar-org/polyfactory", + "discord_url": "https://discord.gg/litestar", "navigation_with_keys": True, + "light_logo": "_static/logo-default.png", + "dark_logo": "_static/logo-default.png", "nav_links": [ {"title": "Home", "url": "index"}, { @@ -246,5 +245,4 @@ def delayed_setup(app: Sphinx) -> None: def setup(app: Sphinx) -> dict[str, bool]: app.connect("builder-inited", delayed_setup, priority=0) - app.setup_extension("litestar_sphinx_theme") return {"parallel_read_safe": True, "parallel_write_safe": True} diff --git a/docs/index.rst b/docs/index.rst index d0eb9985..a6530dcf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,16 +4,13 @@ .. container:: :name: home-head - .. image:: https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Badge%20-%20Blue%20and%20Yellow.svg - :alt: Litestar Framework - :width: 400 - :height: 400 - .. container:: .. raw:: html -

Polyfactory

+ .. container:: badges :name: badges @@ -48,12 +45,14 @@ hints and supporting :doc:`dataclasses `, :class:`TypedDicts `, Pydantic models, :class:`msgspec Struct's ` and more. -.. container:: buttons +.. container:: buttons wrap + + .. raw:: html - :doc:`Get Started ` - `Usage Docs `_ - `API Docs `_ - `Blog `_ + Get Started + Usage Docs + API Docs + Blog .. grid:: 1 1 2 2 :padding: 0 @@ -81,65 +80,6 @@ Contribute to Litestar's growth with code, docs, and more. -Sponsors --------- - -.. rst-class:: lead - - Litestar is a community-driven, open-source initiative that thrives on the generous contributions of our sponsors, - enabling us to pursue innovative developments and continue our mission to provide exceptional tools and resources - to our users. - - -A huge thank you to our current sponsors: - -.. container:: - :name: sponsors-section - - .. grid:: 3 - :class-row: surface - :padding: 0 - :gutter: 2 - - .. grid-item-card:: - :link: https://github.com/scalar/scalar - - .. image:: https://raw.githubusercontent.com/litestar-org/branding/main/assets/sponsors/scalar.svg - :alt: Scalar.com - :class: sponsor - - `Scalar.com `_ - - .. grid-item-card:: - :link: https://telemetrysports.com/ - - .. image:: https://raw.githubusercontent.com/litestar-org/branding/main/assets/sponsors/telemetry-sports/unofficial-telemetry-whitebg.svg - :alt: Telemetry Sports - :class: sponsor - - `Telemetry Sports `_ - - .. grid-item-card:: - :link: https://www.stok.kr/ - - .. image:: https://avatars.githubusercontent.com/u/144093421 - :alt: Stok - :class: sponsor - - `Stok `_ - -We invite organizations and individuals to join our sponsorship program. -By becoming a sponsor on platforms like `Polar `_, `GitHub `_ -and `Open Collective `_, you can play a pivotal role in our project's growth. - -On top of regular sponsorship, we engage in pledge-based sponsorship opportunities through `Polar `_, -where you can pledge an amount towards an issue or feature you would like to see implemented. - - -.. _sponsor-github: https://github.com/sponsors/litestar-org -.. _sponsor-oc: https://opencollective.com/litestar -.. _sponsor-polar: https://polar.sh/litestar-org - .. toctree:: :titlesonly: :caption: Documentation