From 8697f49d384d6ccd381234f4da73a75f5395b42a Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Thu, 18 Sep 2025 10:49:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Preserve=20links=20on=20Sponsors?= =?UTF-8?q?=20for=20the=20website=20(#6169)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** In the past, we used to import the sponsors by relying on an `img` tag. Unfortunately it dropped all the links. We switched to an `object` tag with a self-hosted svg file that we pull from GitHub at build time. **Checklist** — _Don't delete this checklist and make sure you do the following before opening the PR_ - [ ] The name of my PR follows [gitmoji](https://gitmoji.dev/) specification - [ ] My PR references one of several related issues (if any) - [ ] New features or breaking changes must come with an associated Issue or Discussion - [ ] My PR does not add any new dependency without an associated Issue or Discussion - [ ] My PR includes bumps details, please run `pnpm run bump` and flag the impacts properly - [ ] My PR adds relevant tests and they would have failed without my PR (when applicable) **Advanced** - [ ] Category: ... - [ ] Impacts: ... --- .github/workflows/build-status.yml | 1 + website/.gitignore | 1 + website/package.json | 5 +++-- website/src/components/HomepageSponsors/index.js | 9 +-------- .../src/components/HomepageSponsors/styles.module.css | 1 + 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-status.yml b/.github/workflows/build-status.yml index 71bc51ec..3d52f537 100644 --- a/.github/workflows/build-status.yml +++ b/.github/workflows/build-status.yml @@ -301,6 +301,7 @@ jobs: uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 with: path: | + website/static/img/sponsors.svg website/static/img/_ website/static/img/**/*.gif website/static/img/**/*.png diff --git a/website/.gitignore b/website/.gitignore index b4c6f170..36dc017c 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -9,6 +9,7 @@ .cache-loader generated-tests src/components/HomepageContributors/all-contributors.json +static/img/sponsors.svg static/img/_ static/img/**/*.gif static/img/**/*.png diff --git a/website/package.json b/website/package.json index 6b0111ed..8a5874c6 100644 --- a/website/package.json +++ b/website/package.json @@ -3,8 +3,9 @@ "name": "website", "scripts": { "docusaurus": "docusaurus", - "start": "cp ../.all-contributorsrc src/components/HomepageContributors/all-contributors.json && node prebuild/optimize-images.mjs && docusaurus start", - "build": "cp ../.all-contributorsrc src/components/HomepageContributors/all-contributors.json && node prebuild/optimize-images.mjs && docusaurus build", + "sync:sponsors": "[ -f static/img/sponsors.svg ] || curl -o static/img/sponsors.svg https://raw.githubusercontent.com/dubzzz/sponsors-svg/main/sponsorkit/sponsors.svg", + "start": "pnpm run sync:sponsors && cp ../.all-contributorsrc src/components/HomepageContributors/all-contributors.json && node prebuild/optimize-images.mjs && docusaurus start", + "build": "pnpm run sync:sponsors && cp ../.all-contributorsrc src/components/HomepageContributors/all-contributors.json && node prebuild/optimize-images.mjs && docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", diff --git a/website/src/components/HomepageSponsors/index.js b/website/src/components/HomepageSponsors/index.js index ea48c61f..59910b0e 100644 --- a/website/src/components/HomepageSponsors/index.js +++ b/website/src/components/HomepageSponsors/index.js @@ -7,14 +7,7 @@ export default function HomepageSponsors(props) {

They sponsor us…

They financially contribute to the fast-check

- - all sponsors - +

You can also become one of them by contributing via{' '} diff --git a/website/src/components/HomepageSponsors/styles.module.css b/website/src/components/HomepageSponsors/styles.module.css index 32d8c62d..c43dc914 100644 --- a/website/src/components/HomepageSponsors/styles.module.css +++ b/website/src/components/HomepageSponsors/styles.module.css @@ -1,3 +1,4 @@ .allSponsorsWrapper { align-self: center; + max-width: 800px; } -- 2.51.2