From 1f5d88fec182d7c138ce4a0a6c366301237fd152 Mon Sep 17 00:00:00 2001 From: Ciffelia Date: Tue, 5 Dec 2023 19:27:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?``=E3=82=B3=E3=83=B3=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E3=81=ABSVG=E3=81=8C?= =?UTF-8?q?=E4=B8=8E=E3=81=88=E3=82=89=E3=82=8C=E3=81=9F=E3=81=A8=E3=81=8D?= =?UTF-8?q?=E3=81=AFsrcset=E3=82=92=E7=94=9F=E6=88=90=E3=81=97=E3=81=AA?= =?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/Image.astro | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/common/Image.astro b/src/components/common/Image.astro index cbdd59f..7819f4f 100644 --- a/src/components/common/Image.astro +++ b/src/components/common/Image.astro @@ -10,7 +10,7 @@ type Props = Omit, 'src' | 'srcset'> & { const { widths = [3840, 1920, 960, 480, 240], ...attrs } = Astro.props -const { src, attributes } = await getImage(attrs) +const { src, options, attributes } = await getImage(attrs) const originalWidth = parseInt(attributes.width, 10) const srcset = ( @@ -25,4 +25,14 @@ const srcset = ( ).join(',') --- - +{ + options.format === 'svg' ? ( + + ) : ( + + ) +} From 7a594cd6938841703c902e152c02f3fc9316f397 Mon Sep 17 00:00:00 2001 From: Ciffelia Date: Tue, 5 Dec 2023 19:57:13 +0900 Subject: [PATCH 2/2] =?UTF-8?q?OUCC=E3=81=AE=E3=83=AD=E3=82=B4=E3=81=AF``=E3=81=A7=E3=81=AF=E3=81=AA=E3=81=8F``=E3=81=A7?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/{icons => }/oucc.svg | 2 +- src/components/index/about/AboutSection.astro | 15 ++++++++++++--- src/components/layout/Footer.astro | 5 +++-- src/components/layout/nav/Header.astro | 10 +++++----- src/components/layout/nav/Navigation.astro | 5 +++-- src/pages/blog/[slug]/_OgImageGenerator.ts | 2 +- 6 files changed, 25 insertions(+), 14 deletions(-) rename src/assets/{icons => }/oucc.svg (97%) diff --git a/src/assets/icons/oucc.svg b/src/assets/oucc.svg similarity index 97% rename from src/assets/icons/oucc.svg rename to src/assets/oucc.svg index 77992a0..611d0bc 100644 --- a/src/assets/icons/oucc.svg +++ b/src/assets/oucc.svg @@ -1,4 +1,4 @@ - + (
  • - + + {typeof icon === 'string' ? ( + + ) : ( + + )} + {description.map((x) => (

    {x}

    ))} diff --git a/src/components/layout/Footer.astro b/src/components/layout/Footer.astro index 466d745..52daa83 100644 --- a/src/components/layout/Footer.astro +++ b/src/components/layout/Footer.astro @@ -1,11 +1,12 @@ --- -import Icon from '@/components/common/Icon.astro' +import Image from '@/components/common/Image.astro' +import ouccImage from '@/assets/oucc.svg' import FooterLink from './FooterLink.astro' ---