diff --git a/README.md b/README.md index 4612eff19304908d1de6de6e49f32467cb42fe07..4b6af65b94f97a7832f8e9084fbd2fcc12ef8f58 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,22 @@ More details on Project structure: * `/static/` - Any contents inside here will be copied into the root of the final `build` directory * `/docusaurus.config.js` - This is the equivalent of `siteConfig.js` in Docusaurus v1 +## Image organisation + +Static assets are arranged in a certain way, all images are contained in subfolders within the `img` folder, the subfolder depends on how they are used. Following this structure: + +* An image used on a page will be in a subfolder named after the page, within the `pages` folder. e.g: +__You would find the file `kermit.png` used on the `about` page at `img/pages/about/kermit.png`__ + +* An image used in a component will be in a subfolder named after the component, within the `components` folder. e.g: +__You would find the file `kermit.png` used on the `slider` component at `img/components/slider/kermit.png`__ + +* An image used on a documentation page will be in a subfolder named after the page, within the `docs` folder. e.g: +__You would find the file `kermit.png` used on the `management` documentation page at `img/docs/management/kermit.png`__ + +* Global images (e.g: used in the footer) will be in the `img/theme/` subfolder. + + ## License [](https://choosealicense.com/licenses/mit/) diff --git a/docusaurus.config.js b/docusaurus.config.js index 6e5a85826c7000d0bddf874b374742a36ff2bb41..b895a3464c4cb7d6b03857b786b0af46303b13f2 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -17,7 +17,7 @@ module.exports = { title: "", logo: { alt: "Froggit Logo", - src: "img/logo_typo_froggit.png", + src: "img/theme/logo_typo_froggit.png", }, items: [ {label: "Fonctionnalités", position: "left", to: "/#features", exact: true}, diff --git a/src/components/CarouselLibre.js b/src/components/CarouselLibre.js index 405a9d55282198a3ec931e19ce169b97b118eb71..05188ce04cd40824969e7dd55cef41cced42eec2 100644 --- a/src/components/CarouselLibre.js +++ b/src/components/CarouselLibre.js @@ -4,42 +4,42 @@ import clsx from "clsx"; const CarouselList = [ { - img: "/img/CarouselLibre/gitlab_logo.png", + img: "/img/components/CarouselLibre/gitlab_logo.png", name: "GitLab", alt: "logo de GitLab" }, { - img: "/img/CarouselLibre/mattermost_logo.png", + img: "/img/components/CarouselLibre/mattermost_logo.png", name: "Mattermost", alt: "logo de Mattermost" }, { - img: "/img/CarouselLibre/docusaurus.png", + img: "/img/components/CarouselLibre/docusaurus.png", name: "Docusaurus", alt: "logo de Docusaurus" }, { - img: "/img/CarouselLibre/debian_logo.png", + img: "/img/components/CarouselLibre/debian_logo.png", name: "Debian", alt: "logo de Debian" }, { - img: "/img/CarouselLibre/Ansible_logo.png", + img: "/img/components/CarouselLibre/Ansible_logo.png", name: "Ansible", alt: "logo de Ansible" }, { - img: "/img/CarouselLibre/Terraform_logo.png", + img: "/img/components/CarouselLibre/Terraform_logo.png", name: "Terraform", alt: "logo de Terraform" }, { - img: "/img/CarouselLibre/borg_logo.png", + img: "/img/components/CarouselLibre/borg_logo.png", name: "Borg", alt: "logo de Borg" }, { - img: "/img/CarouselLibre/restic_logo.png", + img: "/img/components/CarouselLibre/restic_logo.png", name: "Restic", alt: "logo de Restic" }, diff --git a/src/components/HomepageFeatures.js b/src/components/HomepageFeatures.js index 1c64e7387dbcbe40d6d828bb43122f7f9737bf76..7e7c69ac87fc0b77fceb0bb48838e43d24c6fcc2 100644 --- a/src/components/HomepageFeatures.js +++ b/src/components/HomepageFeatures.js @@ -67,7 +67,7 @@ export default function HomepageFeatures() { {FeatureList.map((em) => ( <TabItem key={em.id} className={clsx("text--center")} value={em.title} label={em.title}> <div className={styles.rowDisplay}> - <img src={useBaseUrl("img/HomepageFeatures/" + em.svg)} alt={em.alt} className={styles.tabImages}/> + <img src={useBaseUrl("img/components/HomepageFeatures/" + em.svg)} alt={em.alt} className={styles.tabImages}/> <p className={styles.textDisplay}> {em.description} </p> </div> </TabItem> diff --git a/src/components/HomepagePromises.js b/src/components/HomepagePromises.js index 7513b49a4906d681cc9f7ac07e1acf84bb28a212..411e51ddf1fd7ce466917009b88418b87c5d6d04 100644 --- a/src/components/HomepagePromises.js +++ b/src/components/HomepagePromises.js @@ -5,7 +5,7 @@ import styles from "./HomepagePromises.module.css"; const PromiseList = [ { title: "Sécurisé", - Svg: require("../../static/img/bouclier.svg").default, + Svg: require("../../static/img/components/HomepagePromises/bouclier.svg").default, alt: "Icône d'un bouclier bleu", description: ( <> @@ -15,7 +15,7 @@ const PromiseList = [ }, { title: "Souverain", - Svg: require("../../static/img/rgpd.svg").default, + Svg: require("../../static/img/components/HomepagePromises/rgpd.svg").default, alt: "Icône d'un cadenas avec inscrit RGPD", description: ( <> @@ -25,7 +25,7 @@ const PromiseList = [ }, { title: "Libre", - Svg: require("../../static/img/liberte.svg").default, + Svg: require("../../static/img/components/HomepagePromises/liberte.svg").default, alt: "Icône de menottes brisées", description: ( <> diff --git a/src/pages/communaute.mdx b/src/pages/communaute.mdx index 1c5ddc9a660dc93feb2542918c147ebd6a8aef90..cf85b6a899e2aea8b909951a56f7465975efb596 100644 --- a/src/pages/communaute.mdx +++ b/src/pages/communaute.mdx @@ -1,6 +1,6 @@ import TextRight from '@site/src/components/TextRight'; -<TextRight img="/img/cheatsheet_cover.png" alt="Illustration de l'antisèche Git"> +<TextRight img="/img/pages/communaute/cheatsheet_cover.png" alt="Illustration de l'antisèche Git"> # Devenez deux fois plus productif grâce à GitLab ! diff --git a/src/pages/tarifs.mdx b/src/pages/tarifs.mdx index 312923623fbcb3129b8063b64f7f6306af895f1a..bc4a97409bd62dd8ce5f1a516bae6d7bb3e2f133 100644 --- a/src/pages/tarifs.mdx +++ b/src/pages/tarifs.mdx @@ -36,7 +36,7 @@ Si vous achetez plusieurs plans, hors têtard, avec le **même email** vous cumu <div class="card card_price"> <div class="card__image margin-top--md"> <img - src={useBaseUrl("img/pricing/hidden.png")} + src={useBaseUrl("img/pages/pricing/hidden.png")} alt="Image alt text" title="Plan Têtard" /> </div> @@ -69,7 +69,7 @@ Si vous achetez plusieurs plans, hors têtard, avec le **même email** vous cumu <div class="card shadow--tl card_price card_price_main"> <div class="card__image margin-top--md"> <img - src={useBaseUrl("img/pricing/computer.png")} + src={useBaseUrl("img/pages/pricing/computer.png")} alt="Image alt text" title="Plan Grenouille" /> </div> @@ -102,7 +102,7 @@ Si vous achetez plusieurs plans, hors têtard, avec le **même email** vous cumu <div class="card card_price"> <div class="card__image margin-top--md"> <img - src={useBaseUrl("img/pricing/cauldron.png")} + src={useBaseUrl("img/pages/pricing/cauldron.png")} alt="Image alt text" title="Plan Étang" /> </div> diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js index 6d7bcfe87ec640d6cc505384b6529bbef5327434..2e4bdecedb005fd2e0e94dc43aadc00f3260eecd 100644 --- a/src/theme/Footer/index.js +++ b/src/theme/Footer/index.js @@ -12,8 +12,8 @@ import FooterLogo from "@theme/Footer/Logo"; import FooterCopyright from "@theme/Footer/Copyright"; import FooterLayout from "@theme/Footer/Layout"; import { FaYoutube, FaLinkedin, FaGitlab, FaTwitter } from "react-icons/fa"; -import Froggitblanc from "/static/img/logo_froggit_blanc.png"; -import DontTrackMe from "/static/img/do-not-track-me.svg"; +import Froggitblanc from "/static/img/theme/logo_froggit_blanc.png"; +import DontTrackMe from "/static/img/theme/do-not-track-me.svg"; import useBaseUrl from "@docusaurus/useBaseUrl"; diff --git a/static/img/CarouselLibre/Ansible_logo.png b/static/img/components/CarouselLibre/Ansible_logo.png similarity index 100% rename from static/img/CarouselLibre/Ansible_logo.png rename to static/img/components/CarouselLibre/Ansible_logo.png diff --git a/static/img/CarouselLibre/Terraform_logo.png b/static/img/components/CarouselLibre/Terraform_logo.png similarity index 100% rename from static/img/CarouselLibre/Terraform_logo.png rename to static/img/components/CarouselLibre/Terraform_logo.png diff --git a/static/img/CarouselLibre/borg_logo.png b/static/img/components/CarouselLibre/borg_logo.png similarity index 100% rename from static/img/CarouselLibre/borg_logo.png rename to static/img/components/CarouselLibre/borg_logo.png diff --git a/static/img/CarouselLibre/debian_logo.png b/static/img/components/CarouselLibre/debian_logo.png similarity index 100% rename from static/img/CarouselLibre/debian_logo.png rename to static/img/components/CarouselLibre/debian_logo.png diff --git a/static/img/CarouselLibre/docusaurus.png b/static/img/components/CarouselLibre/docusaurus.png similarity index 100% rename from static/img/CarouselLibre/docusaurus.png rename to static/img/components/CarouselLibre/docusaurus.png diff --git a/static/img/CarouselLibre/gitlab_logo.png b/static/img/components/CarouselLibre/gitlab_logo.png similarity index 100% rename from static/img/CarouselLibre/gitlab_logo.png rename to static/img/components/CarouselLibre/gitlab_logo.png diff --git a/static/img/CarouselLibre/mattermost_logo.png b/static/img/components/CarouselLibre/mattermost_logo.png similarity index 100% rename from static/img/CarouselLibre/mattermost_logo.png rename to static/img/components/CarouselLibre/mattermost_logo.png diff --git a/static/img/CarouselLibre/openlogo-nd.svg b/static/img/components/CarouselLibre/openlogo-nd.svg similarity index 100% rename from static/img/CarouselLibre/openlogo-nd.svg rename to static/img/components/CarouselLibre/openlogo-nd.svg diff --git a/static/img/CarouselLibre/restic_logo.png b/static/img/components/CarouselLibre/restic_logo.png similarity index 100% rename from static/img/CarouselLibre/restic_logo.png rename to static/img/components/CarouselLibre/restic_logo.png diff --git a/static/img/HomepageFeatures/beer.png b/static/img/components/HomepageFeatures/beer.png similarity index 100% rename from static/img/HomepageFeatures/beer.png rename to static/img/components/HomepageFeatures/beer.png diff --git a/static/img/HomepageFeatures/chemistry.svg b/static/img/components/HomepageFeatures/chemistry.svg similarity index 100% rename from static/img/HomepageFeatures/chemistry.svg rename to static/img/components/HomepageFeatures/chemistry.svg diff --git a/static/img/HomepageFeatures/hello.png b/static/img/components/HomepageFeatures/hello.png similarity index 100% rename from static/img/HomepageFeatures/hello.png rename to static/img/components/HomepageFeatures/hello.png diff --git a/static/img/HomepageFeatures/rainbow.svg b/static/img/components/HomepageFeatures/rainbow.svg similarity index 100% rename from static/img/HomepageFeatures/rainbow.svg rename to static/img/components/HomepageFeatures/rainbow.svg diff --git a/static/img/HomepageFeatures/read-smile.svg b/static/img/components/HomepageFeatures/read-smile.svg similarity index 100% rename from static/img/HomepageFeatures/read-smile.svg rename to static/img/components/HomepageFeatures/read-smile.svg diff --git a/static/img/HomepageFeatures/selfie.svg b/static/img/components/HomepageFeatures/selfie.svg similarity index 100% rename from static/img/HomepageFeatures/selfie.svg rename to static/img/components/HomepageFeatures/selfie.svg diff --git a/static/img/bouclier.svg b/static/img/components/HomepagePromises/bouclier.svg similarity index 100% rename from static/img/bouclier.svg rename to static/img/components/HomepagePromises/bouclier.svg diff --git a/static/img/liberte.svg b/static/img/components/HomepagePromises/liberte.svg similarity index 100% rename from static/img/liberte.svg rename to static/img/components/HomepagePromises/liberte.svg diff --git a/static/img/rgpd.svg b/static/img/components/HomepagePromises/rgpd.svg similarity index 100% rename from static/img/rgpd.svg rename to static/img/components/HomepagePromises/rgpd.svg diff --git a/static/img/cheatsheet_cover.png b/static/img/pages/communaute/cheatsheet_cover.png similarity index 100% rename from static/img/cheatsheet_cover.png rename to static/img/pages/communaute/cheatsheet_cover.png diff --git a/static/img/pricing/cauldron.png b/static/img/pages/pricing/cauldron.png similarity index 100% rename from static/img/pricing/cauldron.png rename to static/img/pages/pricing/cauldron.png diff --git a/static/img/pricing/computer.png b/static/img/pages/pricing/computer.png similarity index 100% rename from static/img/pricing/computer.png rename to static/img/pages/pricing/computer.png diff --git a/static/img/pricing/hidden.png b/static/img/pages/pricing/hidden.png similarity index 100% rename from static/img/pricing/hidden.png rename to static/img/pages/pricing/hidden.png diff --git a/static/img/do-not-track-me.svg b/static/img/theme/do-not-track-me.svg similarity index 100% rename from static/img/do-not-track-me.svg rename to static/img/theme/do-not-track-me.svg diff --git a/static/img/docusaurus.png b/static/img/theme/docusaurus.png similarity index 100% rename from static/img/docusaurus.png rename to static/img/theme/docusaurus.png diff --git a/static/img/logo.svg b/static/img/theme/logo.svg similarity index 100% rename from static/img/logo.svg rename to static/img/theme/logo.svg diff --git a/static/img/logo_froggit.svg b/static/img/theme/logo_froggit.svg similarity index 100% rename from static/img/logo_froggit.svg rename to static/img/theme/logo_froggit.svg diff --git a/static/img/logo_froggit_blanc.png b/static/img/theme/logo_froggit_blanc.png similarity index 100% rename from static/img/logo_froggit_blanc.png rename to static/img/theme/logo_froggit_blanc.png diff --git a/static/img/logo_typo_froggit.png b/static/img/theme/logo_typo_froggit.png similarity index 100% rename from static/img/logo_typo_froggit.png rename to static/img/theme/logo_typo_froggit.png