diff --git a/src/components/top/Sponsors.astro b/src/components/top/Sponsors.astro
new file mode 100644
index 0000000..942f095
--- /dev/null
+++ b/src/components/top/Sponsors.astro
@@ -0,0 +1,101 @@
+---
+import SectionTitle from "../ui/SectionTitle.astro";
+
+import Gold from "./sponsor/Gold.astro";
+import Silver from "./sponsor/Silver.astro";
+import Drink from "./sponsor/Drink.astro";
+import Lunch from "./sponsor/Lunch.astro";
+import Bronze from "./sponsor/Bronze.astro";
+import Gopher from "./sponsor/Gopher.astro";
+import Tool from "./sponsor/Tool.astro";
+import {
+ goldSponsors,
+ silverSponsors,
+ drinkSponsors,
+ lunchSponsors,
+ bronzeSponsors,
+ gopherSponsors,
+ toolSponsors,
+} from "./sponsors";
+
+const currentLocale = Astro.currentLocale || "ja";
+
+if (
+ goldSponsors.length === 0 &&
+ silverSponsors.length === 0 &&
+ drinkSponsors.length === 0 &&
+ lunchSponsors.length === 0 &&
+ bronzeSponsors.length === 0 &&
+ gopherSponsors.length === 0 &&
+ toolSponsors.length === 0
+) {
+ return null;
+}
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Bronze.astro b/src/components/top/sponsor/Bronze.astro
new file mode 100644
index 0000000..19643e5
--- /dev/null
+++ b/src/components/top/sponsor/Bronze.astro
@@ -0,0 +1,90 @@
+---
+import { Image } from "astro:assets";
+import type { Sponsor } from "../sponsors";
+
+interface Props {
+ sponsors: Sponsor[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+
+const currentLocale = Astro.currentLocale || "ja";
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Dialog.astro b/src/components/top/sponsor/Dialog.astro
new file mode 100644
index 0000000..fa3097a
--- /dev/null
+++ b/src/components/top/sponsor/Dialog.astro
@@ -0,0 +1,143 @@
+---
+import { Image } from "astro:assets";
+import type { SponsorWithDialog } from "../sponsors";
+import Tag from "../../ui/Tag.astro";
+import TextLink from "../../ui/TextLink.astro";
+
+import CloseIcon from "../../../assets/icons/close.svg";
+
+interface Props {
+ sponsorSectionTitle: string;
+ sponsor: SponsorWithDialog;
+}
+
+const { sponsorSectionTitle, sponsor } = Astro.props;
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Drink.astro b/src/components/top/sponsor/Drink.astro
new file mode 100644
index 0000000..0b611d3
--- /dev/null
+++ b/src/components/top/sponsor/Drink.astro
@@ -0,0 +1,97 @@
+---
+import { Image } from "astro:assets";
+import type { SponsorWithDialog } from "../sponsors";
+import Dialog from "./Dialog.astro";
+
+interface Props {
+ sponsors: SponsorWithDialog[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+
+const currentLocale = Astro.currentLocale || "ja";
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Gold.astro b/src/components/top/sponsor/Gold.astro
new file mode 100644
index 0000000..e8fe84f
--- /dev/null
+++ b/src/components/top/sponsor/Gold.astro
@@ -0,0 +1,111 @@
+---
+import { Image } from "astro:assets";
+import type { SponsorWithDialog } from "../sponsors";
+import Dialog from "./Dialog.astro";
+
+interface Props {
+ sponsors: SponsorWithDialog[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+
+const currentLocale = Astro.currentLocale || "ja";
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Gopher.astro b/src/components/top/sponsor/Gopher.astro
new file mode 100644
index 0000000..f3bb4d1
--- /dev/null
+++ b/src/components/top/sponsor/Gopher.astro
@@ -0,0 +1,92 @@
+---
+import { Image } from "astro:assets";
+import type { Sponsor } from "../sponsors";
+
+interface Props {
+ sponsors: Sponsor[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Lunch.astro b/src/components/top/sponsor/Lunch.astro
new file mode 100644
index 0000000..3da1940
--- /dev/null
+++ b/src/components/top/sponsor/Lunch.astro
@@ -0,0 +1,100 @@
+---
+import { Image } from "astro:assets";
+import type { SponsorWithDialog } from "../sponsors";
+import Dialog from "./Dialog.astro";
+
+interface Props {
+ sponsors: SponsorWithDialog[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+
+const currentLocale = Astro.currentLocale || "ja";
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Silver.astro b/src/components/top/sponsor/Silver.astro
new file mode 100644
index 0000000..b97c7af
--- /dev/null
+++ b/src/components/top/sponsor/Silver.astro
@@ -0,0 +1,102 @@
+---
+import { Image } from "astro:assets";
+import type { SponsorWithDialog } from "../sponsors";
+import Dialog from "./Dialog.astro";
+
+interface Props {
+ sponsors: SponsorWithDialog[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+
+const currentLocale = Astro.currentLocale || "ja";
+---
+
+
+
+
diff --git a/src/components/top/sponsor/Tool.astro b/src/components/top/sponsor/Tool.astro
new file mode 100644
index 0000000..dcc22ef
--- /dev/null
+++ b/src/components/top/sponsor/Tool.astro
@@ -0,0 +1,86 @@
+---
+import { Image } from "astro:assets";
+import type { Sponsor } from "../sponsors";
+
+interface Props {
+ sponsors: Sponsor[];
+}
+
+const { sponsors } = Astro.props;
+
+if (sponsors.length === 0) {
+ return null;
+}
+
+const currentLocale = Astro.currentLocale || "ja";
+---
+
+
+
+
diff --git a/src/components/top/sponsors.ts b/src/components/top/sponsors.ts
new file mode 100644
index 0000000..cba84b9
--- /dev/null
+++ b/src/components/top/sponsors.ts
@@ -0,0 +1,38 @@
+import type { ImageMetadata } from "astro";
+
+export type SponsorWithDialog = {
+ name: string;
+ imageSrc: ImageMetadata;
+ dialog: {
+ openId: string;
+ link: string;
+ description: string;
+ };
+};
+
+export type Sponsor = {
+ name: string;
+ imageSrc: ImageMetadata;
+};
+
+
+export const goldSponsors: SponsorWithDialog[] = [
+];
+
+export const silverSponsors: SponsorWithDialog[] = [
+];
+
+export const lunchSponsors: SponsorWithDialog[] = [
+];
+
+export const drinkSponsors: SponsorWithDialog[] = [
+];
+
+export const bronzeSponsors: Sponsor[] = [
+];
+
+export const gopherSponsors: Sponsor[] = [
+];
+
+export const toolSponsors: Sponsor[] = [
+];
diff --git a/src/components/ui/Tag.astro b/src/components/ui/Tag.astro
new file mode 100644
index 0000000..2819055
--- /dev/null
+++ b/src/components/ui/Tag.astro
@@ -0,0 +1,23 @@
+---
+type Props = {
+ text: string;
+};
+
+const { text } = Astro.props as Props;
+---
+
+
+ {text}
+
+
+
diff --git a/src/components/ui/TextLink.astro b/src/components/ui/TextLink.astro
index df65ef9..0d268c4 100644
--- a/src/components/ui/TextLink.astro
+++ b/src/components/ui/TextLink.astro
@@ -7,6 +7,7 @@ type Props = {
isBlankLink?: boolean;
withArrowIcon?: boolean;
text: string;
+ isAccentColor?: boolean;
};
const {
@@ -14,6 +15,7 @@ const {
isBlankLink = false,
withArrowIcon = false,
text,
+ isAccentColor = false,
} = Astro.props as Props;
---
@@ -21,6 +23,7 @@ const {
href={href}
target={isBlankLink ? "_blank" : undefined}
rel={isBlankLink ? "noopener noreferrer" : undefined}
+ data-accent={isAccentColor || undefined}
>
{text}
{isBlankLink && }
@@ -38,6 +41,10 @@ const {
width: 100%;
}
+ a[data-accent] {
+ color: var(--text-accent);
+ }
+
a:hover {
color: var(--text-accent);
}
diff --git a/src/pages/en/index.astro b/src/pages/en/index.astro
index 39622d0..e6b6e05 100644
--- a/src/pages/en/index.astro
+++ b/src/pages/en/index.astro
@@ -1,6 +1,7 @@
---
import AboutEn from "../../components/top/AboutEn.astro";
import MainVisual from "../../components/top/MainVisual.astro";
+import Sponsors from "../../components/top/Sponsors.astro";
import News from "../../components/top/News.astro";
import Layout from "../../layouts/Layout.astro";
import ScholarshipRecruitment from "../../components/top/ScholarshipRecruitment.astro";
@@ -14,5 +15,6 @@ import FAQ from "../../components/top/FAQ.astro";
+
diff --git a/src/pages/index.astro b/src/pages/index.astro
index d573d5e..ede0f1b 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -2,6 +2,7 @@
import About from "../components/top/About.astro";
import MainVisual from "../components/top/MainVisual.astro";
import News from "../components/top/News.astro";
+import Sponsors from "../components/top/Sponsors.astro";
import Layout from "../layouts/Layout.astro";
import ScholarshipRecruitment from "../components/top/ScholarshipRecruitment.astro";
import FAQ from "../components/top/FAQ.astro";
@@ -14,5 +15,6 @@ import FAQ from "../components/top/FAQ.astro";
+