Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 50 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@types/react-dom": "^19",
"@types/react-syntax-highlighter": "^15.5.13",
"babel-plugin-react-compiler": "1.0.0",
"baseline-browser-mapping": "^2.9.19",
"typescript": "^5"
}
}
13 changes: 1 addition & 12 deletions src/app/events/[eventId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CardList from "@/components/CardList";
import MarkdownContent from "@/components/ui/MarkdownContent";
import PageTitle from "@/components/ui/PageTitle";
import Paper from "@/components/ui/Paper";
import { getAllEventIds, getEvent, getWorks } from "@/lib/microcms";
import { getEvent, getWorks } from "@/lib/microcms";
import { unstable_noStore as noStore } from "next/cache";
import { notFound } from "next/navigation";
import styles from "./page.module.css";
Expand All @@ -13,17 +13,6 @@ type EventDetailsPageProps = {
searchParams: Promise<{ draftKey?: string }>;
};

export const revalidate = 60;

// 静的パスを生成
export async function generateStaticParams() {
// getAllEventIdsを使用して全てのイベントIDを取得
const allEventIds = await getAllEventIds();
return allEventIds.map((content) => ({
eventId: content.id,
}));
}

// propsを直接受け取り、paramsをawaitで解決する
export default async function EventDetailsPage(props: EventDetailsPageProps) {
// paramsオブジェクト自体をawaitで解決
Expand Down
128 changes: 128 additions & 0 deletions src/app/page.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 4rem 8rem;
}

.title {
font-family: var(--font-roboto-slab);
font-size: 6rem;
color: #333;
margin-bottom: 2rem;
}

.lead {
font-size: 1.8rem;
line-height: 1.8;
margin-bottom: 5rem;
text-align: center;
}

.grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 2rem;

div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

svg {
width: 70px;
height: auto;
margin-bottom: 1rem;
}
}
}

.card-title {
font-size: 2rem;
font-weight: 700;
margin-bottom: 3rem;
}

.card-body {
font-size: 1.6rem;
color: #444;
margin-bottom: 3rem;
}

.button {
display: inline-block;
width: 100%;
font-size: 1.6rem;
font-weight: 700;
background: var(--accent);
color: #444;
border-radius: 8px;
text-decoration: none;
text-align: center;
padding: 1.6rem 0;
position: relative;
transition:
background 160ms ease,
transform 160ms ease;
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
}

.button::after {
content: "→";
display: inline-block;
margin-left: 0.6rem;
transform: translateX(0);
transition: transform 160ms ease;
color: inherit;
}

.button:hover {
background: color-mix(in srgb, var(--accent), #000 10%);
}

.button:hover::after {
transform: translateX(6px);
}

.link {
display: inline-block;
text-decoration: underline;
font-size: 1.6rem;
font-weight: 600;
margin-top: 1rem;
}

@media (max-width: 899px) {
.grid {
grid-template-columns: 1fr;
}
}

@media (max-width: 640px) {
.container {
padding: 2rem 4rem;
}

.title {
font-size: 4rem;
}

.lead {
font-size: 1.4rem;
}

.card-title {
font-size: 1.8rem;
}

.card-body {
font-size: 1.4rem;
}

.button {
font-size: 1.4rem;
padding: 1.2rem 0;
}
}
53 changes: 51 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
import { redirect } from "next/navigation";
import CalenderIcon from "@/components/CalenderIcon";
import ProgramCodeIcon from "@/components/ProgramCodeIcon";
import Paper from "@/components/ui/Paper";
import Link from "next/link";
import styles from "./page.module.css";

export default function Home() {
redirect("/events");
return (
<div className={styles.container}>
<h1 className={styles.title}>KCL Works</h1>

<p className={styles.lead}>
KCL Works は、KCL(Kyutech Code
Lab)に参加する九州工業大学の学生による作品と活動成果を紹介するポートフォリオサイトです。
<br />
ハッカソン、企業連携イベント、開発プロジェクトなど、学生の挑戦の記録を掲載しています。
<br />
<Link
href="https://www.kyutech.ac.jp/career/kcl.html"
target="_blank"
rel="noopener noreferrer"
className={styles.link}
>
KCLについてはこちらをご覧ください
</Link>
</p>
<p></p>

<div className={styles.grid}>
<Paper>
<CalenderIcon />
<h3 className={styles["card-title"]}>Events</h3>
<p className={styles["card-body"]}>
KCLで行われたハッカソンや企業連携イベントを紹介します。
</p>
<Link href="/events" className={styles.button}>
イベントを見る
</Link>
</Paper>

<Paper>
<ProgramCodeIcon />
<h3 className={styles["card-title"]}>Works</h3>
<p className={styles["card-body"]}>
学生が制作したアプリやプロダクトを掲載しています。
</p>
<Link href="/works" className={styles.button}>
作品を見る
</Link>
</Paper>
</div>
</div>
);
}
Loading