ajout partenaires et équipe
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div id="equipe">
|
||||
<div v-html="content.textIntro"></div>
|
||||
<div v-for="personne in content.personnes" class="personne">
|
||||
<figure>
|
||||
<img :src="personne.portrait_url" :alt="personne.portrait_alt">
|
||||
</figure>
|
||||
<div class="name"><p v-html="personne.prenom + ' ' + personne.nom"></p></div>
|
||||
<div class="description"><p v-html="personne.description"></p></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
content: Object,
|
||||
});
|
||||
</script>
|
||||
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
|
||||
<div v-if="contentType === 'etape' && (content.previous || content.next)" class="related-etape-links">
|
||||
<div v-if="content.previous" class="card previous" @click="clickRelatedElement(content.previous.url)">
|
||||
<div v-if="content.previous" class="card previous" @click="goToRelatedElement(content.previous.url)">
|
||||
<div class="icon">
|
||||
<div :style="{ backgroundColor: content.previous.couleur }"></div>
|
||||
<div :style="{ backgroundColor: content.previous.couleur }"></div>
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="content.next" class="card next" @click="clickRelatedElement(content.next.url)">
|
||||
<div v-if="content.next" class="card next" @click="goToRelatedElement(content.next.url)">
|
||||
<div class="icon">
|
||||
<div :style="{ backgroundColor: content.next.couleur }"></div>
|
||||
<div :style="{ backgroundColor: content.next.couleur }"></div>
|
||||
@@ -42,12 +42,16 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import router from '../../router/router.js';
|
||||
import { useContentStore } from '../../stores/content';
|
||||
import { pageChange } from '../../utils/handle-navigation.js';
|
||||
|
||||
const brandColor = "#80c8bf";
|
||||
|
||||
const store = useContentStore();
|
||||
const mapStore = useContentStore();
|
||||
const siteName = document.querySelector('#site_name').innerText;
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
contentType: String,
|
||||
content: Object,
|
||||
@@ -55,21 +59,10 @@ const props = defineProps({
|
||||
map: Object,
|
||||
});
|
||||
|
||||
async function displayRelatedElement(href) {
|
||||
const baseUrl = window.location.protocol + "//" + window.location.host;
|
||||
if (href.startsWith(baseUrl)) href = href.replace(baseUrl, '');
|
||||
|
||||
router.push(href);
|
||||
await store.fetchContentData(baseUrl + href);
|
||||
document.title = store.pageTitle;
|
||||
}
|
||||
|
||||
import { setActiveNavItem } from '../../utils/set-active-nav-item.js';
|
||||
|
||||
function clickRelatedElement(href) {
|
||||
async function goToRelatedElement(href) {
|
||||
const baseUrl = window.location.protocol + "//" + window.location.host;
|
||||
if (href.startsWith(baseUrl)) href = href.replace(baseUrl, '');
|
||||
setActiveNavItem('etape', href);
|
||||
displayRelatedElement(href);
|
||||
pageChange(href, store, siteName, mapStore, baseUrl)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="locality">
|
||||
<div class="top-triangle"></div>
|
||||
<div class="locality-title">
|
||||
<h1>{{content.contentTitle}} <em v-if="content.adresse">({{ content.adresse.postal_code.slice(0, 2) }})</em></h1>
|
||||
<h1>{{content.contentTitle}}<em v-if="content.adresse">({{ content.adresse.postal_code.slice(0, 2) }})</em></h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -27,4 +27,4 @@ const props = defineProps({
|
||||
content: Object,
|
||||
couleur: String,
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<div id="partenaires">
|
||||
<div v-for="partenaire in content.partenaires" class="partenaire">
|
||||
<figure>
|
||||
<img :src="partenaire.logo_url" :alt="partenaire.logo_alt">
|
||||
</figure>
|
||||
<div class="title"><p v-html="partenaire.title"></p></div>
|
||||
<div class="description"><p v-html="partenaire.description"></p></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
content: Object,
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user