ImageCarousel component and necessary Layout tweaks
This commit is contained in:
parent
52cffae464
commit
7330f85398
3 changed files with 69 additions and 19 deletions
|
@ -6,7 +6,12 @@
|
||||||
:logo_below="logo_below"
|
:logo_below="logo_below"
|
||||||
:title="title_html"
|
:title="title_html"
|
||||||
/>
|
/>
|
||||||
<Dashboard :message="message_html">
|
<Dashboard>
|
||||||
|
<template slot="message">
|
||||||
|
<ImageCarousel :image_urls="image_urls" />
|
||||||
|
<div v-html="message_html" />
|
||||||
|
</template>
|
||||||
|
<template slot="calendars">
|
||||||
<CalendarCarousel :data="calendar_data" />
|
<CalendarCarousel :data="calendar_data" />
|
||||||
<DashboardInfo
|
<DashboardInfo
|
||||||
:server_host="server_host"
|
:server_host="server_host"
|
||||||
|
@ -14,6 +19,7 @@
|
||||||
:version="dashboard_version"
|
:version="dashboard_version"
|
||||||
:lan_ip="dashboard_ip"
|
:lan_ip="dashboard_ip"
|
||||||
/>
|
/>
|
||||||
|
</template>
|
||||||
</Dashboard>
|
</Dashboard>
|
||||||
<TickerBar
|
<TickerBar
|
||||||
v-if="ticker_html !== ''"
|
v-if="ticker_html !== ''"
|
||||||
|
@ -29,6 +35,7 @@ import { Component, Vue } from "vue-property-decorator";
|
||||||
import CalendarCarousel from "./components/calendar/CalendarCarousel.vue";
|
import CalendarCarousel from "./components/calendar/CalendarCarousel.vue";
|
||||||
import Dashboard from "./components/Dashboard.vue";
|
import Dashboard from "./components/Dashboard.vue";
|
||||||
import DashboardInfo from "./components/DashboardInfo.vue";
|
import DashboardInfo from "./components/DashboardInfo.vue";
|
||||||
|
import ImageCarousel from "./components/ImageCarousel.vue";
|
||||||
import TitleBar from "./components/title_bar/TitleBar.vue";
|
import TitleBar from "./components/title_bar/TitleBar.vue";
|
||||||
import TickerBar from "./components/TickerBar.vue";
|
import TickerBar from "./components/TickerBar.vue";
|
||||||
|
|
||||||
|
@ -37,6 +44,7 @@ import TickerBar from "./components/TickerBar.vue";
|
||||||
CalendarCarousel,
|
CalendarCarousel,
|
||||||
Dashboard,
|
Dashboard,
|
||||||
DashboardInfo,
|
DashboardInfo,
|
||||||
|
ImageCarousel,
|
||||||
TitleBar,
|
TitleBar,
|
||||||
TickerBar,
|
TickerBar,
|
||||||
},
|
},
|
||||||
|
@ -51,6 +59,12 @@ export default class App extends Vue {
|
||||||
private server_name = "OEKZident";
|
private server_name = "OEKZident";
|
||||||
private dashboard_version = "0.0.1";
|
private dashboard_version = "0.0.1";
|
||||||
private dashboard_ip = "0.0.0.0";
|
private dashboard_ip = "0.0.0.0";
|
||||||
|
private image_urls = [
|
||||||
|
"https://cdn.vuetifyjs.com/images/carousel/squirrel.jpg",
|
||||||
|
"https://cdn.vuetifyjs.com/images/carousel/sky.jpg",
|
||||||
|
"https://cdn.vuetifyjs.com/images/carousel/bird.jpg",
|
||||||
|
"https://cdn.vuetifyjs.com/images/carousel/planet.jpg",
|
||||||
|
];
|
||||||
private calendar_data = [
|
private calendar_data = [
|
||||||
{
|
{
|
||||||
title: "Lorem Ipsum",
|
title: "Lorem Ipsum",
|
||||||
|
|
|
@ -1,24 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<v-container fill-height>
|
<v-container fill-height>
|
||||||
<v-layout>
|
<v-layout>
|
||||||
<v-row>
|
<v-col cols="4">
|
||||||
<v-col cols="4" v-html="message" />
|
<slot name="message">MESSAGE</slot>
|
||||||
<v-col cols="8">
|
</v-col>
|
||||||
<slot>CALENDARS</slot>
|
<v-col cols="8">
|
||||||
|
<slot name="calendars">CALENDARS</slot>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-container>
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "vue-property-decorator";
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default class Dashboard extends Vue {
|
export default class Dashboard extends Vue {}
|
||||||
@Prop({ default: "MESSAGE" })
|
|
||||||
private readonly message!: string;
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
39
ui/src/components/ImageCarousel.vue
Normal file
39
ui/src/components/ImageCarousel.vue
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
<template>
|
||||||
|
<v-carousel
|
||||||
|
cycle
|
||||||
|
:interval="speed"
|
||||||
|
height="300"
|
||||||
|
:show-arrows="false"
|
||||||
|
touchless
|
||||||
|
hide-delimiters
|
||||||
|
>
|
||||||
|
<v-carousel-item v-for="url in image_urls" :key="url" :src="url" />
|
||||||
|
</v-carousel>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class ImageCarousel extends Vue {
|
||||||
|
@Prop({ default: 10000 })
|
||||||
|
private readonly speed!: number;
|
||||||
|
|
||||||
|
@Prop({ required: true })
|
||||||
|
private readonly image_urls!: Array<string>;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.v-window {
|
||||||
|
&-x-transition,
|
||||||
|
&-x-reverse-transition,
|
||||||
|
&-y-transition,
|
||||||
|
&-y-reverse-transition {
|
||||||
|
&-enter-active,
|
||||||
|
&-leave-active {
|
||||||
|
transition: 1.5s cubic-bezier(0.25, 0.8, 0.5, 1) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in a new issue