Ajout des sections

This commit is contained in:
Tibo
2019-12-23 14:38:00 +01:00
parent 577bf8a803
commit 8b639c79a4
4 changed files with 39 additions and 3 deletions
+4
View File
@@ -11,6 +11,10 @@
.no-folio {
page: nofolio;
page-break-before: avoid !important;
page-break-inside: avoid !important;
page-break-after: avoid !important;
}
.blank-page {
+33 -1
View File
@@ -60,7 +60,9 @@
</div>
</div>
<div v-for="edge in $page.chapitres.edges.slice().reverse()" :key="`chapitres${edge.node.id}`">
<!-- 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"
@@ -71,6 +73,26 @@
</VueMarkdown>
</div>
<!-- Page blanche -->
<div class="blank-page no-folio" />
<!-- Sections -->
<div v-for="edge in $page.sections.edges.slice().reverse()" :key="`section${edge.node.id}`">
<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>
@@ -93,6 +115,16 @@ export default {
<page-query>
query {
sections: allSections {
edges {
node {
id
Titre
Contenu
}
}
}
chapitres: allChapitres {
edges {
node {