|
<div id="stage" class="stage" :class="{'menu-open': menuOpen, 'voices-open': voicesOpen}" :style="{ color: activeReminder.waveFrontColor, backgroundColor: stageBg }" v-cloak> |
|
<div class="menu__button" @click="toggleMenu"> |
|
<div class="menu__dot"></div> |
|
</div> |
|
<div class="microphone" v-if="supportSpeechRecognition" :class="{'is-listening': isListening }" @click="startListenVoiceCommands"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> |
|
<path d="M12 16c2.206 0 4-1.795 4-4v-6c0-2.206-1.794-4-4-4s-4 1.794-4 4v6c0 2.205 1.794 4 4 4z"></path> |
|
<path d="M19 12v-2c0-0.552-0.447-1-1-1s-1 0.448-1 1v2c0 2.757-2.243 5-5 5s-5-2.243-5-5v-2c0-0.552-0.447-1-1-1s-1 0.448-1 1v2c0 3.52 2.613 6.432 6 6.92v1.080h-3c-0.553 0-1 0.447-1 1s0.447 1 1 1h8c0.553 0 1-0.447 1-1s-0.447-1-1-1h-3v-1.080c3.387-0.488 6-3.4 6-6.92z"></path> |
|
</svg> |
|
<div class="voice-tooltip" v-show="isListening"> |
|
<transition name="fade" mode="out-in"> |
|
<span :key="tooltipText">{{ tooltipText }}</span> |
|
</transition> |
|
</div> |
|
</div> |
|
<div class="voices-menu"> |
|
<svg class="voices-menu__bg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><title>sphere</title><circle cx="25" cy="25" r="25"/></svg> |
|
<div class="voices-menu__button" @click="toggleVoicesMenu"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768" viewBox="0 0 768 768"> |
|
<path d="M523.5 448.5h108c4.5-21 9-42 9-64.5s-4.5-43.5-9-64.5h-108c3 21 4.5 42 4.5 64.5s-1.5 43.5-4.5 64.5zM466.5 625.5c58.5-19.5 109.5-61.5 139.5-114h-94.5c-10.5 40.5-25.5 78-45 114zM459 448.5c3-21 4.5-42 4.5-64.5s-1.5-43.5-4.5-64.5h-150c-3 21-4.5 42-4.5 64.5s1.5 43.5 4.5 64.5h150zM384 639c27-39 48-81 61.5-127.5h-123c13.5 46.5 34.5 88.5 61.5 127.5zM256.5 256.5c10.5-40.5 25.5-78 45-114-58.5 19.5-109.5 61.5-139.5 114h94.5zM162 511.5c30 52.5 81 94.5 139.5 114-19.5-36-34.5-73.5-45-114h-94.5zM136.5 448.5h108c-3-21-4.5-42-4.5-64.5s1.5-43.5 4.5-64.5h-108c-4.5 21-9 42-9 64.5s4.5 43.5 9 64.5zM384 129c-27 39-48 81-61.5 127.5h123c-13.5-46.5-34.5-88.5-61.5-127.5zM606 256.5c-30-52.5-81-94.5-139.5-114 19.5 36 34.5 73.5 45 114h94.5zM384 64.5c177 0 319.5 142.5 319.5 319.5s-142.5 319.5-319.5 319.5-319.5-142.5-319.5-319.5 142.5-319.5 319.5-319.5z"></path> |
|
</svg> |
|
<span>Select voice</span> |
|
</div> |
|
<div class="voices-menu__close" @click="toggleVoicesMenu"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768" viewBox="0 0 768 768"> |
|
<path d="M607.5 205.5l-178.5 178.5 178.5 178.5-45 45-178.5-178.5-178.5 178.5-45-45 178.5-178.5-178.5-178.5 45-45 178.5 178.5 178.5-178.5z"></path> |
|
</svg> |
|
</div> |
|
<div class="voices-list-wrapper"> |
|
<ul class="voices-list"> |
|
<li class="voices-list__item" :class="{'is-selected': selectedVoice.name === voice.name }" v-for="voice in voices" :key="voice.lang"> |
|
<a href="#" class="voices-list__link" @click.prevent="voiceSelected(voice)"> |
|
<span class="voices-list__icon"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="768" height="768" viewBox="0 0 768 768"> |
|
<path d="M672 160q13.75 0 22.875 9.125t9.125 22.875q0 13.5-9.25 22.75l-384 384q-9.25 9.25-22.75 9.25t-22.75-9.25l-192-192q-9.25-9.25-9.25-22.75 0-13.75 9.125-22.875t22.875-9.125q13.5 0 22.75 9.25l169.25 169.5 361.25-361.5q9.25-9.25 22.75-9.25z"></path> |
|
</svg> |
|
</span> |
|
<div class="voices-list__content"> |
|
<div>{{voice.name}}</div> |
|
<span>{{voice.lang}}</span> |
|
<span v-if="voice.default" class="voices-list__default">Default</span> |
|
</div> |
|
</a> |
|
</li> |
|
</ul> |
|
</div> |
|
</div> |
|
<div class="menu"> |
|
<ul class="menu__list"> |
|
<li class="menu__item" @mouseover="mouseOver('water')" @mouseout="mouseOut()" @touchstart="mouseOver('water')" @touchend="mouseOut()"> |
|
<a href="#" @click.prevent="start('water')"> |
|
<svg id="coffee-cup" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"> |
|
<title>coffee-cup-01</title> |
|
<path class="water-glass" d="M39.92,45H25V43.21H38.15L43.14,4l2,.2ZM25,45H10.08L4.89,4.15l2-.2,5,39.26H25Z"/> |
|
<path class="water-glass__water" d="M39.09,6.88s-3.13,2-5.48,0c-4.92,2.65-7.72,0-7.72,0s-4.59,2.76-7.94,0c-4.47,3.09-7,0-7,0l3.91,33.76H35Z"/> |
|
</svg> |
|
<span>Water break</span> |
|
</a> |
|
</li> |
|
<li class="menu__item" @mouseover="mouseOver('coffee')" @mouseout="mouseOut()" @touchstart="mouseOver('coffee')" @touchend="mouseOut()"> |
|
<a href="#" @click.prevent="start('coffee')"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"> |
|
<title>coffee-cup</title> |
|
<path class="coffee-cup" d="M49.42,21.07a9.69,9.69,0,0,0-2.17-6.55,10.16,10.16,0,0,0-7.08-3.12c-.14-2.47-.38-4-.38-4H36.58S42,39.54,20.43,39.56C-1.87,39.57,4.16,7.37,4.16,7.37H1.07S-4.29,43,20.43,43c9.31,0,14.35-5.06,17-11.37C40.47,31.4,49.43,29.84,49.42,21.07Zm-11,7.82a49,49,0,0,0,1.81-14.83,8.13,8.13,0,0,1,5.52,2.4,6.76,6.76,0,0,1,1.49,4.63C47.29,26.71,41.58,28.39,38.45,28.89Z"/> |
|
<path class="coffee-cup__coffee" d="M7.07,11.94H33.73s3.72,23.65-13.3,23.65S7.07,11.94,7.07,11.94Z"/> |
|
</svg> |
|
<span>Coffee break</span> |
|
</a> |
|
</li> |
|
<li class="menu__item" @mouseover="mouseOver('break')" @mouseout="mouseOut()" @touchstart="mouseOver('break')" @touchend="mouseOut()"> |
|
<a href="#" @click.prevent="start('break')"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"> |
|
<title>clock</title> |
|
<path class="clock" d="M24.62,47.08A21.88,21.88,0,1,1,46.49,25.21,21.9,21.9,0,0,1,24.62,47.08Zm0-41.75A19.88,19.88,0,1,0,44.49,25.21,19.9,19.9,0,0,0,24.62,5.33Z"/> |
|
<path class="clock__short" d="M34.49,26.71H24.62a1.5,1.5,0,0,1,0-3h9.88a1.5,1.5,0,0,1,0,3Z"/> |
|
<path class="clock__long" d="M24.62,26.71a1.5,1.5,0,0,1-1.5-1.5V9.54a1.5,1.5,0,0,1,3,0V25.21A1.5,1.5,0,0,1,24.62,26.71Z"/> |
|
</svg> |
|
<span>Office Break</span> |
|
</a> |
|
</li> |
|
</ul> |
|
</div> |
|
<div class="browser-support" v-if="!supportSpeechSynth"> |
|
Your browser doesn't <strong>support</strong> speech synthesis. |
|
</div> |
|
<div class="time"> |
|
<transition-group name="timer" tag="div"> |
|
<div v-for="time in timer" class="timer__item" :key="time.id"> |
|
{{ time.value }} |
|
</div> |
|
</transition-group> |
|
</div> |
|
<div class="waves" :style="waveStyles"> |
|
<div class="wave wave--back" :style="{ color: activeReminder.waveBackColor }"> |
|
<div class="water"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 32" preserveAspectRatio="none"><title>wave2</title><path d="M350,17.32V32H0V17.32C116.56,65.94,175-39.51,350,17.32Z"/></svg> |
|
</div> |
|
<div class="water"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 32" preserveAspectRatio="none"><title>wave2</title><path d="M350,17.32V32H0V17.32C116.56,65.94,175-39.51,350,17.32Z"/></svg> |
|
</div> |
|
</div> |
|
<div class="wave wave--front" :style="{ color: activeReminder.waveFrontColor }"> |
|
<div class="water"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 32" preserveAspectRatio="none"><title>wave2</title><path d="M350,17.32V32H0V17.32C116.56,65.94,175-39.51,350,17.32Z"/></svg> |
|
</div> |
|
<div class="water"> |
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 32" preserveAspectRatio="none"><title>wave2</title><path d="M350,17.32V32H0V17.32C116.56,65.94,175-39.51,350,17.32Z"/></svg> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="content"> |
|
<div class="percent"> |
|
<transition name="percent-left" mode="out-in"> |
|
<div :key="percentsLeft">{{ percentsLeft }}</div> |
|
</transition> |
|
<span>%</span> |
|
</div> |
|
</div> |
|
<button @click="reset"> |
|
{{ percentsLeft > 0 ? activeReminder.buttonTxt : 'Reset' }} |
|
</button> |
|
</div> |