Disable footer based on env variable
This commit is contained in:
parent
3660a282a3
commit
c590b373ab
|
|
@ -12,6 +12,7 @@ module.exports = {
|
||||||
VUE_APP_ENABLE_PORTFOLIO: process.env.ENABLE_PORTFOLIO || "true",
|
VUE_APP_ENABLE_PORTFOLIO: process.env.ENABLE_PORTFOLIO || "true",
|
||||||
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
VUE_APP_ENABLE_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
||||||
VUE_APP_JS_TITLE: JSON.stringify(process.env.VUE_APP_TITLE) || '"mySkillbox"',
|
VUE_APP_JS_TITLE: JSON.stringify(process.env.VUE_APP_TITLE) || '"mySkillbox"',
|
||||||
|
VUE_APP_ENABLE_FOOTER: process.env.ENABLE_FOOTER || "true",
|
||||||
/*
|
/*
|
||||||
* Vars used in HTML templates don't need to be stringyfied, as HTML does not need them to have quotes
|
* Vars used in HTML templates don't need to be stringyfied, as HTML does not need them to have quotes
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
const enableFooter = () => process.env.VUE_APP_ENABLE_FOOTER;
|
||||||
|
|
||||||
|
export default enableFooter;
|
||||||
|
|
@ -10,7 +10,9 @@
|
||||||
:key="$route.fullPath"
|
:key="$route.fullPath"
|
||||||
class="layout__content"
|
class="layout__content"
|
||||||
/>
|
/>
|
||||||
<default-footer class="layout__footer"/>
|
<default-footer
|
||||||
|
class="layout__footer"
|
||||||
|
v-if="enableFooter"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -20,6 +22,7 @@
|
||||||
import ProfileSidebar from '@/components/profile/ProfileSidebar';
|
import ProfileSidebar from '@/components/profile/ProfileSidebar';
|
||||||
import DefaultFooter from '@/layouts/DefaultFooter';
|
import DefaultFooter from '@/layouts/DefaultFooter';
|
||||||
import NavigationSidebar from '@/components/book-navigation/NavigationSidebar';
|
import NavigationSidebar from '@/components/book-navigation/NavigationSidebar';
|
||||||
|
import enableFooter from '@/helpers/footer';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -37,7 +40,8 @@
|
||||||
specialContainerClass() {
|
specialContainerClass() {
|
||||||
let cls = this.$store.state.specialContainerClass;
|
let cls = this.$store.state.specialContainerClass;
|
||||||
return [cls ? `layout--${cls}` : '', {'skillbox--show-filter': this.showFilter}];
|
return [cls ? `layout--${cls}` : '', {'skillbox--show-filter': this.showFilter}];
|
||||||
}
|
},
|
||||||
|
enableFooter: enableFooter
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,25 @@
|
||||||
<logo/>
|
<logo/>
|
||||||
</div>
|
</div>
|
||||||
<router-view class="public__content layout__content"/>
|
<router-view class="public__content layout__content"/>
|
||||||
<default-footer class="skillbox__footer public__footer footer"/>
|
<default-footer
|
||||||
|
class="skillbox__footer public__footer footer"
|
||||||
|
v-if="enableFooter"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import Logo from '@/components/icons/Logo';
|
import Logo from '@/components/icons/Logo';
|
||||||
import DefaultFooter from '@/layouts/DefaultFooter';
|
import DefaultFooter from '@/layouts/DefaultFooter';
|
||||||
|
import enableFooter from '@/helpers/footer';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Logo,
|
Logo,
|
||||||
DefaultFooter
|
DefaultFooter
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
enableFooter: enableFooter
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,16 @@
|
||||||
<cross class="close-button__icon"/>
|
<cross class="close-button__icon"/>
|
||||||
</div>
|
</div>
|
||||||
<router-view/>
|
<router-view/>
|
||||||
<simple-footer class="layout__footer"/>
|
<simple-footer
|
||||||
|
class="layout__footer"
|
||||||
|
v-if="enableFooter"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Cross from '@/components/icons/Cross';
|
import Cross from '@/components/icons/Cross';
|
||||||
import SimpleFooter from '@/layouts/SimpleFooter';
|
import SimpleFooter from '@/layouts/SimpleFooter';
|
||||||
|
import enableFooter from '@/helpers/footer';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -20,6 +23,10 @@
|
||||||
SimpleFooter
|
SimpleFooter
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
enableFooter: enableFooter,
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
back() {
|
back() {
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue