-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: /about-us, /contact, /linksを実装
- Loading branch information
Showing
10 changed files
with
112 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
title: お問い合わせ | ||
draft: false | ||
date: 2022-03-15T00:00:00+09:00 | ||
lastmod: 2023-06-16T00:00:00+09:00 | ||
slug: contact | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
import "@/styles/katex.css" | ||
import { BaseLayout, type BaseLayoutProps } from "@/layouts/BaseLayout" | ||
import type { CollectionEntry } from "astro:content" | ||
import { mdxComponents } from "@/lib/mdx" | ||
import { LinkCard } from "@/components/Elements/LinkCard" | ||
export type Props = BaseLayoutProps & { | ||
page: CollectionEntry<"pages"> | ||
} | ||
const { page, ...props } = Astro.props | ||
const { Content } = await page.render() | ||
--- | ||
|
||
<BaseLayout {...props}> | ||
<main class="my-12 flex-1"> | ||
<article class="mx-auto max-w-screen-md"> | ||
<header class="flex flex-col items-center gap-6"> | ||
<h1 class="text-4xl font-bold">{page.data.title}</h1> | ||
</header> | ||
<section class="prose mt-12 max-w-full dark:prose-invert"> | ||
{ | ||
page.data.links && ( | ||
<div class="flex flex-col gap-6"> | ||
{page.data.links.map((link) => ( | ||
<LinkCard title={link.title} href={link.website} description={link.description} image={link.image} /> | ||
))} | ||
</div> | ||
) | ||
} | ||
<Content components={mdxComponents} /> | ||
</section> | ||
</article> | ||
</main> | ||
</BaseLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as PageLayout } from "./PageLayout.astro" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
import "katex/dist/katex.min.css" | ||
import { isDev } from "@/lib/runtime" | ||
import { getCollection } from "astro:content" | ||
import type { CollectionEntry } from "astro:content" | ||
import { PageLayout } from "@/layouts/PageLayout" | ||
export const getStaticPaths = async () => { | ||
const postEntries = await getCollection("pages", ({ data }) => (isDev ? true : !data.draft)) | ||
return postEntries.map((page) => ({ | ||
params: { | ||
slug: page.slug, | ||
}, | ||
props: { | ||
page, | ||
}, | ||
})) | ||
} | ||
type Props = { | ||
page: CollectionEntry<"pages"> | ||
} | ||
const { page } = Astro.props | ||
--- | ||
|
||
<PageLayout title={page.data.title + " - RICORA Programming Team"} page={page} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.katex { | ||
font-size: 1.1rem !important; | ||
} |