nosotras page
This commit is contained in:
@@ -6,16 +6,12 @@
|
||||
v-if="component"
|
||||
v-bind="component.props" />
|
||||
</template>
|
||||
<!-- <div class="fixed bottom-0 right-0 z-50 p-2">
|
||||
<ButtonCTA @click="changeLang" >
|
||||
Cambiar Idioma
|
||||
</ButtonCTA>
|
||||
</div> -->
|
||||
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapActions } from 'vuex';
|
||||
import { mapGetters } from 'vuex';
|
||||
import HeroHome from '~/components/HeroHome.vue';
|
||||
import WhatIs from '../../components/WhatIs.vue';
|
||||
import SectionWithCards from '../../components/SectionWithCards.vue';
|
||||
@@ -54,14 +50,6 @@ export default {
|
||||
},
|
||||
];
|
||||
}
|
||||
},
|
||||
// methods: {
|
||||
// ...mapActions(['setLangcode']),
|
||||
// changeLang() {
|
||||
// const newLang = this.langcode === 'es' ? 'cat' : 'es';
|
||||
// this.setLangcode(newLang);
|
||||
// this.$router.push({ path: `/${newLang}` });
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,16 +1,48 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Nosotras</h1>
|
||||
<p>Contenido sobre nosotras.</p>
|
||||
</div>
|
||||
<main v-if="consumoComponents" class="min-h-screen relative mx-8">
|
||||
<template v-for="(component, index) in consumoComponents" :key="`consumo-component-${component.component}-${index}`">
|
||||
<component
|
||||
:is="component.component"
|
||||
v-if="component"
|
||||
v-bind="component.props" />
|
||||
</template>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
import HeroPages from '~/components/HeroPages.vue';
|
||||
import TextWithImage from '../../components/TextWithImage.vue';
|
||||
import SectionWithCards from '../../components/SectionWithCards.vue';
|
||||
import TextWithIconAndButtons from '../../components/TextWithIconAndButtons.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
HeroPages,
|
||||
TextWithImage,
|
||||
TextWithIconAndButtons,
|
||||
SectionWithCards
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
consumoComponents: []
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
const langcode = this.$route.params.langcode;
|
||||
try {
|
||||
const res = await import(`~/data/${langcode}/nosotras.json`);
|
||||
this.consumoComponents = res.default;
|
||||
} catch (err) {
|
||||
console.error('Error al cargar contenido:', err);
|
||||
this.consumoComponents = [
|
||||
{
|
||||
component: 'ErrorComponent',
|
||||
props: {
|
||||
message: 'Contenido no disponible',
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user