|
26 | 26 | ref="songContentRef" |
27 | 27 | /> |
28 | 28 | </slide> |
29 | | - <template #addons> |
30 | | - <pagination class="hidden md:flex z-50 bottom-0 !m-0 left-0 translate-x-0 gap-2" /> |
31 | | - </template> |
32 | 29 | </carousel> |
33 | 30 | </div> |
34 | | - <!-- toolbar --> |
| 31 | + |
| 32 | + <!-- Toolbar --> |
35 | 33 | <div |
36 | 34 | class="group fixed z-40 bottom-2 right-2 w-full flex justify-end items-center gap-1 transition-opacity" |
37 | 35 | :class="{ 'opacity-0 hover:opacity-100': !chords }" |
38 | 36 | > |
39 | | - <!-- back navigation --> |
| 37 | + <!-- Pagination --> |
| 38 | + <div class="hidden md:flex mr-auto ml-6 gap-2"> |
| 39 | + <secondary-button |
| 40 | + v-for="(song, i) in songs" |
| 41 | + :key="i" |
| 42 | + class="w-8 h-8 !rounded-full" |
| 43 | + :class="{ |
| 44 | + '!bg-spring-600': i === presentation?.data.currentSlide |
| 45 | + }" |
| 46 | + @click="presentation.slideTo(i)" |
| 47 | + > |
| 48 | + <span v-if="chords">{{ song.customTuning }}</span> |
| 49 | + </secondary-button> |
| 50 | + </div> |
| 51 | + |
| 52 | + <!-- Back navigation --> |
40 | 53 | <secondary-button |
41 | 54 | class="absolute bottom-0 left-4 md:left-auto md:right-1/2 flex items-center gap-1 mr-0.5" |
42 | 55 | :disabled="currentPosition <= 0" |
|
48 | 61 | <div class="hidden 2xl:block max-w-3xs truncate"> |
49 | 62 | {{ songs[currentPosition-1].title }} |
50 | 63 | </div> |
51 | | - <div class="text-lg leading-4 font-mono font-bold text-spring-600 dark:text-spring-400"> |
| 64 | + <div v-if="chords" class="text-lg leading-4 font-mono font-bold text-spring-600 dark:text-spring-400"> |
52 | 65 | {{ songs[currentPosition-1].customTuning }} |
53 | 66 | </div> |
54 | 67 | </div> |
55 | 68 | </secondary-button> |
56 | | - <!-- forward navigation --> |
| 69 | + |
| 70 | + <!-- Forward navigation --> |
57 | 71 | <secondary-button |
58 | 72 | class="absolute bottom-0 left-16 md:left-1/2 flex items-center gap-1 ml-0.5" |
59 | 73 | :disabled="currentPosition >= songs.length-1" |
|
64 | 78 | <div class="hidden 2xl:block max-w-3xs truncate"> |
65 | 79 | {{ songs[currentPosition+1].title }} |
66 | 80 | </div> |
67 | | - <div class="text-lg leading-4 font-mono font-bold text-spring-600 dark:text-spring-400"> |
| 81 | + <div v-if="chords" class="text-lg leading-4 font-mono font-bold text-spring-600 dark:text-spring-400"> |
68 | 82 | {{ songs[currentPosition+1].customTuning }} |
69 | 83 | </div> |
70 | 84 | </div> |
71 | 85 | <icon-arrow-right class="w-5 h-5 stroke-1.5" /> |
72 | 86 | </secondary-button> |
73 | | - <!-- live clock --> |
| 87 | + |
| 88 | + <!-- Live clock --> |
74 | 89 | <div class="font-mono text-2xl px-4">{{ timeonly }}</div> |
75 | | - <!-- song info --> |
| 90 | + |
| 91 | + <!-- Song info --> |
76 | 92 | <secondary-button |
77 | 93 | class="hidden lg:block" |
78 | 94 | :disabled="!songs[currentPosition]?.note" |
|
81 | 97 | > |
82 | 98 | <icon-info-circle class="w-5 h-5 stroke-1.5" :class="{ 'stroke-spring-400': showModal.infosongdata }" /> |
83 | 99 | </secondary-button> |
84 | | - <!-- toggle synchronisation --> |
| 100 | + <!-- Toggle synchronisation --> |
85 | 101 | <secondary-button |
86 | 102 | class="hidden lg:block" |
87 | 103 | :title="tooltip('sync')" |
|
90 | 106 | <icon-refresh v-if="autoSync" class="w-5 h-5 stroke-1.5 stroke-spring-400" /> |
91 | 107 | <icon-refresh-off v-else class="w-5 h-5 stroke-1.5" /> |
92 | 108 | </secondary-button> |
93 | | - <!-- toggle content visibility --> |
| 109 | + <!-- Toggle content visibility --> |
94 | 110 | <secondary-button |
95 | 111 | class="hidden lg:block" |
96 | 112 | :title="tooltip('display')" |
|
99 | 115 | <icon-eye v-if="!hide" class="w-5 h-5 stroke-1.5 stroke-spring-400" /> |
100 | 116 | <icon-eye-off v-else class="w-5 h-5 stroke-1.5" /> |
101 | 117 | </secondary-button> |
102 | | - <!-- toggle theme --> |
| 118 | + <!-- Toggle theme --> |
103 | 119 | <secondary-button |
104 | 120 | class="hidden lg:block" |
105 | 121 | :title="tooltip('invert')" |
106 | 122 | @click="dark = !dark" |
107 | 123 | > |
108 | 124 | <icon-brightness class="w-5 h-5 stroke-1.5" :class="{ 'stroke-spring-400': !dark }" /> |
109 | 125 | </secondary-button> |
110 | | - <!-- toggle chords --> |
| 126 | + <!-- Toggle chords --> |
111 | 127 | <secondary-button |
112 | 128 | class="hidden lg:block" |
113 | 129 | :title="tooltip('chords')" |
|
116 | 132 | <icon-music v-if="chords" class="w-5 h-5 stroke-1.5 stroke-spring-400" /> |
117 | 133 | <icon-music-off v-else class="w-5 h-5 stroke-1.5" /> |
118 | 134 | </secondary-button> |
119 | | - <!-- dropdown for small viewports --> |
| 135 | + |
| 136 | + <!-- Dropdown for small viewports --> |
120 | 137 | <div class="lg:hidden"> |
121 | 138 | <dropdown position="up"> |
122 | 139 | <button |
|
164 | 181 | </button> |
165 | 182 | </dropdown> |
166 | 183 | </div> |
167 | | - <!-- exit presentation --> |
| 184 | + <!-- Exit presentation --> |
168 | 185 | <button |
169 | 186 | class="p-2 text-blade-500" |
170 | 187 | :title="tooltip('close')" |
171 | 188 | @click="emit('closed')" |
172 | 189 | > |
173 | 190 | <icon-x class="w-5 h-5 stroke-1.5" /> |
174 | 191 | </button> |
175 | | - <!-- remote toolbar --> |
| 192 | + |
| 193 | + <!-- Remote toolbar --> |
176 | 194 | <div |
177 | 195 | v-if="sync && !autoSync" |
178 | 196 | class="flex items-center gap-1 p-1 absolute -top-8 right-10 opacity-0 transition-all group-hover:-top-12 group-hover:opacity-100" |
|
202 | 220 | </div> |
203 | 221 | </div> |
204 | 222 | </modal> |
205 | | - <!-- modal: info song note --> |
| 223 | + |
| 224 | + <!-- Modal: info song note --> |
206 | 225 | <info-song-data |
207 | 226 | :active="showModal.infosongdata" |
208 | 227 | :song="songs[currentPosition]" |
|
212 | 231 |
|
213 | 232 | <script setup> |
214 | 233 | import 'vue3-carousel/dist/carousel.css'; |
215 | | -import { Carousel, Slide, Pagination } from 'vue3-carousel'; |
| 234 | +import { Carousel, Slide } from 'vue3-carousel'; |
216 | 235 | import { logicOr } from '@vueuse/math'; |
217 | 236 | import { whenever } from '@vueuse/core'; |
218 | 237 | import { reactive, ref, computed, watch, onMounted, onUnmounted, nextTick, inject } from 'vue'; |
|
0 commit comments