This commit is contained in:
Alex committed 2025-01-10 16:31:38 +03:00
1 parent 3045a04fd1
commit 46b3290dc5
2 files changed
+26 -19

No files matched your search

+25 -18
View File
@@ -1,34 +1,41 @@
<template>
<v-container>
<v-row dense justify="center">
<v-card class="bg-red-darken-2">
<v-card-title> До окончания голосования осталось: </v-card-title>
<v-row dense>
<v-col>
<v-card>
<v-card class="bg-red-darken-2 py-5">
<v-card-title class="text-uppercase"> До окончания голосования осталось: </v-card-title>
<v-row dense class="align-baseline justify-center">
<v-col cols="2" class="text-center">
<v-card class="bg-yellow-darken-4">
<v-card-title>{{ displayDays }}</v-card-title>
</v-card>
<v-card-subtitle>Дней</v-card-subtitle>
</v-col>
<v-col>
<v-card>
<div>:</div>
<v-col cols="2" class="text-center">
<v-card class="bg-yellow-darken-4">
<v-card-title>{{ displayHours }}</v-card-title>
</v-card>
<v-card-subtitle>Часов</v-card-subtitle>
</v-col>
<v-col>
<v-card>
<div>:</div>
<v-col cols="2" class="text-center">
<v-card class="bg-yellow-darken-4">
<v-card-title>{{ displayMinutes }}</v-card-title>
</v-card>
<v-card-subtitle>Минут</v-card-subtitle>
</v-col>
<v-col>
<v-card>
<div>:</div>
<v-col cols="2" class="text-center">
<v-card class="bg-yellow-darken-4">
<v-card-title>{{ displaySeconds }}</v-card-title>
</v-card>
<v-card-subtitle>Секунд</v-card-subtitle>
</v-col>
</v-row>
<v-row dense class="justify-center">
<v-card-subtitle opacity="false" class="text-uppercase">
{{ displayDays == 1 ? 'День' : displayDays > 1 && displayDays <= 4 ? 'Дня' : displayDays <= 0 ? 'Дней' : 'Дней'}}
</v-card-subtitle>
<v-card-subtitle opacity="false" class="text-uppercase">Часов</v-card-subtitle>
<v-card-subtitle opacity="false" class="text-uppercase">Минут</v-card-subtitle>
<v-card-subtitle opacity="false" class="text-uppercase">Секунд</v-card-subtitle>
</v-row>
</v-card>
</v-row>
</v-container>
@@ -79,10 +86,10 @@ export default {
const minutesOf = Math.floor((distance % hours.value) / minutes.value)
const secondsOf = Math.floor((distance % minutes.value) / seconds)
displayDays.value = daysOf
displayHours.value = minutesOf < 10 & minutesOf > 10 ? "0" + hoursOf : hoursOf
displayDays.value = daysOf < 10 ? "0" + daysOf : daysOf
displayHours.value = hoursOf < 10 ? "0" + hoursOf : hoursOf
displayMinutes.value = minutesOf < 10 ? "0" + minutesOf : minutesOf
displaySeconds.value = minutesOf < 10 ? "0" + secondsOf : secondsOf
displaySeconds.value = secondsOf < 10 ? "0" + secondsOf : secondsOf
}, 1000)
}
+1 -1
View File
@@ -10,7 +10,7 @@ export default {
TimerUI,
},
setup() {
const end = new Date(2025, 0, 12, 23, 59, 59)
const end = new Date(2025, 0, 16, 13, 2, 59)
return {
end