Browse Source
Merge branch 'fastapi:master' into sync-german-docs-2025-09-21
pull/14098/head
Nils-Hero Lindemann
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
19 additions and
5 deletions
docs/en/docs/css/custom.css
docs/en/docs/js/custom.js
docs/en/docs/release-notes.md
@ -124,11 +124,6 @@ a.announce-link:hover {
border-radius : 20px ;
}
/* Hide .sponsor-badge when .sponsor-image is display none */
. announce-wrapper a : has ( . sponsor-image [ style * = "display: none" ] ) . sponsor-badge {
display : none ;
}
. announce-wrapper > div {
min-height : 40px ;
display : flex ;
@ -135,10 +135,28 @@ async function showRandomAnnouncement(groupId, timeInterval) {
}
}
function hideSponsorOnImageError ( ) {
const sponsorImages = document . querySelectorAll ( '.sponsor-image' ) ;
const announceRight = document . getElementById ( 'announce-right' ) ;
function hideAnnounceRight ( ) {
if ( announceRight ) {
announceRight . style . display = 'none' ;
}
}
sponsorImages . forEach ( function ( img ) {
img . addEventListener ( 'error' , function ( ) {
hideAnnounceRight ( ) ;
} ) ;
} ) ;
}
async function main ( ) {
setupTermynal ( ) ;
showRandomAnnouncement ( 'announce-left' , 5000 )
showRandomAnnouncement ( 'announce-right' , 10000 )
hideSponsorOnImageError ( ) ;
}
document $ . subscribe ( ( ) => {
main ( )
@ -13,6 +13,7 @@ hide:
### Internal
* 🐛 Fix sponsor display issue by hiding element on image error. PR [#14097 ](https://github.com/fastapi/fastapi/pull/14097 ) by [@alejsdev ](https://github.com/alejsdev ).
* 🐛 Hide sponsor badge when sponsor image is not displayed. PR [#14096 ](https://github.com/fastapi/fastapi/pull/14096 ) by [@alejsdev ](https://github.com/alejsdev ).
## 0.117.1