@@ -3,7 +3,7 @@ import { watch } from 'vue'
33import LabelSwitch from ' ./LabelSwitch.vue'
44import Toggle from ' ./Toggle.vue'
55import state from ' ../model.js'
6- import { MapPinIcon } from ' @heroicons/vue/24/outline'
6+ import { MapPinIcon , BookOpenIcon } from ' @heroicons/vue/24/outline'
77import { useRouter } from ' vue-router'
88import { classrooms } from ' ../utils/locations.js'
99
@@ -115,9 +115,42 @@ document.onvisibilitychange = () => { date = new Date() }
115115 < div class = " grid grid-cols-7 gap-px relative w-full overflow-y-hidden all-transition" : style= " { width: state.screen.md || !props.whole ? '140%' : '100%', height: showTime ? '976px' : '736px' }" > <!-- body -->
116116 < div v- for = " j in 112" class = " all-transition bg-gray-100 hover:bg-gray-50 rounded" / >
117117 < template v- for = " p in props.pieces" >
118- < div v- if = " !isHide(p)" : style= " pStyle(p)" class = " all-transition absolute p-1 text-xs rounded-r-sm overflow-hidden" : class = " classrooms[p.location] ? 'group' : ''"
119- >
120- < MapPinIcon v- if = " classrooms[p.location]" @click .stop = " locate(p.location)" : class = " colorMap[p.key][1]" class = " w-5 h-5 absolute opacity-0 top-1 right-1 group-hover:opacity-100 transition-opacity cursor-pointer" / >
118+ < div v- if = " !isHide(p)" : style= " pStyle(p)"
119+ class = " all-transition absolute p-1 text-xs rounded-r-sm overflow-hidden"
120+ : class = " classrooms[p.location] ? 'group' : 'group'" >
121+
122+ < div
123+ class = "
124+ absolute
125+ right-1
126+ top-auto bottom-1
127+ sm:top-1 sm:bottom-auto
128+ flex flex-col gap-1 sm:flex-row sm:items-center
129+ "
130+ >
131+ < BookOpenIcon
132+ : class = " colorMap[p.key][1]"
133+ class = "
134+ w-[clamp(14px,4vw,20px)]
135+ h-[clamp(14px,4vw,20px)]
136+ opacity-0 group-hover:opacity-100
137+ hover:opacity-70
138+ transition-opacity cursor-pointer
139+ "
140+ / >
141+ < MapPinIcon
142+ v- if = " classrooms[p.location]"
143+ @click .stop = " locate(p.location)"
144+ : class = " colorMap[p.key][1]"
145+ class = "
146+ w-[clamp(14px,4vw,20px)]
147+ h-[clamp(14px,4vw,20px)]
148+ opacity-0 group-hover:opacity-100
149+ hover:opacity-70
150+ transition-opacity cursor-pointer
151+ "
152+ / >
153+ < / div>
121154 < div class = " font-semibold text-shadow text-[0.7rem] sm:text-xs" : class = " colorMap[p.key][1]" > {{ p .title || p .key }}< / div>
122155 < div class = " text-[0.6rem] sm:text-xs opacity-90" : class = " colorMap[p.key][1]" v- if = " showTime" > {{ twelveHour ? twelvify (p .time ) : p .time }}< / div>
123156 < div class = " text-[0.625rem] sm:text-xs opacity-90" : class = " colorMap[p.key][1]" > {{ p .location }}< / div>
0 commit comments