|
| 1 | +<template> |
| 2 | + <div> |
| 3 | + <div class="d-container"> |
| 4 | + <shared-banner>2022 ElixirConfAfr</shared-banner> |
| 5 | + <div class="w-full flex flex-wrap mt-2 md:mt-4"> |
| 6 | + <div v-if="!pending" class="w-full container mx-auto flex flex-wrap px-0 md:px-12 py-4"> |
| 7 | + <div |
| 8 | + class="flex flex-row lg:flex-col w-full lg:w-1/12 h-auto lg:h-64 bor border-r-0 lg:border-r border-primary dark:border-primary-dark space-y-0 lg:space-y-6 space-x-6 lg:space-x-0 items-center lg:items-start justify-center lg:justify-start py-2 lg:py-0 sticky nav-bg nav-side z-30" |
| 9 | + > |
| 10 | + <div |
| 11 | + v-for="(days, $index, $key) in schedule" |
| 12 | + :key="$key" |
| 13 | + :class="['w-4/12 px-3 py-1 lg:w-full cursor-pointer rounded-tl-lg rounded-bl-lg rounded-r-lg lg:rounded-r-none', currentTab === $key ? 'bg-primary dark:bg-primary-dark' : 'border border-r-1 lg:border-r-0 border-primary dark:border-primary-dark']" |
| 14 | + @click.prevent="showTab($key)" |
| 15 | + > |
| 16 | + <h4 |
| 17 | + :class="['text-px-16-slab', currentTab === $key ? 'text-white dark:text-secondary-dark-text' : 'text-primary dark:text-primary-dark']" |
| 18 | + > |
| 19 | + {{ $timeDay($index) }} <small |
| 20 | + :class="['text-px-13 capitalize', currentTab === $key ? 'text-white dark:text-secondary-dark-text' : 'text-primary dark:text-primary-dark']" |
| 21 | + >Day |
| 22 | + {{ $key + 1 }}</small> |
| 23 | + </h4> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + <div class="w-full lg:w-11/12 lg:min-h-[300px] mt-10 md:mt-0"> |
| 27 | + <div v-for="(days, $index, $key) in schedule" :id="$index" :key="$key"> |
| 28 | + <Transition |
| 29 | + name="fade" |
| 30 | + enter-active-class="transition duration-300 ease-out transform" |
| 31 | + enter-class="-translate-y-3 scale-95 opacity-0" |
| 32 | + enter-to-class="translate-y-0 scale-100 opacity-100" |
| 33 | + leave-active-class="transition duration-150 ease-in transform" |
| 34 | + leave-class="translate-y-0 opacity-100" |
| 35 | + leave-to-class="-translate-y-3 opacity-0" |
| 36 | + > |
| 37 | + <div v-if="currentTab === $key" class="flex-wrap w-full flex space-y-6 mb-2 lg:mb-10"> |
| 38 | + <div v-if="days.length > 0 && config.isEventLive"> |
| 39 | + <div |
| 40 | + v-for="(session, $ind) in days" |
| 41 | + :key="$ind" |
| 42 | + class="flex w-full px-0 lg:px-2 mb-8 lg:mb-10" |
| 43 | + > |
| 44 | + <div |
| 45 | + :class="['w-2/12 flex items-center justify-center text-right hidden lg:grid', session.is_serviceSession ? 'h-24' : 'h-44']" |
| 46 | + > |
| 47 | + <h3 class="text-px-14-slab text-primary dark:text-primary-dark uppercase"> |
| 48 | + {{ $time(session.start_date_time) }} <br> {{ |
| 49 | + $timeAm(session.start_date_time) }} |
| 50 | + </h3> |
| 51 | + </div> |
| 52 | + <div class="w-full lg:w-10/12 flex rounded-tr-lg rounded-br-lg"> |
| 53 | + <nuxt-link |
| 54 | + v-if="!session.is_serviceSession" |
| 55 | + :to="'/sessions/' + session.slug" |
| 56 | + class="h-20 w-20 lg:h-44 lg:w-44 shadow-lg flex-none bg-cover rounded-tl rounded-bl text-center overflow-hidden" |
| 57 | + > |
| 58 | + <div v-if="session.speakers.length === 1"> |
| 59 | + <img |
| 60 | + v-for="(speaker, $i) in session.speakers" |
| 61 | + :key="$i" |
| 62 | + :src="speaker.avatar" |
| 63 | + :alt="speaker.name" |
| 64 | + :title="speaker.name" |
| 65 | + > |
| 66 | + </div> |
| 67 | + <div v-else> |
| 68 | + <client-only> |
| 69 | + <carousel |
| 70 | + :per-page="1" |
| 71 | + :nav="false" |
| 72 | + wrap-around |
| 73 | + pause-autoplay-on-hover |
| 74 | + :loop="true" |
| 75 | + :pagination-enabled="true" |
| 76 | + :transition="500" |
| 77 | + :autoplay="2000" |
| 78 | + :mouse-drag="false" |
| 79 | + > |
| 80 | + <slide v-for="(speaker, $i) in session.speakers" :key="$i"> |
| 81 | + <img |
| 82 | + :src="speaker.avatar" |
| 83 | + :alt="speaker.name" |
| 84 | + :title="speaker.name" |
| 85 | + > |
| 86 | + </slide> |
| 87 | + </carousel> |
| 88 | + </client-only> |
| 89 | + </div> |
| 90 | + </nuxt-link> |
| 91 | + <div |
| 92 | + v-else |
| 93 | + class="h-12 w-20 lg:h-28 lg:w-44 flex-none bg-cover rounded-tl rounded-bl text-center overflow-hidden" |
| 94 | + style="background-image: url('/images/speakers/arrive.png')" |
| 95 | + :title="session.title" |
| 96 | + /> |
| 97 | + <div |
| 98 | + :class="['h-auto w-full shadow-lg rounded-tr-lg bg-white dark:bg-dark rounded-br-lg px-4 flex flex-col justify-between', session.is_serviceSession ? 'lg:h-28 py-2' : 'lg:h-44 py-1']" |
| 99 | + > |
| 100 | + <div class="flex flex-wrap items-start"> |
| 101 | + <div class="md:w-12/12"> |
| 102 | + <nuxt-link |
| 103 | + v-if="!session.is_serviceSession" |
| 104 | + :to="'/sessions/' + session.slug" |
| 105 | + > |
| 106 | + <div |
| 107 | + class="text-xl text-primary dark:text-primary-dark mb-2" |
| 108 | + > |
| 109 | + {{ session.title }} |
| 110 | + </div> |
| 111 | + <div |
| 112 | + class="text-base text-dark-text dark:text-dark-text-dark" |
| 113 | + > |
| 114 | + {{ $truncateString(session.description, 100) }} |
| 115 | + </div> |
| 116 | + </nuxt-link> |
| 117 | + <div v-else> |
| 118 | + <div |
| 119 | + class="text-xl text-primary dark:text-primary-dark mb-2" |
| 120 | + > |
| 121 | + {{ session.title }} |
| 122 | + </div> |
| 123 | + <div |
| 124 | + class="text-base text-dark-text dark:text-dark-text-dark" |
| 125 | + > |
| 126 | + {{ $truncateString(session.description, 100) }} |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + <div |
| 130 | + class="text-xs text-dark-text dark:text-dark-text-dark uppercase mt-2" |
| 131 | + > |
| 132 | + {{ $hour(session.start_date_time) }} - {{ |
| 133 | + $hour(session.end_date_time) }} |
| 134 | + <!-- | <span v-for="(room, $r) in session.rooms" :key="$r">{{ room.title }}<span v-if="$r+1 < session.rooms.length">, </span> </span>--> |
| 135 | + </div> |
| 136 | + <div |
| 137 | + v-if="!session.is_serviceSession" |
| 138 | + class="text-sm text-secondary dark:text-primary-dark pt-3" |
| 139 | + > |
| 140 | + <i class="fa fa-user pr-1" /> <span |
| 141 | + v-for="(speaker, $s) in session.speakers" |
| 142 | + :key="$s" |
| 143 | + ><a |
| 144 | + :href="speaker.twitter" |
| 145 | + >{{ speaker.name }}</a><span |
| 146 | + v-if="$s + 1 < session.speakers.length" |
| 147 | + >, </span> |
| 148 | + </span> |
| 149 | + </div> |
| 150 | + </div> |
| 151 | + <!-- <div class="w-2/12 flex items-center justify-center">--> |
| 152 | + <!-- <star-session v-if="!session.is_serviceSession" :session-id="session.id" :is-bookmarked="session.is_bookmarked" :session-slug="session.slug" />--> |
| 153 | + <!-- </div>--> |
| 154 | + </div> |
| 155 | + </div> |
| 156 | + </div> |
| 157 | + </div> |
| 158 | + </div> |
| 159 | + <no-session v-else :is-event-live="config.isEventLive" /> |
| 160 | + </div> |
| 161 | + </Transition> |
| 162 | + </div> |
| 163 | + </div> |
| 164 | + </div> |
| 165 | + <sessions-skeleton v-else /> |
| 166 | + </div> |
| 167 | + </div> |
| 168 | + <hr> |
| 169 | + <PastSponsors /> |
| 170 | + <hr> |
| 171 | + <PastPartners /> |
| 172 | + </div> |
| 173 | +</template> |
| 174 | + |
| 175 | +<script setup> |
| 176 | +import { useRuntimeConfig } from 'nuxt/app' |
| 177 | +import data from '../../api/sessions-2022.json' |
| 178 | +import SessionsSkeleton from '../../components/session/SessionsSkeleton' |
| 179 | +import NoSession from '../../components/session/NoSession' |
| 180 | +import 'vue3-carousel/dist/carousel.css' |
| 181 | +import { PastPartners } from '~~/.nuxt/components' |
| 182 | +
|
| 183 | +const config = useRuntimeConfig() |
| 184 | +
|
| 185 | +const currentTab = ref(0) |
| 186 | +const pending = ref(true) |
| 187 | +
|
| 188 | +const showTab = (id) => { |
| 189 | + currentTab.value = id |
| 190 | +} |
| 191 | +
|
| 192 | +const schedule = data.data |
| 193 | +onMounted(() => { |
| 194 | + setTimeout(() => { |
| 195 | + pending.value = false |
| 196 | + }, 100) |
| 197 | +}) |
| 198 | +</script> |
| 199 | + |
| 200 | +<style lang="scss" scoped> |
| 201 | +.all-sessions { |
| 202 | + animation: 1s appear; |
| 203 | + margin: auto; |
| 204 | +} |
| 205 | +
|
| 206 | +@keyframes appear { |
| 207 | + 0% { |
| 208 | + opacity: 0; |
| 209 | + } |
| 210 | +
|
| 211 | + 100% { |
| 212 | + opacity: 1; |
| 213 | + } |
| 214 | +} |
| 215 | +
|
| 216 | +.nav-side { |
| 217 | + top: 52px; |
| 218 | +
|
| 219 | + @media screen and (max-width: 360px) { |
| 220 | + top: 60px; |
| 221 | + } |
| 222 | +}</style> |
0 commit comments