File tree Expand file tree Collapse file tree 4 files changed +45
-25
lines changed
Expand file tree Collapse file tree 4 files changed +45
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ import { getCollection } from " astro:content" ;
3+ import Heading from " ../Heading.astro" ;
4+ import TimeTable from " ./TimeTable.astro" ;
5+
6+ const timetable = await getCollection (" timetable" );
7+ ---
8+
9+ <section id =" schedule" class =" bg-white py-10 md:py-16" >
10+ <div class =" container mx-auto px-4 max-w-4xl" >
11+ <Heading >スケジュール</Heading >
12+ {
13+ timetable
14+ .shift ()
15+ ?.data .map ((schedule ) => <TimeTable { ... schedule } />)
16+ }
17+ </div >
18+ </section >
Original file line number Diff line number Diff line change 1+ import { MicVocal , Zap , Coffee } from "@lucide/astro" ;
2+
3+ export const getScheduleCardStyle = ( title : string ) => {
4+ const isBreak = [ "Short break" , "Lunch break" ] . includes ( title ) ;
5+ if ( isBreak ) {
6+ return [ "bg-gray-50 border-gray-200" , Coffee ] ;
7+ }
8+ const isLightningTalks = title === "Lightning talks" ;
9+ if ( isLightningTalks ) {
10+ return [ "bg-yellow-50 border-yellow-200" , Zap ] ;
11+ }
12+
13+ const isOtherEvent = [ "Opening" , "Closing" , "After party" ] . includes ( title ) ;
14+ if ( isOtherEvent ) {
15+ return [ "bg-blue-50 border-blue-200" , MicVocal ]
16+ }
17+
18+
19+ return [ "bg-green-50" , MicVocal ] ;
20+ } ;
21+
22+ export const formatTime = ( date : Date ) : string => {
23+ const hours = date . getHours ( ) . toString ( ) . padStart ( 2 , "0" ) ;
24+ const minutes = date . getMinutes ( ) . toString ( ) . padStart ( 2 , "0" ) ;
25+ return `${ hours } :${ minutes } ` ;
26+ } ;
Original file line number Diff line number Diff line change 11---
22import AboutVimConf from " ../../components/AboutVimConf.astro" ;
33import KeynoteSpeakers from " ../../components/KeynoteSpeakers/index.astro" ;
4- import Schedule from " ../../components/Schedule.astro" ;
4+ import Schedule from " ../../components/Schedule/index .astro" ;
55import Sponsors from " ../../components/Sponsors/index.astro" ;
66import Staff from " ../../components/Staff/index.astro" ;
77import Top from " ../../components/Top.astro" ;
You can’t perform that action at this time.
0 commit comments