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_SPELLCHECK: !!process.env.TASKBASE_BASEURL,
|
||||
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
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
const enableFooter = () => process.env.VUE_APP_ENABLE_FOOTER;
|
||||
|
||||
export default enableFooter;
|
||||
|
|
@ -10,7 +10,9 @@
|
|||
:key="$route.fullPath"
|
||||
class="layout__content"
|
||||
/>
|
||||
<default-footer class="layout__footer"/>
|
||||
<default-footer
|
||||
class="layout__footer"
|
||||
v-if="enableFooter"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -20,6 +22,7 @@
|
|||
import ProfileSidebar from '@/components/profile/ProfileSidebar';
|
||||
import DefaultFooter from '@/layouts/DefaultFooter';
|
||||
import NavigationSidebar from '@/components/book-navigation/NavigationSidebar';
|
||||
import enableFooter from '@/helpers/footer';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -37,7 +40,8 @@
|
|||
specialContainerClass() {
|
||||
let cls = this.$store.state.specialContainerClass;
|
||||
return [cls ? `layout--${cls}` : '', {'skillbox--show-filter': this.showFilter}];
|
||||
}
|
||||
},
|
||||
enableFooter: enableFooter
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -4,19 +4,25 @@
|
|||
<logo/>
|
||||
</div>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import Logo from '@/components/icons/Logo';
|
||||
import DefaultFooter from '@/layouts/DefaultFooter';
|
||||
import enableFooter from '@/helpers/footer';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Logo,
|
||||
DefaultFooter
|
||||
},
|
||||
|
||||
computed: {
|
||||
enableFooter: enableFooter
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,16 @@
|
|||
<cross class="close-button__icon"/>
|
||||
</div>
|
||||
<router-view/>
|
||||
<simple-footer class="layout__footer"/>
|
||||
<simple-footer
|
||||
class="layout__footer"
|
||||
v-if="enableFooter"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cross from '@/components/icons/Cross';
|
||||
import SimpleFooter from '@/layouts/SimpleFooter';
|
||||
import enableFooter from '@/helpers/footer';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -20,6 +23,10 @@
|
|||
SimpleFooter
|
||||
},
|
||||
|
||||
computed: {
|
||||
enableFooter: enableFooter,
|
||||
},
|
||||
|
||||
methods: {
|
||||
back() {
|
||||
this.$router.go(-1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue