Browse Source

Ajout des sections

Tibo 4 years ago
parent
commit
8b639c79a4
4 changed files with 39 additions and 3 deletions
  1. 0 1
      gridsome.server.js
  2. 2 1
      param.JSON
  3. 4 0
      src/css/layout.scss
  4. 33 1
      src/pages/Index.vue

+ 0 - 1
gridsome.server.js

@@ -8,7 +8,6 @@ module.exports = function(api) {
       actions.addMetadata(d, param.meta[d])
     }
     if (!param.search) throw "Nothing to search for";
-    // Ajout des recherches
     let search = param.search.map(s => {
       return axios.get(`${param.source}${s}`);
     });

+ 2 - 1
param.JSON

@@ -1,6 +1,6 @@
 {
   "meta": {
-    "title": "The performative metropolis?",
+    "title": "the performative metropolis?",
     "subtitle": "NARRATIVES AND SCALES IN THE METROPOLITAN INSTITUTIONAL PRODUCTION OF ROUEN",
     "authors": [
       "Jean Debrie",
@@ -9,6 +9,7 @@
   },
   "source": "https://popsu-rouen-en.strapi.figli.io/",
   "search": [
+    "images",
     "introductions",
     "chapitres",
     "sections"

+ 4 - 0
src/css/layout.scss

@@ -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
src/pages/Index.vue

@@ -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 {