-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #131 from shikosai33/102/impl-event-panel
`<EventPanel>`を実装した
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
import { getCollection } from 'astro:content'; | ||
import { LayoutGrid } from 'lucide-astro'; | ||
import ButtonLink from './ButtonLink.astro'; | ||
import ColoredContainer from './ColoredContainer.astro'; | ||
import ColoredHeading from './ColoredHeading.astro'; | ||
import EventCard from './EventCard.astro'; | ||
const EventSlugs = (await getCollection('events')) | ||
.sort((a, b) => { | ||
return a.data['starts-at'].getTime() - b.data['starts-at'].getTime(); | ||
}) | ||
.map(event => { | ||
return event.slug; | ||
}) satisfies string[]; | ||
--- | ||
|
||
<ColoredContainer color="violet" class="max-w-[1250px] flex-col"> | ||
<div class="w-full flex justify-between items-center"> | ||
<ColoredHeading as="h3" class="text-3xl" text="イベント" color="violet" /> | ||
<p | ||
class="text-lg font-Dela text-mauve-11 text-stroke-mauve-1 text-stroke-8 paint-sfm drop-shadow-bump shadow-mauve-6 hidden md:block" | ||
> | ||
この時限りの演奏と催しを楽しもう | ||
</p> | ||
<ButtonLink color="violet" href="/event"> | ||
<LayoutGrid class="w-6 h-6 stroke-[2px] stroke-mauve-3" /> | ||
一覧を開く | ||
</ButtonLink> | ||
</div> | ||
<div class="flex gap-10 overflow-x-scroll hidden-scrollbar"> | ||
{ | ||
EventSlugs.map((slug) => { | ||
return ( | ||
<span class="self-stretch w-36"> | ||
<EventCard type="grid" slug={slug} class="w-36" /> | ||
</span> | ||
); | ||
}) | ||
} | ||
</div> | ||
</ColoredContainer> | ||
|
||
<style> | ||
.hidden-scrollbar { | ||
overflow: scroll; | ||
-ms-overflow-style: none; | ||
scrollbar-width: none; | ||
} | ||
|
||
.hidden-scrollbar::-webkit-scrollbar { | ||
display: none; | ||
} | ||
</style> |
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