Ajout des rubriques

This commit is contained in:
2019-07-19 12:21:34 +02:00
parent 17df658953
commit d4c2d0a690
7 changed files with 12 additions and 9 deletions
-1
View File
@@ -89,5 +89,4 @@ git push
## Todo ## Todo
- Traits de coupes - Traits de coupes
- Introduction / conclusion (possiblité de rubrique)
- Pages citations - Pages citations
+1
View File
@@ -16,6 +16,7 @@ module.exports = function (api) {
id: item.id, id: item.id,
titre: item.titre, titre: item.titre,
contenu: item.contenu, contenu: item.contenu,
rubrique: item.rubrique,
}) })
} }
let data_sections = await axios.get('https://popsu.strapi.figli.io/sections') let data_sections = await axios.get('https://popsu.strapi.figli.io/sections')
+1 -1
View File
@@ -1 +1 @@
export default 1563530197593 export default 1563531149355
+3
View File
@@ -11,6 +11,9 @@
.center{ .center{
text-align: center; text-align: center;
} }
.align-right{
text-align: right;
}
// Notes de fin de chapitres // Notes de fin de chapitres
[data-note] { [data-note] {
position: relative; position: relative;
+5
View File
@@ -66,6 +66,11 @@
font-size: 10pt; font-size: 10pt;
letter-spacing: 4pt; letter-spacing: 4pt;
} }
.chapter-title::before{
content: attr(data-rubrique);
display: block;
@extend .section-title;
}
.chapter-content { .chapter-content {
hyphens: auto; hyphens: auto;
font-family: "Cormorant"; font-family: "Cormorant";
+2 -2
View File
@@ -43,7 +43,7 @@
<div class="blank-page no-folio"></div> <div class="blank-page no-folio"></div>
<!-- Chapitres --> <!-- Chapitres -->
<div class="hyphen" v-for="(edge,index) in $page.chapters.edges.slice().reverse()" :key="'chapter'+edge.node.id"> <div class="hyphen" v-for="(edge,index) in $page.chapters.edges.slice().reverse()" :key="'chapter'+edge.node.id">
<h2 v-bind:id="'chapter'+edge.node.id" class="chapter-title" v-bind:class="{ canbreak: isNotFirst(index) }" >{{ edge.node.titre }}</h2> <h2 v-bind:data-rubrique="edge.node.rubrique" v-bind:id="'chapter'+edge.node.id" class="chapter-title" v-bind:class="{ canbreak: isNotFirst(index) }" >{{ edge.node.titre }}</h2>
<VueMarkdown lang="fr" class="chapter-content justify">{{edge.node.contenu}}</VueMarkdown> <VueMarkdown lang="fr" class="chapter-content justify">{{edge.node.contenu}}</VueMarkdown>
</div> </div>
<!-- Notes de fin de document --> <!-- Notes de fin de document -->
@@ -74,7 +74,7 @@
<page-query> <page-query>
{ {
chapters : allchapitres{ chapters : allchapitres{
edges{node{id,titre,contenu}} edges{node{id,titre,contenu,rubrique}}
} }
sections : allsections{ sections : allsections{
edges{node{id,titre,contenu}} edges{node{id,titre,contenu}}
-5
View File
@@ -1,5 +0,0 @@
Pages are usually used for normal pages or for listing items from a GraphQL collection.
Add .vue files here to create pages. For example **About.vue** will be **site.com/about**.
Learn more about pages: https://gridsome.org/docs/pages
You can delete this file.