🩹 Fixed stickey footer, Chris Coyier to the rescue
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- User Footer -->
|
||||
<footer v-if="text && text !== ''" v-html="text" :class="!scrollVisible ? 'fixed' : ''"></footer>
|
||||
<footer v-if="text && text !== ''" v-html="text"></footer>
|
||||
<!-- Default Footer -->
|
||||
<footer v-else :class="!scrollVisible ? 'fixed' : ''">
|
||||
Developed by <a :href="authorUrl">{{authorName}}</a>.
|
||||
@@ -23,16 +23,11 @@ export default {
|
||||
showCopyright: { type: Boolean, default: true },
|
||||
repoUrl: { type: String, default: 'https://github.com/lissy93/dashy' },
|
||||
},
|
||||
data: () => ({
|
||||
scrollVisible: false,
|
||||
}),
|
||||
mounted() {
|
||||
this.scrollVisible = document.body.clientHeight > window.innerHeight;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/styles/media-queries.scss';
|
||||
|
||||
footer {
|
||||
width: calc(100% - 0.5rem);
|
||||
@@ -44,7 +39,9 @@ footer {
|
||||
background: var(--background-darker);
|
||||
margin-top: 1.5rem;
|
||||
border-top: 1px solid var(--outline-color);
|
||||
&.fixed { position: fixed; }
|
||||
@include tablet-down {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
footer a{
|
||||
|
||||
Reference in New Issue
Block a user