🚚 Neaten footer code

This commit is contained in:
Alicia Sykes 2022-07-24 14:43:40 +01:00
parent d25de1147c
commit b0c52b53c9
1 changed files with 25 additions and 19 deletions

View File

@ -1,16 +1,17 @@
<template> <template>
<!-- User Footer --> <footer v-if="visible">
<footer v-if="text && text !== '' && visible" v-html="text"></footer> <!-- User-defined footer -->
<!-- Default Footer --> <span v-if="text" v-html="text"></span>
<footer v-else-if="visible"> <!-- Default footer -->
<span v-if="$store.state.currentConfigInfo" class="path-to-config"> <span v-else>
Using: {{ $store.state.currentConfigInfo.confPath }} Developed by <a :href="defaultInfo.authorUrl">{{defaultInfo.authorName}}</a>.
Licensed under <a :href="defaultInfo.licenseUrl">{{defaultInfo.license}}</a>
© {{defaultInfo.date}}.
Get the <a :href="defaultInfo.repoUrl">Source Code</a>.
</span> </span>
<span> <!-- Config info -->
Developed by <a :href="authorUrl">{{authorName}}</a>. <span class="path-to-config">
Licensed under <a :href="licenseUrl">{{license}}</a> Using: {{ $store.state.currentConfigId || 'Default Config' }}
{{ showCopyright? '©': '' }} {{date}}.
Get the <a :href="repoUrl">Source Code</a>.
</span> </span>
</footer> </footer>
</template> </template>
@ -23,13 +24,18 @@ export default {
name: 'Footer', name: 'Footer',
props: { props: {
text: String, text: String,
authorName: { type: String, default: 'Alicia Sykes' }, },
authorUrl: { type: String, default: 'https://aliciasykes.com' }, data() {
license: { type: String, default: 'MIT' }, return {
licenseUrl: { type: String, default: 'https://gist.github.com/Lissy93/143d2ee01ccc5c052a17' }, defaultInfo: {
date: { type: String, default: `${new Date().getFullYear()}` }, authorName: 'Alicia Sykes',
showCopyright: { type: Boolean, default: true }, authorUrl: 'https://github.com/lissy93',
repoUrl: { type: String, default: 'https://github.com/lissy93/dashy' }, license: 'MIT',
licenseUrl: 'https://gist.github.com/Lissy93/143d2ee01ccc5c052a17',
date: `${new Date().getFullYear()}`,
repoUrl: 'https://github.com/lissy93/dashy',
},
};
}, },
computed: { computed: {
visible() { visible() {
@ -56,7 +62,7 @@ footer {
display: none; display: none;
} }
span.path-to-config { span.path-to-config {
float: right; float: left;
font-size: 0.75rem; font-size: 0.75rem;
margin: 0.1rem 0.5rem 0 0; margin: 0.1rem 0.5rem 0 0;
opacity: var(--dimming-factor); opacity: var(--dimming-factor);