Message component (mainly styling)
This commit is contained in:
parent
5a77231282
commit
2db0cb58f0
3 changed files with 61 additions and 10 deletions
|
@ -14,7 +14,7 @@
|
||||||
:contain="image_contain"
|
:contain="image_contain"
|
||||||
:urls="image_urls"
|
:urls="image_urls"
|
||||||
/>
|
/>
|
||||||
<div v-html="message_html" />
|
<Message :html="message_html" />
|
||||||
</template>
|
</template>
|
||||||
<template slot="calendars">
|
<template slot="calendars">
|
||||||
<CalendarCarousel :speed="calendar_speed" :data="calendar_data" />
|
<CalendarCarousel :speed="calendar_speed" :data="calendar_data" />
|
||||||
|
@ -37,20 +37,23 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Vue } from "vue-property-decorator";
|
import { Component, Vue } from "vue-property-decorator";
|
||||||
import CalendarCarousel from "./components/calendar/CalendarCarousel.vue";
|
|
||||||
import Dashboard from "./components/Dashboard.vue";
|
|
||||||
import DashboardInfo from "./components/DashboardInfo.vue";
|
|
||||||
import ImageCarousel from "./components/ImageCarousel.vue";
|
|
||||||
import TitleBar from "./components/title/TitleBar.vue";
|
import TitleBar from "./components/title/TitleBar.vue";
|
||||||
|
import Dashboard from "./components/Dashboard.vue";
|
||||||
|
import ImageCarousel from "./components/ImageCarousel.vue";
|
||||||
|
import Message from "./components/Message.vue";
|
||||||
|
import CalendarCarousel from "./components/calendar/CalendarCarousel.vue";
|
||||||
|
import DashboardInfo from "./components/DashboardInfo.vue";
|
||||||
import TickerBar from "./components/TickerBar.vue";
|
import TickerBar from "./components/TickerBar.vue";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
CalendarCarousel,
|
|
||||||
Dashboard,
|
|
||||||
DashboardInfo,
|
|
||||||
ImageCarousel,
|
|
||||||
TitleBar,
|
TitleBar,
|
||||||
|
Dashboard,
|
||||||
|
ImageCarousel,
|
||||||
|
Message,
|
||||||
|
CalendarCarousel,
|
||||||
|
DashboardInfo,
|
||||||
TickerBar,
|
TickerBar,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -63,7 +66,7 @@ export default class App extends Vue {
|
||||||
private image_height = 300;
|
private image_height = 300;
|
||||||
private image_contain = false;
|
private image_contain = false;
|
||||||
private image_speed = 10000;
|
private image_speed = 10000;
|
||||||
private message_html = "<p>changeme</p>";
|
private message_html = require("@/assets/lipsum.json");
|
||||||
|
|
||||||
private calendar_data = require("@/assets/calendar_testdata.json");
|
private calendar_data = require("@/assets/calendar_testdata.json");
|
||||||
private calendar_speed = 10000;
|
private calendar_speed = 10000;
|
||||||
|
|
1
ui/src/assets/lipsum.json
Normal file
1
ui/src/assets/lipsum.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
"<h1>Lorem ipsum dolor sit amet</h1>\n<h2>Consectetuer adipiscing elit</h2>\n<ul>\n<li>In enim justo, rhoncus ut</li>\n<li>imperdiet a, venenatis vitae, justo</li>\n<li>Nullam dictum felis eu pede mollis pretium</li>\n</ul>\n<p>Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. </p>\n<ol>\n<li>Integer tincidunt</li>\n<li>Cras dapibus</li>\n<li>Vivamus elementum semper nisi</li>\n</ol>"
|
47
ui/src/components/Message.vue
Normal file
47
ui/src/components/Message.vue
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
<template>
|
||||||
|
<div v-html="html" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class Message extends Vue {
|
||||||
|
@Prop({ required: true })
|
||||||
|
private readonly html!: string;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
div:deep() {
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6,
|
||||||
|
ul,
|
||||||
|
ol {
|
||||||
|
font-family: "Neue Praxis", sans-serif !important;
|
||||||
|
margin-bottom: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-align: justify;
|
||||||
|
hyphens: auto;
|
||||||
|
margin-bottom: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3 {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in a new issue