mirror of https://github.com/Lissy93/dashy.git
✨ Hide Header and Footer on minimal and login view
This commit is contained in:
parent
64ef03036e
commit
e7105bc9b9
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- User Footer -->
|
<!-- User Footer -->
|
||||||
<footer v-if="text && text !== ''" v-html="text"></footer>
|
<footer v-if="text && text !== '' && visible" v-html="text"></footer>
|
||||||
<!-- Default Footer -->
|
<!-- Default Footer -->
|
||||||
<footer v-else>
|
<footer v-else-if="visible">
|
||||||
Developed by <a :href="authorUrl">{{authorName}}</a>.
|
Developed by <a :href="authorUrl">{{authorName}}</a>.
|
||||||
Licensed under <a :href="licenseUrl">{{license}}</a>
|
Licensed under <a :href="licenseUrl">{{license}}</a>
|
||||||
{{ showCopyright? '©': '' }} {{date}}.
|
{{ showCopyright? '©': '' }} {{date}}.
|
||||||
|
@ -11,6 +11,9 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import { shouldBeVisible } from '@/utils/MiscHelpers';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Footer',
|
name: 'Footer',
|
||||||
props: {
|
props: {
|
||||||
|
@ -23,6 +26,11 @@ export default {
|
||||||
showCopyright: { type: Boolean, default: true },
|
showCopyright: { type: Boolean, default: true },
|
||||||
repoUrl: { type: String, default: 'https://github.com/lissy93/dashy' },
|
repoUrl: { type: String, default: 'https://github.com/lissy93/dashy' },
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
visible() {
|
||||||
|
return shouldBeVisible(this.$route.name);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<header>
|
<header v-if="visible">
|
||||||
<PageTitle
|
<PageTitle
|
||||||
v-if="titleVisible"
|
v-if="titleVisible"
|
||||||
:title="pageInfo.title"
|
:title="pageInfo.title"
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
import PageTitle from '@/components/PageStrcture/PageTitle.vue';
|
import PageTitle from '@/components/PageStrcture/PageTitle.vue';
|
||||||
import Nav from '@/components/PageStrcture/Nav.vue';
|
import Nav from '@/components/PageStrcture/Nav.vue';
|
||||||
import { visibleComponents as defaultVisibleComponents } from '@/utils/defaults';
|
import { visibleComponents as defaultVisibleComponents } from '@/utils/defaults';
|
||||||
|
import { shouldBeVisible } from '@/utils/MiscHelpers';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
|
@ -31,6 +32,11 @@ export default {
|
||||||
navVisible: (this.visibleComponents || defaultVisibleComponents).navigation,
|
navVisible: (this.visibleComponents || defaultVisibleComponents).navigation,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
visible() {
|
||||||
|
return shouldBeVisible(this.$route.name);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue