Skip to content

Commit fec7b4c

Browse files
committed
Merge remote-tracking branch 'upstream/main' into forwarded-header
2 parents 7c2e669 + 6761b2c commit fec7b4c

6 files changed

Lines changed: 83 additions & 185 deletions

File tree

docs/css/extra.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.md-nav__sponsors {
2+
display: flex;
3+
flex-direction: column;
4+
align-items: center;
5+
gap: 0.5rem;
6+
margin: 1.2rem 0.4rem 0.6rem;
7+
padding: 0.9rem 0.6rem 0.8rem;
8+
background-color: color-mix(in srgb, var(--md-primary-fg-color) 8%, transparent);
9+
border-radius: 0.4rem;
10+
}
11+
12+
.md-nav__sponsors-title {
13+
margin: 0 0 0.1rem;
14+
font-size: 0.6rem;
15+
font-weight: 700;
16+
text-transform: uppercase;
17+
letter-spacing: 0.05em;
18+
color: var(--md-default-fg-color--light);
19+
}
20+
21+
.md-nav__sponsor {
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
width: 100%;
26+
padding: 0.25rem;
27+
border-radius: 0.2rem;
28+
transition: opacity 0.15s;
29+
}
30+
31+
.md-nav__sponsor:hover {
32+
opacity: 0.75;
33+
}
34+
35+
.md-nav__sponsor img {
36+
max-width: 100%;
37+
max-height: 1.6rem;
38+
object-fit: contain;
39+
}
40+
41+
.md-nav__sponsor-cta {
42+
display: inline-block;
43+
margin-top: 0.15rem;
44+
padding: 0.25rem 0.6rem;
45+
font-size: 0.65rem;
46+
font-weight: 600;
47+
color: var(--md-primary-bg-color);
48+
background-color: var(--md-primary-fg-color);
49+
border-radius: 0.2rem;
50+
text-decoration: none;
51+
transition: opacity 0.15s;
52+
}
53+
54+
.md-nav__sponsor-cta:hover {
55+
opacity: 0.85;
56+
color: var(--md-primary-bg-color);
57+
}

docs/img/fastapi-logo.png

19.4 KB
Loading

docs/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ and means we're now able to start building a common set of tooling usable across
4444

4545
Uvicorn currently supports **HTTP/1.1** and **WebSockets**.
4646

47+
## Sponsorship
48+
49+
Help us keep Uvicorn maintained and sustainable by [becoming a sponsor](https://github.com/sponsors/Kludex).
50+
51+
**Current sponsors:**
52+
53+
<div style="display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; margin: 1rem 0;">
54+
<a href="https://fastapi.tiangolo.com">
55+
<img src="img/fastapi-logo.png" alt="FastAPI" style="height: 80px;">
56+
</a>
57+
</div>
58+
4759
## Quickstart
4860

4961
**Uvicorn** is available on [PyPI](https://pypi.org/project/uvicorn/) so installation is as simple as:

docs/overrides/partials/nav.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,15 @@
4444
{{ item.render(nav_item, path, 1) }}
4545
{% endfor %}
4646
</ul>
47+
48+
<!-- Sponsors -->
49+
<div class="md-nav__sponsors">
50+
<p class="md-nav__sponsors-title">Sponsors</p>
51+
<a href="https://fastapi.tiangolo.com" title="FastAPI" class="md-nav__sponsor">
52+
<img src="{{ 'img/fastapi-logo.png' | url }}" alt="FastAPI">
53+
</a>
54+
<a href="https://github.com/sponsors/Kludex" class="md-nav__sponsor-cta">
55+
Become a sponsor! ❤️
56+
</a>
57+
</div>
4758
</nav>

docs/sponsorship.md

Lines changed: 0 additions & 184 deletions
This file was deleted.

mkdocs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ nav:
6262
- Docker: deployment/docker.md
6363
- Release Notes: release-notes.md
6464
- Contributing: contributing.md
65-
- Sponsorship: sponsorship.md
6665

6766
extra:
6867
analytics:
@@ -80,6 +79,9 @@ extra:
8079
- icon: fontawesome/solid/globe
8180
link: https://fastapiexpert.com
8281

82+
extra_css:
83+
- css/extra.css
84+
8385
markdown_extensions:
8486
- attr_list
8587
- admonition

0 commit comments

Comments
 (0)