|
@@ -1,13 +1,11 @@
|
|
|
<template>
|
|
|
<Layout>
|
|
|
-
|
|
|
<!-- Mise en page -->
|
|
|
<!-- introductions -->
|
|
|
<div v-for="edge in $page.introductions.edges.slice().reverse()" :key="`introductions${edge.node.id}`">
|
|
|
<VueMarkdown class="intro">{{edge.node.contenu}}
|
|
|
</VueMarkdown>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="blank-page no-folio fill-motif-cross-left" />
|
|
|
<!-- Auteurs, titre, sous-titre -->
|
|
|
<div class="column no-folio">
|
|
@@ -25,14 +23,11 @@
|
|
|
<div class="center">
|
|
|
<img src="/logo_popsu.png" alt="" style="width:2cm;">
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- Page de fond -->
|
|
|
<div class="column image-cover image-bleed" v-bind:style='{ backgroundImage: `url(https://popsu-rouen-en.strapi.figli.io/uploads/50424a6a43e44551a4faa699f8ef3caa.JPEG)`, }' />
|
|
|
-
|
|
|
<!-- Sommaire -->
|
|
|
-
|
|
|
<div class="column">
|
|
|
<div class="section-title">
|
|
|
Sommaire
|
|
@@ -47,42 +42,30 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="blank-page" />
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<!-- Chapitres -->
|
|
|
-
|
|
|
<div v-for="edge in $page.chapitres.edges.slice().reverse()" :key="`chapitre${edge.node.id}`">
|
|
|
<h2 :id="`chapitres${edge.node.id}`" class="chapter-title canbreak">{{edge.node.Titre}}</h2>
|
|
|
<VueMarkdown class="chapter-content justify">{{edge.node.Contenu}}
|
|
|
</VueMarkdown>
|
|
|
</div>
|
|
|
-
|
|
|
<!-- Page blanche -->
|
|
|
-
|
|
|
<div class="blank-page" />
|
|
|
-
|
|
|
-
|
|
|
<!-- Sections -->
|
|
|
-
|
|
|
-
|
|
|
<div v-for="edge in orderBy($page.sections.edges,'node.Ordre')">
|
|
|
<h2 :id="`chapitres${edge.node.id}`" class="section-title canbreak">{{edge.node.Titre}}</h2>
|
|
|
<VueMarkdown class="chapter-content justify">{{edge.node.Contenu}}
|
|
|
</VueMarkdown>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
</Layout>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
const axios = require('axios'),
|
|
|
path = require('path'),
|
|
|
param = require(`../../param.JSON`);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
import {
|
|
|
Previewer
|
|
|
} from 'pagedjs'
|
|
@@ -95,9 +78,10 @@ export default {
|
|
|
VueMarkdown
|
|
|
},
|
|
|
mounted() {
|
|
|
- // Ajouter
|
|
|
+
|
|
|
+ // Ajouter les citations
|
|
|
let citations = Array.from(document.querySelectorAll("blockquote"));
|
|
|
- citations.forEach((c,index)=>{
|
|
|
+ citations.forEach((c, index) => {
|
|
|
c.id = `citation-${index}`;
|
|
|
});
|
|
|
// Ajouter les images
|
|
@@ -115,13 +99,24 @@ export default {
|
|
|
let found = imgSource.find(element => element.id == img_id);
|
|
|
img.src = path.join(param.source, found.images.url);
|
|
|
img.id = `image-${img_id}`;
|
|
|
+ img.parentNode.classList.add("breakBefore");
|
|
|
let promise = new Promise((resolve, reject) => {
|
|
|
img.onload = function() {
|
|
|
let legend = document.createElement("p");
|
|
|
legend.classList.add("breakAfter");
|
|
|
legend.classList.add("legend");
|
|
|
legend.innerHTML = found.legende;
|
|
|
- img.parentNode.insertBefore(legend, img.nextSibling);
|
|
|
+ legend.id = `legend-${img_id}`;
|
|
|
+ if(found.double){
|
|
|
+ let clone = img.parentNode.cloneNode(true);
|
|
|
+ clone.classList.add("breakBefore");
|
|
|
+ clone.querySelector("img").id += "-end";
|
|
|
+ img.parentNode.insertBefore(clone, img.previousSibling);
|
|
|
+ clone.parentNode.insertBefore(legend, clone.nextSibling);
|
|
|
+
|
|
|
+ }else{
|
|
|
+ img.parentNode.insertBefore(legend, img.nextSibling);
|
|
|
+ }
|
|
|
resolve();
|
|
|
}
|
|
|
});
|
|
@@ -133,7 +128,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<page-query>
|