diff --git a/README.md b/README.md index 03bcce385b..0e0cca0c4c 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,22 @@ The key features are: ## Opinions +
+
+ + + + +
+ "_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._"
Kabir Khan - Microsoft (ref)
@@ -92,26 +108,6 @@ The key features are: --- -"_I’m over the moon excited about **FastAPI**. It’s so fun!_" - -
Brian Okken - [Python Bytes](https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855) podcast host (ref)
- ---- - -"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._" - -
Timothy Crosley - [Hug](https://github.com/hugapi/hug) creator (ref)
- ---- - -"_If you're looking to learn one **modern framework** for building REST APIs, check out **FastAPI** [...] It's fast, easy to use and easy to learn [...]_" - -"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" - -
Ines Montani - Matthew Honnibal - [Explosion AI](https://explosion.ai) founders - [spaCy](https://spacy.io) creators (ref) - (ref)
- ---- - "_If anyone is looking to build a production Python API, I would highly recommend **FastAPI**. It is **beautifully designed**, **simple to use** and **highly scalable**, it has become a **key component** in our API first development strategy and is driving many automations and services such as our Virtual TAC Engineer._"
Deon Pillsbury - Cisco (ref)
diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css index bbfd49b55e..649a216d87 100644 --- a/docs/en/docs/css/custom.css +++ b/docs/en/docs/css/custom.css @@ -264,3 +264,110 @@ Inspired by Termynal's CSS tricks with modifications border-bottom: .05rem dotted var(--md-default-fg-color--light); cursor: help; } + +/* Opinions: interactive logo tabs */ +.fastapi-opinions { + margin: 1.5rem 0 2rem; +} +.fastapi-opinions__tabs { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 0.25rem; + margin-bottom: 1rem; +} +.fastapi-opinions__tab { + appearance: none; + background: none; + border: 0; + padding: 0.5rem; + margin: 0; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + border-radius: 6px; + transition: background-color 0.15s; + color: inherit; + font: inherit; + min-height: 40px; + min-width: 0; +} +.fastapi-opinions__tab:hover { + background-color: var(--md-default-fg-color--lightest); +} +.fastapi-opinions__tab:focus-visible { + outline: 2px solid var(--md-primary-fg-color); + outline-offset: 2px; +} +.fastapi-opinions__mark { + display: flex; + align-items: center; + justify-content: center; + height: 20px; + max-width: 100%; + filter: grayscale(1); + opacity: 0.5; + transition: filter 0.2s, opacity 0.2s; +} +.fastapi-opinions__mark img { + height: 100%; + width: auto; + max-width: 100%; + object-fit: contain; + display: block; +} +.fastapi-opinions__tab:hover .fastapi-opinions__mark { + filter: grayscale(0.3); + opacity: 0.85; +} +.fastapi-opinions__tab[aria-selected="true"] { + background-color: var(--md-default-fg-color--lightest); +} +.fastapi-opinions__tab[aria-selected="true"] .fastapi-opinions__mark { + filter: grayscale(0); + opacity: 1; +} + +/* Dark mode: brighten dark wordmarks so they read on slate */ +[data-md-color-scheme="slate"] .fastapi-opinions__mark { + filter: grayscale(1) invert(0.85); +} +[data-md-color-scheme="slate"] .fastapi-opinions__tab:hover .fastapi-opinions__mark { + filter: grayscale(0.3) invert(0.4); +} +[data-md-color-scheme="slate"] .fastapi-opinions__tab[aria-selected="true"] .fastapi-opinions__mark { + filter: none; +} + +.fastapi-opinions__panel { + background-color: rgba(0, 148, 133, 0.06); + border-left: 2px solid var(--md-primary-fg-color); + padding: 1rem 1.25rem; + border-radius: 0 4px 4px 0; +} +.fastapi-opinions__quote { + margin: 0; + font-size: 0.9rem; + font-style: italic; + line-height: 1.6; + color: var(--md-default-fg-color); +} +.fastapi-opinions__quote strong { font-style: normal; } +.fastapi-opinions__attr { + margin-top: 0.625rem; + font-size: 0.75rem; + color: var(--md-default-fg-color--light); +} +.fastapi-opinions__attr strong { color: var(--md-default-fg-color); } +.fastapi-opinions__attr a { + color: var(--md-primary-fg-color); + text-decoration: none; + font-size: 0.7rem; + margin-left: 0.25rem; +} +.fastapi-opinions__attr a:hover { text-decoration: underline; } + +@media (max-width: 600px) { + .fastapi-opinions__tabs { gap: 0.125rem; } + .fastapi-opinions__mark { height: 18px; } +} diff --git a/docs/en/docs/img/logos/cisco.svg b/docs/en/docs/img/logos/cisco.svg new file mode 100644 index 0000000000..b1f6ae27b1 --- /dev/null +++ b/docs/en/docs/img/logos/cisco.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + diff --git a/docs/en/docs/img/logos/microsoft.svg b/docs/en/docs/img/logos/microsoft.svg new file mode 100644 index 0000000000..e77821b28f --- /dev/null +++ b/docs/en/docs/img/logos/microsoft.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/en/docs/img/logos/netflix.svg b/docs/en/docs/img/logos/netflix.svg new file mode 100644 index 0000000000..3c015f960b --- /dev/null +++ b/docs/en/docs/img/logos/netflix.svg @@ -0,0 +1 @@ + diff --git a/docs/en/docs/img/logos/uber.svg b/docs/en/docs/img/logos/uber.svg new file mode 100644 index 0000000000..bc0bd54d82 --- /dev/null +++ b/docs/en/docs/img/logos/uber.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + diff --git a/docs/en/docs/index.md b/docs/en/docs/index.md index d5f7c39dec..d6140a794f 100644 --- a/docs/en/docs/index.md +++ b/docs/en/docs/index.md @@ -73,49 +73,39 @@ The key features are: ## Opinions { #opinions } -"_[...] I'm using **FastAPI** a ton these days. [...] I'm actually planning to use it for all of my team's **ML services at Microsoft**. Some of them are getting integrated into the core **Windows** product and some **Office** products._" - -
Kabir Khan - Microsoft (ref)
- ---- - -"_We adopted the **FastAPI** library to spawn a **REST** server that can be queried to obtain **predictions**. [for Ludwig]_" - -
Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - Uber (ref)
- ---- - -"_**Netflix** is pleased to announce the open-source release of our **crisis management** orchestration framework: **Dispatch**! [built with **FastAPI**]_" - -
Kevin Glisson, Marc Vilanova, Forest Monsen - Netflix (ref)
- ---- - -"_I’m over the moon excited about **FastAPI**. It’s so fun!_" - -
Brian Okken - [Python Bytes](https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855) podcast host (ref)
- ---- - -"_Honestly, what you've built looks super solid and polished. In many ways, it's what I wanted **Hug** to be - it's really inspiring to see someone build that._" - -
Timothy Crosley - [Hug](https://github.com/hugapi/hug) creator (ref)
- ---- - -"_If you're looking to learn one **modern framework** for building REST APIs, check out **FastAPI** [...] It's fast, easy to use and easy to learn [...]_" - -"_We've switched over to **FastAPI** for our **APIs** [...] I think you'll like it [...]_" - -
Ines Montani - Matthew Honnibal - [Explosion AI](https://explosion.ai) founders - [spaCy](https://spacy.io) creators (ref) - (ref)
- ---- - -"_If anyone is looking to build a production Python API, I would highly recommend **FastAPI**. It is **beautifully designed**, **simple to use** and **highly scalable**, it has become a **key component** in our API first development strategy and is driving many automations and services such as our Virtual TAC Engineer._" - -
Deon Pillsbury - Cisco (ref)
- ---- +
+
+ + + + +
+ +
+
"I'm using FastAPI a ton these days. I'm actually planning to use it for all of my team's ML services at Microsoft. Some of them are getting integrated into the core Windows product and some Office products."
+
— Kabir Khan, Microsoft (ref)
+
+ + + +
## FastAPI Conf { #fastapi-conf } diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js index 311995d7cd..a4db853f5c 100644 --- a/docs/en/docs/js/custom.js +++ b/docs/en/docs/js/custom.js @@ -201,11 +201,49 @@ function openLinksInNewTab() { }); } +function setupOpinionsTabs() { + const root = document.querySelector('.fastapi-opinions'); + if (!root) return; + const tabs = Array.from(root.querySelectorAll('[role="tab"]')); + const panels = Array.from(root.querySelectorAll('[role="tabpanel"]')); + if (!tabs.length) return; + + function activate(tab, focus) { + tabs.forEach(t => { + const selected = t === tab; + t.setAttribute('aria-selected', selected ? 'true' : 'false'); + t.setAttribute('tabindex', selected ? '0' : '-1'); + }); + const targetId = tab.getAttribute('aria-controls'); + panels.forEach(p => { + if (p.id === targetId) p.removeAttribute('hidden'); + else p.setAttribute('hidden', ''); + }); + if (focus) tab.focus(); + } + + tabs.forEach((tab, i) => { + tab.addEventListener('click', () => activate(tab, false)); + tab.addEventListener('keydown', (e) => { + let next = null; + if (e.key === 'ArrowRight') next = tabs[(i + 1) % tabs.length]; + else if (e.key === 'ArrowLeft') next = tabs[(i - 1 + tabs.length) % tabs.length]; + else if (e.key === 'Home') next = tabs[0]; + else if (e.key === 'End') next = tabs[tabs.length - 1]; + if (next) { + e.preventDefault(); + activate(next, true); + } + }); + }); +} + async function main() { setupTermynal(); showRandomAnnouncement('announce-left', 5000) handleSponsorImages(); openLinksInNewTab(); + setupOpinionsTabs(); } document$.subscribe(() => { main()