dashy/src/App.vue

56 lines
1.1 KiB
Vue
Raw Normal View History

2019-07-19 16:07:26 +02:00
<template>
<div id="dashy" data-theme="dark">
<Header :pageInfo="getPageInfo(pageInfo)" />
<router-view />
2019-07-20 22:50:29 +02:00
<Footer />
2019-07-19 16:07:26 +02:00
</div>
</template>
2019-07-20 22:50:29 +02:00
<script>
2021-04-13 13:36:31 +02:00
import Header from '@/components/PageStrcture/Header.vue';
import Footer from '@/components/PageStrcture/Footer.vue';
import conf from '@/data/conf.yml';
2019-07-20 22:50:29 +02:00
export default {
name: 'app',
components: {
Header,
2019-09-01 14:38:13 +02:00
Footer,
},
data: () => ({
pageInfo: conf.pageInfo,
}),
methods: {
/* Returns either page info from the config, or default values */
getPageInfo(pageInfo) {
const defaults = { title: 'Demo', description: '' };
if (pageInfo) {
return {
title: pageInfo.title || defaults.title,
description: pageInfo.description || defaults.description,
};
}
return defaults;
},
},
2019-09-01 14:38:13 +02:00
};
2019-07-20 22:50:29 +02:00
</script>
2019-07-19 16:07:26 +02:00
<style lang="scss">
@import '../src/styles/global-styles.scss';
@import '../src/styles/color-palette.scss';
2019-07-20 22:50:29 +02:00
body {
background: var(--background);
margin: 0;
padding: 0;
}
2019-07-19 16:07:26 +02:00
#app {
2019-07-20 22:50:29 +02:00
.footer {
text-align: center;
2019-07-19 16:07:26 +02:00
}
}
2019-07-20 22:50:29 +02:00
2019-07-19 16:07:26 +02:00
</style>