File tree Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import Macros from 'unplugin-macros/vite';
8
8
9
9
// https://astro.build/config
10
10
export default defineConfig ( {
11
+ site : 'https://vimconf.org/' ,
11
12
base : '/2025' ,
12
13
13
14
vite : {
Original file line number Diff line number Diff line change 1
1
---
2
+ import type { ImageMetadata } from " astro" ;
3
+
4
+ // import.meta.globで画像をlazyロード
5
+ const images = import .meta .glob <{ default: ImageMetadata }>(
6
+ " /src/assets/sponsors/*.{png,svg}" ,
7
+ );
8
+
2
9
type Props = {
3
10
sponsor: {
4
11
rank: " platinum" | " gold" | " silver" | " bronze" ;
@@ -11,14 +18,14 @@ type Props = {
11
18
const props = Astro .props ;
12
19
const { rank, name, url, image } = props .sponsor ;
13
20
21
+ const imagePath = ` /src/assets/sponsors/${image } ` ;
14
22
let imageUrl = " " ;
15
- try {
16
- const module = await import (
17
- /* @vite-ignore */ ` ../../assets/sponsors/${image }?url `
18
- );
19
- imageUrl = module .default ;
20
- } catch (e ) {
21
- console .error (` Icon not found: ${image } ` );
23
+
24
+ if (images [imagePath ]) {
25
+ const imageModule = await images [imagePath ]();
26
+ imageUrl = imageModule .default .src ;
27
+ } else {
28
+ console .error (` Image not found: ${imagePath } ` );
22
29
}
23
30
24
31
// ランクごとのスタイル設定
Original file line number Diff line number Diff line change @@ -45,10 +45,6 @@ import { ExternalLink, Heart } from "@lucide/astro";
45
45
<div
46
46
class =" mb-8 flex flex-col items-center justify-center gap-3 sm:flex-row"
47
47
>
48
- <button
49
- class =" inline-flex h-10 w-auto items-center justify-center gap-2 rounded-md border border-emerald-600 bg-background px-4 py-2 text-sm font-medium whitespace-nowrap text-emerald-700 ring-offset-background transition-colors hover:bg-emerald-50 hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
50
- ><a href =" #cfp" >プロポーザルを提出する</a ></button
51
- >
52
48
<button
53
49
class =" inline-flex h-10 items-center justify-center gap-2 rounded-md bg-emerald-600 px-4 py-2 text-sm font-medium whitespace-nowrap text-primary-foreground ring-offset-background transition-colors hover:bg-emerald-700 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"
54
50
><a
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import Staff from "../../components/Staff/index.astro";
7
7
import Top from " ../../components/Top.astro" ;
8
8
import Venue from " ../../components/Venue.astro" ;
9
9
import OfficialBlog from " ../../components/OfficialBlog.astro" ;
10
- import CfP from " ../../components/CfP.astro" ;
11
10
import " ../../styles/global.css" ;
12
11
import { LANGUAGES } from " @/i18n" ;
13
12
@@ -21,7 +20,6 @@ export function getStaticPaths() {
21
20
<Layout >
22
21
<main class =" min-h-screen" >
23
22
<Top />
24
- <CfP />
25
23
<KeynoteSpeakers />
26
24
<Venue />
27
25
<AboutVimConf />
You can’t perform that action at this time.
0 commit comments