A mobile app for listening to radio stations from around the globe
git clone git://soophie.de/verbal
14
title: null,15
interval: null,16
resume: false,17
open: false17
open: false,18
tooLong: false,19
animationDuration: null20
};21
},22
components: {
36
},37
open(value) {38
state.open = value;39
},40
async title(value) {41
await this.$nextTick();42
const outer = this.$refs.songtitle;43
const inner = outer.querySelector('span');44
this.tooLong = outer.clientWidth - 12 < inner.clientWidth;45
this.animationDuration = `${Math.max(Math.abs(outer.clientWidth - 12 - inner.clientWidth) * 70, 2500)}ms`;46
}47
},48
methods: {
222
class="flex flex-col flex-1 z-10 min-w-0 w-[75vw] max-w-[400px] transition-modal"223
:style="opacity"224
>216
<p class="text-xl font-semibold text-white pb-1 overflow-hidden text-ellipsis whitespace-nowrap select-none pointer-events-none text-center">225
<p class="text-xl font-semibold text-white pb-2 overflow-hidden text-ellipsis whitespace-nowrap text-center">226
{{station.name}}227
</p>219
<p class="text-md text-gray-400 overflow-hidden text-ellipsis whitespace-nowrap select-none pointer-events-none text-center">220
{{title ?? $lang('player.no-song-title')}}228
<p ref="songtitle" class="songtitle text-md text-gray-400 overflow-hidden whitespace-nowrap relative px-2" :class="{'text-center': !tooLong, 'text-animate': tooLong}">229
<span class="inline-block" :style="{'animation-duration': animationDuration}">{{title ?? $lang('player.no-song-title')}}</span>230
</p>231
</div>232
<div class="inline-flex flex-col gap-6 z-10 pr-2 items-center">
58
box-shadow: 0 4px 16px 4px rgba(0, 0, 0, 0.5);59
}61
.text-animate span {62
position: relative;63
animation: leftright 3s infinite alternate linear;64
}66
.text-animate::before,67
.text-animate::after {68
content: '';69
display: block;70
position: absolute;71
width: 0.5rem;72
height: 100%;73
z-index: 2;74
top: 0;75
}77
.text-animate::before {78
left: 0;79
background: linear-gradient(to right, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));80
}82
.text-animate::after {83
right: 0;84
background: linear-gradient(to left, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));85
}87
@keyframes leftright {88
0%,89
20% {90
transform: translateX(0%);91
left: 0%;92
}93
80%,94
100% {95
transform: translateX(-100%);96
left: 100%;97
}98
}100
@font-face {101
font-family: 'Inter';102
font-style: normal;