Adds option for custom background image and footer
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<div id="dashy" data-theme="dark">
|
||||
<Header :pageInfo="getPageInfo(pageInfo)" />
|
||||
<router-view />
|
||||
<Footer v-if="showFooter" />
|
||||
<Footer v-if="showFooter" :text="getFooterText()" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -36,6 +36,12 @@ export default {
|
||||
}
|
||||
return defaults;
|
||||
},
|
||||
getFooterText() {
|
||||
if (this.pageInfo && this.pageInfo.footerText) {
|
||||
return this.pageInfo.footerText;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<footer>
|
||||
<!-- User Footer -->
|
||||
<footer v-if="text && text !== ''">{{text}}</footer>
|
||||
<!-- Default Footer -->
|
||||
<footer v-else>
|
||||
Developed by <a :href="authorUrl">{{authorName}}</a>.
|
||||
Licensed under <a :href="licenseUrl">{{license}}</a>
|
||||
{{ showCopyright? '©': '' }} {{date}}.
|
||||
@@ -18,6 +21,7 @@ export default {
|
||||
date: { type: String, default: `${new Date().getFullYear()}` },
|
||||
showCopyright: { type: Boolean, default: true },
|
||||
repoUrl: { type: String, default: 'https://github.com/lissy93/panel' },
|
||||
text: String,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -6,6 +6,7 @@ module.exports = {
|
||||
{ title: 'Home', path: '/' },
|
||||
{ title: 'Source', path: 'https://github.com/Lissy93/dashy' },
|
||||
],
|
||||
footerText: '',
|
||||
},
|
||||
appConfig: {},
|
||||
iconSize: 'medium',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<div class="home" :style="getBackgroundImage()">
|
||||
<!-- Search bar, layout options and settings -->
|
||||
<SettingsContainer ref="filterComp"
|
||||
@user-is-searchin="searching"
|
||||
@@ -164,6 +164,12 @@ export default {
|
||||
return itemsFound;
|
||||
}
|
||||
},
|
||||
getBackgroundImage() {
|
||||
if (this.appConfig && this.appConfig.backgroundImg) {
|
||||
return `background: url('${this.appConfig.backgroundImg}');background-size:cover;`;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initiateFontAwesome();
|
||||
|
||||
Reference in New Issue
Block a user