From fb29e9ec74497ec332740a1c099256d94a496e4a Mon Sep 17 00:00:00 2001 From: simeydotme Date: Sun, 3 Sep 2023 02:09:36 +0800 Subject: [PATCH] add accessibility docs, add some options links --- .gitignore | 3 +- public/recipes/price-gradient.png | Bin 0 -> 12252 bytes .../recipes/pricegradient/PriceGradient.css | 40 +++++------ src/components/Reusable/Option.astro | 13 ++-- src/components/Reusable/Recipe.astro | 21 ++++-- src/components/Reusable/RecipeList.astro | 4 +- src/content/docs/en/a11y.mdx | 65 ++++++++++++++++++ src/content/docs/en/examples.mdx | 29 ++++++++ src/content/docs/en/examples/easing.mdx | 2 - src/content/docs/en/getting-started.mdx | 6 +- src/content/docs/en/options.mdx | 4 +- src/content/docs/en/recipes.mdx | 2 +- src/styles/a11y.scss | 3 + src/styles/index.scss | 51 ++++++++++++++ 14 files changed, 202 insertions(+), 41 deletions(-) create mode 100644 public/recipes/price-gradient.png create mode 100644 src/content/docs/en/a11y.mdx create mode 100644 src/content/docs/en/examples.mdx create mode 100644 src/styles/a11y.scss diff --git a/.gitignore b/.gitignore index 6240da8..5a505ce 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,6 @@ pnpm-debug.log* .env .env.production -# macOS-specific files +# OS-specific files .DS_Store +*.Identifier \ No newline at end of file diff --git a/public/recipes/price-gradient.png b/public/recipes/price-gradient.png new file mode 100644 index 0000000000000000000000000000000000000000..e6be307ebce8ae2b90972a41d004f8602b602540 GIT binary patch literal 12252 zcmeHt^&8l;hKq-y|)0g)a$21KPhhwko>PNf-2QW}9Fq@)@0 z9q;!X&;9-Z&oA%i`DNyU+1Flceb-uhuL^msDu?%&@-YSm2A+bvv<3zSCLI0z75f4D z^I6sQH3kMPhJy4fEf3?p^hfa)+R2+8-+?nFW$7g!V!vX3Q@=-Q09MUi*{XWGcJln? zV$t`swGZaP@1l6jarOk~M9;#ht5XH*zt1^?=j#(>)YV(==Vu!}#?qI5Y?Gf@HaN)0 zeHM(`_eOD>$o5hna?>wewF#+HBs(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- a/src/components/Reusable/Recipe.astro +++ b/src/components/Reusable/Recipe.astro @@ -1,18 +1,20 @@ --- interface Props { - image: string; - link: string; name: string; + link: string; + image?: string; } -const { image, link, name } = Astro.props +const { name, link, image } = Astro.props ---
  • - {name} + {image && + {name} + }

    {name}

  • @@ -22,16 +24,21 @@ const { image, link, name } = Astro.props