From ca03e0458e34f5136ef449178d13ac53cd37ca81 Mon Sep 17 00:00:00 2001 From: SoniPana <89836078+SoniPana@users.noreply.github.com> Date: Tue, 3 Sep 2024 01:57:00 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80Perf:=20=E7=94=BB=E5=83=8F=E5=8F=96?= =?UTF-8?q?=E5=BE=97=E3=81=AE=E9=9A=9B=E3=81=AE=E5=90=8D=E7=A7=B0=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 例: soni→soni.jpg --- src/components/ProfileCard.astro | 2 +- src/data/members.json | 2 +- src/pages/profile.astro | 6 +++--- src/scripts/images.js | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/ProfileCard.astro b/src/components/ProfileCard.astro index 9c05576..20e62ec 100644 --- a/src/components/ProfileCard.astro +++ b/src/components/ProfileCard.astro @@ -2,7 +2,7 @@ import { Image } from 'astro:assets'; const files = await Astro.glob("../assets/profile/avatars/*.{png,jpg,jpeg}"); const images = files.reduce((acc, file) => { - acc[file.default.src.split('/').pop().split('.')[0]] = file.default; + acc[file.default.src.split('/').pop().split('?')[0]] = file.default; return acc; }, {}); const { name } = Astro.props; diff --git a/src/data/members.json b/src/data/members.json index f0a784b..cf7f2d3 100644 --- a/src/data/members.json +++ b/src/data/members.json @@ -2,7 +2,7 @@ { "name": "Soni", "roles": "管理者/システム開発/フロントエンド開発/広報/モデレーター/プロジェクトマネージャー", - "avatar": "soni", + "avatar": "soni.jpg", "bio": "R6卒の浪人生。麻雀が好き。", "social": { "twitter": "sonipana1007", diff --git a/src/pages/profile.astro b/src/pages/profile.astro index 7830d9e..d1ddf86 100644 --- a/src/pages/profile.astro +++ b/src/pages/profile.astro @@ -6,7 +6,7 @@ import { Image } from 'astro:assets'; const pageTitle = 'Profile'; const files = await Astro.glob("../assets/profile/*.{png,jpg,jpeg}"); const images = files.reduce((acc, file) => { - acc[file.default.src.split('/').pop().split('.')[0]] = file.default; + acc[file.default.src.split('/').pop().split('?')[0]] = file.default; return acc; }, {}); --- @@ -38,13 +38,13 @@ const images = files.reduce((acc, file) => {