Modify hello page based on app flavor

This commit is contained in:
Ramon Wenger 2022-05-18 15:44:36 +02:00
parent a7f516d8ba
commit ce506bf471
4 changed files with 370 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,7 @@ const defaultFlavorValues = {
showObjectivesTitle: true,
showInstrumentFilterSidebar: true,
showPortfolio: true,
showEHB: true,
};
let flavorValues = Object.assign({}, defaultFlavorValues);
@ -39,6 +40,7 @@ if (process.env.VUE_APP_FLAVOR === 'my-kv') {
showObjectivesTitle: false,
showInstrumentFilterSidebar: false,
showPortfolio: true,
showEHB: false,
});
}

View File

@ -10,17 +10,20 @@
</template>
<script>
import flavorValues from '@/helpers/app-flavor';
const ContentsIllustration = () => import(/* webpackChunkName: "illustrations" */'@/components/illustrations/ContentsIllustration');
const PortfolioIllustration = () => import(/* webpackChunkName: "illustrations" */'@/components/illustrations/PortfolioIllustration');
const RoomsIllustration = () => import(/* webpackChunkName: "illustrations" */'@/components/illustrations/RoomsIllustration');
const HelloIllustration = () => import(/* webpackChunkName: "illustrations" */'@/components/illustrations/HelloIllustration');
const HelloMyKVIllustration = () => import(/* webpackChunkName: "illustrations" */'@/components/illustrations/HelloMyKVIllustration');
const Hello = flavorValues.appFlavor === 'my-kv' ? HelloMyKVIllustration : HelloIllustration;
export default {
components: {
contents: ContentsIllustration,
portfolio: PortfolioIllustration,
rooms: RoomsIllustration,
hello: HelloIllustration
hello: Hello
},
computed: {

View File

@ -14,13 +14,19 @@
<a
href="https://www.ehb.swiss/"
target="_blank"
v-if="$flavor.showEHB"
>
<ehb-logo class="logos__logo" />
</a>
</div>
<p class="about__text">
{{ $flavor.textAppName }} ist ein Angebot des hep Verlags in
Zusammenarbeit mit der Eidgenössischen Hochschule für Berufsbildung (EHB).
<template v-if="$flavor.showEHB">
{{ $flavor.textAppName }} ist ein Angebot des hep Verlags in
Zusammenarbeit mit der Eidgenössischen Hochschule für Berufsbildung (EHB).
</template>
<template v-else>
{{ $flavor.textAppName }} ist ein Angebot des hep Verlags.
</template>
</p>
</div>
<logo class="logo" />