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
- Traits de coupes
- Introduction / conclusion (possiblité de rubrique)
- Pages citations
+1
View File
@@ -16,6 +16,7 @@ module.exports = function (api) {
id: item.id,
titre: item.titre,
contenu: item.contenu,
rubrique: item.rubrique,
})
}
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{
text-align: center;
}
.align-right{
text-align: right;
}
// Notes de fin de chapitres
[data-note] {
position: relative;
+5
View File
@@ -66,6 +66,11 @@
font-size: 10pt;
letter-spacing: 4pt;
}
.chapter-title::before{
content: attr(data-rubrique);
display: block;
@extend .section-title;
}
.chapter-content {
hyphens: auto;
font-family: "Cormorant";
+2 -2
View File
@@ -43,7 +43,7 @@
<div class="blank-page no-folio"></div>
<!-- Chapitres -->
<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>
</div>
<!-- Notes de fin de document -->
@@ -74,7 +74,7 @@
<page-query>
{
chapters : allchapitres{
edges{node{id,titre,contenu}}
edges{node{id,titre,contenu,rubrique}}
}
sections : allsections{
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.