Skip to content

chore: update style #691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -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;
}
Binary file added docs/_static/logo-default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 8 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"},
{
Expand Down Expand Up @@ -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}
80 changes: 10 additions & 70 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

<h1>Polyfactory</h1>
<div class="title-with-logo">
<div class="brand-text">Polyfactory</div>
</div>

.. container:: badges
:name: badges
Expand Down Expand Up @@ -48,12 +45,14 @@
hints and supporting :doc:`dataclasses <python:library/dataclasses>`, :class:`TypedDicts <typing.TypedDict>`,
Pydantic models, :class:`msgspec Struct's <msgspec.Struct>` and more.

.. container:: buttons
.. container:: buttons wrap

.. raw:: html

:doc:`Get Started <getting-started>`
`Usage Docs <usage>`_
`API Docs <reference>`_
`Blog <https://blog.litestar.dev>`_
<a href="getting-started.html" class="btn-no-wrap">Get Started</a>
<a href="usage/index.html" class="btn-no-wrap">Usage Docs</a>
<a href="reference/index.html" class="btn-no-wrap">API Docs</a>
<a href="https://blog.litestar.dev" class="btn-no-wrap">Blog</a>

.. grid:: 1 1 2 2
:padding: 0
Expand Down Expand Up @@ -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 <https://github.com/scalar/scalar>`_

.. 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 <https://telemetrysports.com/>`_

.. grid-item-card::
:link: https://www.stok.kr/

.. image:: https://avatars.githubusercontent.com/u/144093421
:alt: Stok
:class: sponsor

`Stok <https://www.stok.kr/>`_

We invite organizations and individuals to join our sponsorship program.
By becoming a sponsor on platforms like `Polar <sponsor-polar_>`_, `GitHub <sponsor-github_>`_
and `Open Collective <sponsor-oc_>`_, 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 <sponsor-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
Expand Down
Loading