Подверстал расписание стримов под разные экраны
Some checks failed
Gitea Actions / Build and deploy (push) Has been cancelled
Some checks failed
Gitea Actions / Build and deploy (push) Has been cancelled
This commit is contained in:
parent
bc7509423d
commit
38eef7ef01
|
@ -1,10 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<v-sheet class="mt-5 mb-5 rounded-lg w-75">
|
<v-sheet class="mt-5 mb-5 rounded-lg w-75">
|
||||||
<p class="text-h3 ma-5">Расписание стримов</p>
|
<p class="text-xl-h3 text-lg-h3 text-md-h4 text-sm-h4 text-h5 ma-5">Расписание стримов</p>
|
||||||
<v-skeleton-loader v-if="fetching" type="text" />
|
<v-skeleton-loader v-if="fetching" type="text" />
|
||||||
<p v-else class="ma-5 text-h4"> {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}</p>
|
<p v-else class="ma-5 text-xl-h3 text-lg-h3 text-md-h4 text-sm-h4 text-h5"> {{ parseDate(dates[0].current_date) }} - {{ parseDate(dates[1].current_date) }}</p>
|
||||||
<ScheduleTable/>
|
<ScheduleTable/>
|
||||||
<p class="text-h3 ma-5">Ссылочки</p>
|
<p class="text-xl-h3 text-lg-h3 text-md-h4 text-sm-h4 text-h5 ma-5">Ссылочки</p>
|
||||||
<Links/>
|
<Links/>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
name: "Links",
|
name: "Links",
|
||||||
data: () => ({
|
data: () => ({
|
||||||
links: [],
|
links: [],
|
||||||
fetching: true
|
fetching: true,
|
||||||
|
windowHeight: document.documentElement.clientHeight,
|
||||||
|
windowWidth: document.documentElement.clientWidth,
|
||||||
|
isWide: window.innerWidth >= 460
|
||||||
}),
|
}),
|
||||||
mounted() {
|
mounted() {
|
||||||
axios
|
axios
|
||||||
|
@ -14,13 +17,25 @@
|
||||||
this.links = response.data;
|
this.links = response.data;
|
||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
});
|
});
|
||||||
|
this.myEventHandler();
|
||||||
|
window.addEventListener("resize", this.myEventHandler, { passive: true });
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
window.addEventListener("resize", this.myEventHandler);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
myEventHandler(e) {
|
||||||
|
this.windowHeight = document.documentElement.clientHeight;
|
||||||
|
this.windowWidth = document.documentElement.clientWidth;
|
||||||
|
this.isWide = this.windowWidth >= 460;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="w-100 d-flex justify-center">
|
<div class="w-100 d-flex justify-center">
|
||||||
<v-list class="w-66">
|
<v-list :class="isWide ? 'w-66' : 'w-100'">
|
||||||
<v-skeleton-loader v-if="fetching" type="list-item"/>
|
<v-skeleton-loader v-if="fetching" type="list-item"/>
|
||||||
<v-list-item v-else class="ma-5 bg-gradient-noh" elevation="6" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" -->
|
<v-list-item v-else class="ma-5 bg-gradient-noh" elevation="6" v-for="link in links" :href="link.link"> <!-- style="background-color: #E57373; color: #FFFFFF" -->
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="w-100 d-flex justify-center">
|
<div class="w-100 d-flex justify-center">
|
||||||
<v-skeleton-loader v-if="fetching" type="table"/>
|
<v-skeleton-loader v-if="fetching" type="table"/>
|
||||||
<v-table v-else class="text-h5 w-66">
|
<v-table v-else class="text-xl-h5 text-lg-h5 text-md-h5 text-sm-h5 text-body-2 w-66">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="schedule in schedules">
|
<tr v-for="schedule in schedules">
|
||||||
<td>{{ parseDate(schedule.current_date) }} {{ schedule.weekday_name }} {{ schedule.stream_time }}</td>
|
<td>{{ parseDate(schedule.current_date) }} {{ schedule.weekday_name }} {{ schedule.stream_time }}</td>
|
||||||
|
|
Loading…
Reference in New Issue