Skip to content
Open
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
81 changes: 81 additions & 0 deletions src/components/top/News.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
import { news } from "./news";
import TextLink from "../ui/TextLink.astro";
---

<section id="news">
<div class="news-list-container">
<ul class="news-list">
{
news.map((news) => (
<li class="news-item">
<span class="news-date text-body-large-strong">{news.date}</span>
{news.url ? (
<TextLink
href={news.url}
text={news.title}
isBlankLink={news.isBlankLink}
/>
) : (
<span class="news-title text-body-large-strong">
{news.title}
</span>
)}
</li>
))
}
</ul>
</div>
</section>

<style>
section#news {
background-color: var(--surface-secondary);
}

.news-date {
color: var(--text-secondary);
width: 90px;
}

.news-list-container {
max-width: 1031px;
padding: var(--space-s) var(--space-m);
margin: 0 auto;
box-sizing: border-box;
}

.news-list {
list-style: none;
margin: 0;
max-height: 111px;
overflow-y: scroll;
padding: 0;
}

.news-item {
display: flex;
align-items: center;
gap: var(--space-m);
padding: var(--space-xxs) 0;
width: fit-content;
}

.news-title {
color: var(--text-primary);
}

@media screen and (max-width: 768px) {
.news-list-container {
padding: var(--space-xxs) var(--space-s);
}

.news-item {
flex-direction: column;
align-items: flex-start;
gap: var(--space-xxxs);
padding: var(--space-xxs) 0;
width: 100%;
}
}
</style>
19 changes: 19 additions & 0 deletions src/components/top/news.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export type News = {
title: string;
date: string;
url?: string;
isBlankLink?: boolean;
};

export const news: News[] = [
{
title: "スポンサーの募集を開始しました!",
date: "2026.03.25",
url: "https://docs.google.com/forms/d/e/1FAIpQLSdH5gsb4teQ5hdFi9GaCFtNdNNCw1G4qdzyw2NoSWYQCYplow/viewform",
isBlankLink: true,
},
{
title: "Webサイトを公開しました!",
date: "2026.03.04",
},
];
5 changes: 3 additions & 2 deletions src/components/ui/TextLink.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ const { href, isBlankLink = false, text } = Astro.props as Props;
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
justify-content: space-between;
gap: var(--space-xxxs);
color: var(--text-primary);
cursor: pointer;
width: fit-content;
width: 100%;
}

a:hover {
Expand All @@ -40,6 +40,7 @@ const { href, isBlankLink = false, text } = Astro.props as Props;
height: 20px;
fill: var(--text-primary);
margin-top: 2px;
flex-shrink: 0;
}

a:hover .link-icon {
Expand Down
2 changes: 2 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import MainVisual from "../components/top/MainVisual.astro";
import News from "../components/top/News.astro";
import Layout from "../layouts/Layout.astro";
---

Expand Down Expand Up @@ -31,5 +32,6 @@ import Layout from "../layouts/Layout.astro";
<Layout title="Go Conference 2026">
<main>
<MainVisual />
<News />
</main>
</Layout>