@@ -57,14 +57,34 @@ block main
57
57
58
58
.mt-10.mb-20
59
59
h2.mb-8 #day Day 1
60
-
61
- mixin agenda-session(session )
60
+ mixin agenda-session(session, current_ct_session = null )
62
61
if session .type == ' R'
63
62
.agenda-session.items-center.justify-center.bg-neutral-300.rounded-xl.p-4.z-10.relative
64
63
.font-bold.text-neutral-900 ( data-i18n =` session.${ session .id } .title` ) = session .zh .title
64
+ else if session .type == ' E'
65
+ .agenda-session.items-center.justify-center.bg-neutral-100.rounded-xl.p-4.z-10.relative
66
+ .font-bold.text-neutral-900 ( data-i18n =` session.${ session .id } .title` ) = session .zh .title
67
+ - let speaker_id = session .speakers [0 ]
68
+ .text-sm.text-neutral-700 ( data-i18n =` speakers.${ speaker_id} .name` ) = speakers[speaker_id].zh .name
65
69
else
70
+ if session .tags .filter ((t ) => t .startsWith (' CT' )).length > 0 && current_ct_session && session .start_t === current_ct_session .start_t
71
+ .agenda-session.bg-tertiary.px-4.py-3.rounded-t-xl ( data-id =current_ct_session .id ,
72
+ data-tags =([... current_ct_session .tags , current_ct_session .type , current_ct_session .language ].filter ((t ) => !! t).join (' ,' )))
73
+ .font-bold.text-neutral-800 ( data-i18n =` session.${ current_ct_session .id } .title` ) = current_ct_session .zh .title
74
+ .text-neutral-600.text-sm
75
+ span( data-i18n ='agenda.moderator' ) 主持
76
+ span.mx-1 /
77
+ each speaker_id in current_ct_session .speakers
78
+ span.text-sm.text-neutral-700 ( data-i18n =` speakers.${ speaker_id} .name` ) = speakers[speaker_id].zh .name
79
+ .text-xs.text-white.my-2.flex.flex-wrap.gap-1.tag-group.hidden
80
+ span.bg-secondary.rounded-full.px-2 ( data-i18n =` session_type.${ session .type } ` ) = session_types[session .type ].zh .name
81
+ if session .language
82
+ span.bg-neutral-500.rounded-full.px-2 ( data-i18n =` language.${ session .language } ` ) = session .language === ' en' ? ' 英語' : ' 華語'
83
+ if session .tags [0 ]
84
+ each tag_id in session .tags
85
+ span.bg-neutral-400.rounded-full.px-2 ( data-i18n =` tag.${ tag_id} ` ) = tags[tag_id].zh .name
66
86
.agenda-session.bg-neutral-100.p-4.z-10.relative.grow.shrink-0 (
67
- class =is_community ? ' border-l -4 border-secondary ' : '' ,
87
+ class = current_ct_session ? ' border-r -4 border-tertiary ' : '' ,
68
88
data-id =session .id , data-tags =([... session .tags , session .type , session .language ].filter ((t ) => !! t).join (' ,' ))
69
89
) : .sticky ( class ="lg:top-40" )
70
90
.font-bold.text-neutral-800.mb-1 ( data-i18n =` session.${ session .id } .title` ) = session .zh .title
@@ -85,12 +105,17 @@ block main
85
105
- let styles = ` grid-area: ${ key} / time`
86
106
.block.agenda-timeline.z-0 ( style =styles, data-day =key < 1440 ? ' 1' : '2' )
87
107
.font-medium ( class ="translate-y-[-50%]" ) = time
88
-
108
+ - let current_ct_session = null
89
109
each sessions, start_t in schedule .sessions_by_t
90
110
each session in sessions .sessions
111
+ if session .start_t === session .end_t || session .type === ' C'
112
+ - current_ct_session = session
91
113
- let styles = ` grid-area: ${ session .start_t } / ${ session .room } / ${ session .end_t } / ${ session .type == ' R' ? ' end' : (session .broadcast ? ' RH' : session .room )} ;`
92
114
.flex.flex-col.p-3.session-block ( style =styles, data-room =session .room , data-broadcast =(session .broadcast ? ' true' : ' false' ), data-day =(session .start_t < 1440 ? ' 1' : ' 2' ))
93
- + agenda-session(session)
115
+ if session .type === ' C' || session .tags .filter ((t ) => t .startsWith (' CT' )).length > 0
116
+ + agenda-session(session, current_ct_session)
117
+ else
118
+ + agenda-session(session)
94
119
95
120
.flex.flex-col.agenda-list ( class ="lg:hidden" )
96
121
each sessions, start_t in schedule .sessions_by_t
0 commit comments