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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ About ページの代表挨拶とメンバー情報は `src/content/about/data.y

ロケットと CanSat の紹介文は、それぞれ `src/pages/rocket.astro` と `src/pages/cansat.astro` に定義しています。

名刺の QR コードなどから開くリンク集は `src/pages/links.astro`(`/links`)です。ヘッダーのメニューには載せていません。

ニュースは microCMS の `news` API からビルド時に取得します。

取得したニュース画像は `public/cms-images/` にキャッシュされますが、このディレクトリは Git の管理対象外です。
Expand Down
7 changes: 5 additions & 2 deletions src/layouts/BaseLayout/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export interface Props {
imageHeight?: number;
type?: "website" | "article";
publishedTime?: string;
// ヘッダーとフッターを出さない(リンク集ページなど単体で完結する画面用)
bare?: boolean;
}

const {
Expand All @@ -26,6 +28,7 @@ const {
imageHeight = 630,
type = "website",
publishedTime,
bare = false,
} = Astro.props;
const baseUrl = import.meta.env.BASE_URL;
const publicSiteUrl = new URL("https://www.stb.tsukuba.ac.jp/~step/");
Expand Down Expand Up @@ -87,10 +90,10 @@ const ogImageUrl = image
</style>
</head>
<body>
<Header />
{!bare && <Header />}
<main>
<slot />
</main>
<Footer />
{!bare && <Footer />}
</body>
</html>
76 changes: 76 additions & 0 deletions src/pages/links.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
import { Image } from "astro:assets";
import { Icon } from "astro-icon/components";
import BaseLayout from "../layouts/BaseLayout/index.astro";
import logoImage from "../assets/logo.png";

const baseUrl = import.meta.env.BASE_URL;

// 名刺の QR などから開く想定のリンク集。ヘッダーのメニューには載せない
const links = [
{
label: "STEP公式サイト",
href: baseUrl,
icon: "fa:globe",
external: false,
},
{
label: "X(旧Twitter)",
handle: "@Tsukuba_STEP",
href: "https://x.com/Tsukuba_STEP",
icon: "fa6-brands:x-twitter",
external: true,
},
{
label: "Instagram",
handle: "@tsukuba_step",
href: "https://www.instagram.com/tsukuba_step",
icon: "fa6-brands:instagram",
external: true,
},
];
---

<BaseLayout
title="LINKS | 筑波大学宇宙技術プロジェクト"
ogTitle="リンク集 | 筑波大学宇宙技術プロジェクト"
description="筑波大学宇宙技術プロジェクトSTEPの公式サイトとSNSのリンク集です。"
bare
>
<div
class="min-h-screen flex flex-col items-center justify-center px-6 py-16"
>
<Image
src={logoImage}
alt="STEP LOGO"
width={280}
height={140}
class="w-56 sm:w-64 h-auto"
/>

<p class="text-sm sm:text-base text-gray-300 mt-6 text-center">
筑波大学宇宙技術プロジェクト STEP
</p>

<nav class="w-full max-w-md mt-10 space-y-4">
{
links.map((link) => (
<a
href={link.href}
target={link.external ? "_blank" : undefined}
rel={link.external ? "noopener noreferrer" : undefined}
class="flex items-center gap-4 w-full px-6 py-4 rounded-lg border-2 border-gray-700 text-white transition duration-300 ease-in-out hover:border-blue-800 hover:bg-white/5"
>
<Icon name={link.icon} class="text-xl sm:text-2xl shrink-0" />
<span class="text-base sm:text-lg font-bold">{link.label}</span>
{link.handle && (
<span class="ml-auto text-xs sm:text-sm text-gray-400">
{link.handle}
</span>
)}
</a>
))
}
</nav>
</div>
</BaseLayout>
Loading