Skip to content

Commit 068905f

Browse files
authored
improve page contents (and fix some ui) (#231)
1 parent 262937a commit 068905f

32 files changed

+82
-111
lines changed

bun.lock

Lines changed: 11 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@tailwindcss/typography": "^0.5.16",
3232
"astro": "^5.5.5",
3333
"astro-icon": "^1.1.5",
34-
"bits-ui": "^1.3.13",
34+
"bits-ui": "^1.3.14",
3535
"daisyui": "^5.0.9",
3636
"date-fns": "^4.1.0",
3737
"markdown-to-txt": "^2.0.1",
@@ -42,7 +42,6 @@
4242
"@astrojs/check": "^0.9.4",
4343
"@biomejs/biome": "^1.9.4",
4444
"@tailwindcss/vite": "^4.0.17",
45-
"@types/bun": "^1.2.6",
4645
"lefthook": "^1.11.5",
4746
"prettier": "^3.5.3",
4847
"prettier-plugin-astro": "^0.14.1",

src/components/ActivityPage/Section.astro

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import { Picture } from "astro:assets";
33
interface Props {
44
title: string;
5-
edge: "left" | "right";
5+
"align-image": "left" | "right";
66
image: ImageMetadata;
77
imageAlt: string;
88
}
99
10-
const { title, edge, image, imageAlt } = Astro.props;
10+
const { title, "align-image": align, image, imageAlt } = Astro.props;
1111
---
1212

1313
<section class="mt-16 lg:grid lg:items-center">
@@ -16,9 +16,9 @@ const { title, edge, image, imageAlt } = Astro.props;
1616
class:list={[
1717
"isolate h-[300px] overflow-clip md:h-[400px] lg:h-[500px] lg:w-1/2 xl:h-[600px]",
1818
{
19-
left: "lg:ml-auto lg:rounded-l-2xl",
20-
right: "lg:rounded-r-2xl",
21-
}[edge],
19+
left: "lg:rounded-r-2xl",
20+
right: "lg:ml-auto lg:rounded-l-2xl",
21+
}[align],
2222
]}
2323
>
2424
<Picture
@@ -35,7 +35,7 @@ const { title, edge, image, imageAlt } = Astro.props;
3535
style={{ gridArea: "1 / 1" }}
3636
class="container mx-auto lg:max-w-screen-lg"
3737
>
38-
<div class:list={["p-8 lg:w-1/2", edge === "right" && "lg:ml-auto"]}>
38+
<div class:list={["p-8 lg:w-1/2", align === "left" && "lg:ml-auto"]}>
3939
<h2 class="text-4xl">{title}</h2>
4040
<div class="prose mt-4 max-w-none">
4141
<slot />

src/components/ArticleList.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const articlesWithExcerpts = await Promise.all(
7373
<a
7474
href={`/articles/${article.id}`}
7575
class:list={[
76-
"relative rounded-xl bg-gray-50 p-2 hover:brightness-95",
76+
"rounded-xl bg-gray-50 p-2 hover:brightness-95",
7777
additionalProps.cellClassName,
7878
]}
7979
>

src/components/Footer.astro

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const props = Astro.props;
2828
<FooterSection
2929
title="活動"
3030
links={[
31+
{ title: "プロジェクト", to: "/projects" },
3132
{ title: "ご寄付・ご協賛のお願い", to: "/donation/" },
3233
{ title: "ut.code(); で学習する", to: "/activities/learn/" },
3334
{ title: "ut.code(); で交流する", to: "/activities/share/" },
@@ -38,10 +39,6 @@ const props = Astro.props;
3839
title="リンク"
3940
links={[
4041
{ title: "ut.code(); Learn", to: "https://learn.utcode.net/" },
41-
{
42-
title: "はじめてのプログラミング教室",
43-
to: "https://first-programming.utcode.net/",
44-
},
4542
{ title: "GitHub", to: "https://github.com/ut-code" },
4643
{ title: "X", to: "https://x.com/utokyo_code" },
4744
]}

src/components/Footer/FooterSection.astro

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { Icon } from "astro-icon/components";
3+
24
interface Props {
35
title: string;
46
links: { title: string; to: string }[];
@@ -11,14 +13,17 @@ const { title, links } = Astro.props;
1113
<ul class="mt-4 space-y-2">
1214
{
1315
links.map((link) => (
14-
<li>
16+
<li class="align-middle">
1517
<a
1618
href={link.to}
17-
class="link relative active:top-0.25 motion-reduce:hover:underline"
19+
class="link motion-reduce:hover:underline"
1820
target={link.to.startsWith("/") ? "" : "_blank"}
1921
rel={link.to.startsWith("/") ? "" : "noreferrer"}
2022
>
2123
{link.title}
24+
{!link.to.startsWith("/") && (
25+
<Icon name="feather:external-link" class="mx-1 mb-1 inline" />
26+
)}
2227
</a>
2328
</li>
2429
))

src/components/ProjectList.astro

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ const { projects, variant = "full" } = props;
1515
{
1616
projects.map((project, i) => (
1717
<li
18-
class:list={[
19-
"contents",
20-
variant === "compact" ? "variant-short" : "variant-full",
21-
]}
18+
class:list={["contents", variant === "compact" && "data-variant-short"]}
2219
>
2320
<a
24-
class="relative top-0 overflow-clip rounded-xl border border-gray-200 hover:brightness-95"
21+
class="overflow-clip rounded-xl border border-gray-200 bg-gray-50 hover:brightness-95"
2522
href={`/projects/${project.id}`}
2623
>
2724
<Picture
@@ -61,12 +58,12 @@ const { projects, variant = "full" } = props;
6158

6259
<style>
6360
@media (max-width: 48rem) {
64-
li.variant-short:nth-child(n + 3) {
61+
li.data-variant-short:nth-child(n + 3) {
6562
display: none;
6663
}
6764
}
6865
@media (max-width: 80rem) {
69-
li.variant-short:nth-child(n + 5) {
66+
li.data-variant-short:nth-child(n + 5) {
7067
display: none;
7168
}
7269
}
-966 KB
Binary file not shown.
-906 KB
Binary file not shown.

0 commit comments

Comments
 (0)