diff --git a/README.md b/README.md
index 018a5202e..19dba3ffc 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ The key features are:
* estimation based on tests on an internal development team, building production applications.
-## Gold Sponsors
+## Sponsors
diff --git a/docs/en/data/sponsors.yml b/docs/en/data/sponsors.yml
index 7054fd516..5f56d9667 100644
--- a/docs/en/data/sponsors.yml
+++ b/docs/en/data/sponsors.yml
@@ -2,6 +2,7 @@ gold:
- url: https://www.deta.sh/?ref=fastapi
title: The launchpad for all your (team's) ideas
img: https://fastapi.tiangolo.com/img/sponsors/deta.svg
+silver:
- url: https://www.investsuite.com/jobs
title: Wealthtech jobs with FastAPI
img: https://fastapi.tiangolo.com/img/sponsors/investsuite.svg
@@ -11,7 +12,7 @@ gold:
- url: https://talkpython.fm/fastapi-sponsor
title: FastAPI video courses on demand from people you trust
img: https://fastapi.tiangolo.com/img/sponsors/talkpython.png
-silver:
+bronze:
- url: https://testdriven.io/courses/tdd-fastapi/
title: Learn to build high-quality web apps with best practices
img: https://fastapi.tiangolo.com/img/sponsors/testdriven.svg
diff --git a/docs/en/docs/css/custom.css b/docs/en/docs/css/custom.css
index ea408a11a..35ff9ef70 100644
--- a/docs/en/docs/css/custom.css
+++ b/docs/en/docs/css/custom.css
@@ -56,10 +56,41 @@ a.internal-link::after {
text-align: center;
}
-a.announce:link, a.announce:visited {
+a.announce-link:link,
+a.announce-link:visited {
color: #fff;
}
-a.announce:hover {
+a.announce-link:hover {
color: var(--md-accent-fg-color);
}
+
+.announce-wrapper {
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ align-items: center;
+}
+
+.announce-wrapper div.item {
+ display: none;
+}
+
+.announce-wrapper .sponsor-badge {
+ display: block;
+ position: absolute;
+ top: -5px;
+ right: 0;
+ font-size: 0.5rem;
+ color: #999;
+ background-color: #666;
+ border-radius: 10px;
+ padding: 0 10px;
+ z-index: 10;
+}
+
+.announce-wrapper>div {
+ min-height: 40px;
+ display: flex;
+ align-items: center;
+}
diff --git a/docs/en/docs/fastapi-people.md b/docs/en/docs/fastapi-people.md
index f73526002..e38c31c3d 100644
--- a/docs/en/docs/fastapi-people.md
+++ b/docs/en/docs/fastapi-people.md
@@ -130,11 +130,19 @@ They are supporting my work with **FastAPI** (and others), mainly through
+{% endfor %}
+{% endif %}
+
+### Individual Sponsors
+
{% if people %}
{% if people.sponsors_50 %}
-### Bronze Sponsors
-
{% for user in people.sponsors_50 %}
@@ -146,8 +154,6 @@ They are supporting my work with **FastAPI** (and others), mainly through
{% for user in people.sponsors %}
diff --git a/docs/en/docs/img/sponsors/deta-banner.svg b/docs/en/docs/img/sponsors/deta-banner.svg
new file mode 100644
index 000000000..e9b344ad3
--- /dev/null
+++ b/docs/en/docs/img/sponsors/deta-banner.svg
@@ -0,0 +1,125 @@
+
+
diff --git a/docs/en/docs/img/sponsors/deta.svg b/docs/en/docs/img/sponsors/deta.svg
index c2b77a867..066d6be7a 100644
--- a/docs/en/docs/img/sponsors/deta.svg
+++ b/docs/en/docs/img/sponsors/deta.svg
@@ -5,14 +5,14 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
- width="240"
- height="100"
- viewBox="0 0 240 100"
fill="none"
+ viewBox="0 0 240 100"
version="1.1"
- id="svg19">
+ id="svg16"
+ width="240"
+ height="100">
+ id="metadata22">
@@ -24,76 +24,42 @@
-
-
-
-
-
-
-
-
- Deploy your FastAPI app for free
+ id="defs20" />
+ id="g854"
+ transform="scale(0.5)">
+
+ d="m 152.507,18 c 19.61,0 35.507,15.825 35.507,35.347 0,19.522 -15.897,35.347 -35.507,35.347 C 132.897,88.694 117,72.87 117,53.347 117,33.825 132.897,18 152.507,18 Z"
+ fill="#f73b95"
+ id="path4" />
+ id="path6" />
+ id="path8" />
+ id="path10" />
+ id="path12" />
+
diff --git a/docs/en/docs/index.md b/docs/en/docs/index.md
index a721c3c12..82e8a9fca 100644
--- a/docs/en/docs/index.md
+++ b/docs/en/docs/index.md
@@ -40,13 +40,16 @@ The key features are:
* estimation based on tests on an internal development team, building production applications.
-## Gold Sponsors
+## Sponsors
{% if sponsors %}
{% for sponsor in sponsors.gold -%}

+{% endfor -%}
+{%- for sponsor in sponsors.silver -%}
+

{% endfor %}
{% endif %}
diff --git a/docs/en/docs/js/custom.js b/docs/en/docs/js/custom.js
index 72140df8b..8e3be4c13 100644
--- a/docs/en/docs/js/custom.js
+++ b/docs/en/docs/js/custom.js
@@ -128,6 +128,35 @@ function setupTermynal() {
loadVisibleTermynals();
}
+function shuffle(array) {
+ var currentIndex = array.length, temporaryValue, randomIndex;
+ while (0 !== currentIndex) {
+ randomIndex = Math.floor(Math.random() * currentIndex);
+ currentIndex -= 1;
+ temporaryValue = array[currentIndex];
+ array[currentIndex] = array[randomIndex];
+ array[randomIndex] = temporaryValue;
+ }
+ return array;
+}
+
+async function showRandomAnnouncement(groupId, timeInterval) {
+ const announceFastAPI = document.getElementById(groupId);
+ if (announceFastAPI) {
+ let children = [].slice.call(announceFastAPI.children);
+ children = shuffle(children)
+ let index = 0
+ const announceRandom = () => {
+ children.forEach((el, i) => {el.style.display = "none"});
+ children[index].style.display = "block"
+ index = (index + 1) % children.length
+ }
+ announceRandom()
+ setInterval(announceRandom, timeInterval
+ )
+ }
+}
+
async function main() {
if (div) {
data = await getData()
@@ -144,6 +173,8 @@ async function main() {
}
setupTermynal();
+ showRandomAnnouncement('announce-left', 5000)
+ showRandomAnnouncement('announce-right', 10000)
}
main()
diff --git a/docs/en/overrides/main.html b/docs/en/overrides/main.html
index abf6f3108..25e973b81 100644
--- a/docs/en/overrides/main.html
+++ b/docs/en/overrides/main.html
@@ -1,13 +1,26 @@
{% extends "base.html" %}
{% block announce %}
-
-
- {% include ".icons/material/email.svg" %}
- Subscribe to the FastAPI and friends newsletter 🎉
-
-
+
{% endblock %}
diff --git a/scripts/docs.py b/scripts/docs.py
index b206e9157..ec3ad76e6 100644
--- a/scripts/docs.py
+++ b/scripts/docs.py
@@ -206,6 +206,9 @@ index_sponsors_template = """
{% if sponsors %}
{% for sponsor in sponsors.gold -%}

+{% endfor -%}
+{%- for sponsor in sponsors.silver -%}
+

{% endfor %}
{% endif %}
"""