Skip to content

Commit 8e0c9c8

Browse files
committed
style: apply format
1 parent 5be5f62 commit 8e0c9c8

File tree

5 files changed

+32
-30
lines changed

5 files changed

+32
-30
lines changed

2025/src/components/Sessions/Session.astro

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ type Props = {
1111
image_url?: string;
1212
};
1313
14-
const { speaker_name, title, abstract, self_introduction, image_url } = Astro.props;
14+
const { speaker_name, title, abstract, self_introduction, image_url } =
15+
Astro.props;
1516
---
1617

17-
<Card class="p-8 mb-5">
18+
<Card class="mb-5 p-8">
1819
<div class="flex flex-col items-center gap-6 md:flex-row md:items-start">
1920
<div class="flex-shrink-0">
2021
<span
2122
class="relative flex h-24 w-24 shrink-0 overflow-hidden rounded-full md:h-32 md:w-32"
2223
>
23-
<img
24-
class="aspect-square h-full w-full text-center object-cover"
24+
<img
25+
class="aspect-square h-full w-full object-cover text-center"
2526
alt={speaker_name}
26-
src={image_url || 'https://via.placeholder.com/150?text=' + encodeURIComponent(speaker_name.charAt(0))}
27+
src={image_url ||
28+
"https://via.placeholder.com/150?text=" +
29+
encodeURIComponent(speaker_name.charAt(0))}
2730
/></span
2831
>
2932
</div>

2025/src/components/Sessions/index.astro

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ const sessionsWithImages = await Promise.all(
1414
...session.data,
1515
image_url: await getSessionImageUrl(session.data.session_id),
1616
},
17-
}))
17+
})),
1818
);
1919
---
2020

2121
<section id="sessions" class="bg-white py-10 md:py-16">
2222
<div class="container mx-auto px-4">
2323
<Heading>セッション一覧</Heading>
24-
{sessionsWithImages.sort((a, b) => a.data.start_at.getTime() - b.data.start_at.getTime()).map((session) => <Session {...session.data} />)}
24+
{
25+
sessionsWithImages
26+
.sort((a, b) => a.data.start_at.getTime() - b.data.start_at.getTime())
27+
.map((session) => <Session {...session.data} />)
28+
}
2529
</div>
2630
</section>
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
import type { ImageMetadata } from 'astro';
1+
import type { ImageMetadata } from "astro";
22

33
const images = import.meta.glob<{ default: ImageMetadata }>(
4-
'/src/assets/sessions/*.{png,jpg}'
4+
"/src/assets/sessions/*.{png,jpg}",
55
);
66

77
export async function getSessionImageUrl(sessionId: string): Promise<string> {
88
// ファイル名とsession_idのマッピング
99
const imageFiles: Record<string, string> = {
10-
'atusy': 'atusy.jpg',
11-
'hrsh7th': 'hrsh7th.png',
12-
'kawarimidoll': 'kawarimidoll.png',
13-
'kuuote': 'kuuote.png',
14-
'Λlisue': 'lambdalisue.png',
15-
'mikoto2000': 'mikoto2000.png',
16-
'rbtnn': 'rbtnn.jpg',
17-
'satoru_kitaguchi_register': 'satorunooshie.png',
18-
'satoru_kitaguchi_dot': 'satorunooshie.png',
19-
'teppei22': 'teppei22.jpg',
10+
atusy: "atusy.jpg",
11+
hrsh7th: "hrsh7th.png",
12+
kawarimidoll: "kawarimidoll.png",
13+
kuuote: "kuuote.png",
14+
Λlisue: "lambdalisue.png",
15+
mikoto2000: "mikoto2000.png",
16+
rbtnn: "rbtnn.jpg",
17+
satoru_kitaguchi_register: "satorunooshie.png",
18+
satoru_kitaguchi_dot: "satorunooshie.png",
19+
teppei22: "teppei22.jpg",
2020
};
2121

2222
const fileName = imageFiles[sessionId];
2323
if (!fileName) {
24-
return '';
24+
return "";
2525
}
2626

2727
const imagePath = `/src/assets/sessions/${fileName}`;
@@ -30,7 +30,5 @@ export async function getSessionImageUrl(sessionId: string): Promise<string> {
3030
return imageModule.default.src;
3131
}
3232

33-
return '';
33+
return "";
3434
}
35-
36-

2025/src/components/Sponsors/Companies.astro

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ const rankNameMap = {
3434
};
3535
3636
const getGridClasses = (rank: string, count: number) => {
37-
const baseClasses = [
38-
"mb-8",
39-
"grid",
40-
"place-items-center",
41-
"gap-4",
42-
];
37+
const baseClasses = ["mb-8", "grid", "place-items-center", "gap-4"];
4338
4439
if (rank === "platinum") {
4540
return [...baseClasses, "grid-cols-1"];

2025/src/components/Sponsors/Company.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ const { rank, name, url, image } = props.sponsor;
1313
1414
let imageUrl = "";
1515
try {
16-
const module = await import(/* @vite-ignore */ `../../assets/sponsors/${image}?url`);
16+
const module = await import(
17+
/* @vite-ignore */ `../../assets/sponsors/${image}?url`
18+
);
1719
imageUrl = module.default;
1820
} catch (e) {
1921
console.error(`Icon not found: ${image}`);

0 commit comments

Comments
 (0)