Quellcode durchsuchen

better corpus list display

Bachir Soussi Chiadmi vor 4 Jahren
Ursprung
Commit
77032c7702

+ 69 - 1
assets/css/app.scss

@@ -55,6 +55,9 @@ header[role="banner"]{
     }
     li>span,li>a{
       font-size: 0.9em;
+      color: $bleuroi;
+      text-transform: uppercase;
+
     }
   }
 }
@@ -97,6 +100,19 @@ section[role="main-content"]{
         box-sizing: border-box;
         flex-basis: percentage(2 / ( $default_sum - 6) );
         padding-right: $default_gap;
+        @include fontsans;
+
+        h1{
+          color: $bleuroi;
+        }
+        p{
+          font-size: 0.882em;
+          line-height: 1.2;
+        }
+        span{
+          color:$rouge;
+          font-size:0.693em;
+        }
       }
       // filets decoratif
       &:before, &:after{
@@ -132,12 +148,64 @@ section[role="main-content"]{
     article.item{
       margin: 2em 0 0;
       header h1{
-        font-size: 1.323em;
+        font-size: 1.512em;
         color: $bleuroi;
         font-weight: 400;
         margin:0;
       }
     }
+    ul.item-list{
+      li{
+        margin: 0 0 2em 0;
+        header{
+          h2{
+            margin:0.4em 0;
+            font-size: 1.512em;
+            color: $bleuroi;
+            font-weight: 400;
+          }
+          h3{
+            margin:0.2em 0;
+            @include fontsans;
+            font-size: 0.753em;
+            font-weight: 500;
+          }
+          h4{
+            margin:0.1em 0;
+            font-weight: 300;
+            @include fontsans;
+            font-size: 0.753em;
+            &.editions-quantity{
+              color: $rouge;
+              &:after{
+                content: ">>";
+                margin:0 0 0 0.5em;
+              }
+            }
+          }
+          section.editions{
+            div.editions{
+              ol{
+                padding:0;
+                li{
+                  margin:0.7em 1em;
+                }
+              }
+            }
+          }
+        }
+        ul {
+          li{
+            margin:0;
+            h3{
+              margin: 0.5em 0;
+              font-weight: 400;
+              font-size: 1em;
+            }
+          }
+        }
+      }
+    }
   }
 
   #corpus{

+ 9 - 2
assets/css/base/_fonts.scss

@@ -4,8 +4,15 @@
 // @import '../fonts/notosans/notosans-condensed.css';
 // @import '../fonts/notosans/notosans-extracondensed.css';
 
-body{
+@mixin fontsans {
+  font-family: "noto_sans";
+}
+@mixin fontserif {
   font-family: 'libertinus_serif';
+}
+
+body{
+  @include fontserif;
   font-weight: 400;
 
   // font-family: 'noto_sans';
@@ -18,5 +25,5 @@ body{
 #search,
 footer[role="tools"] .row>header,
 footer[role="tools"] .row>nav{
-  font-family: "noto_sans";
+  @include fontsans;
 }

+ 1 - 1
src/components/nav/HeaderMenu.vue

@@ -3,7 +3,7 @@
     <ul>
       <li><router-link to="/corpus">Corpus</router-link></li>
       <li>
-        <span>Index</span>
+        <span>Indexs</span>
         <ul>
           <li><router-link to="/nominum">Personnes</router-link></li>
           <li><router-link to="/locorum">Lieux</router-link></li>

+ 11 - 3
src/pages/ListCorpus.vue

@@ -7,9 +7,17 @@
 
     <ul v-if="editionslist.length" class="item-list">
       <li v-for="(corpus,index) in editionslist" :key="index">
-        <h2>{{ corpus.meta.author }}</h2>
-        <ul>
-          <li v-for="text in corpus.content" :key="text.uuid">
+        <header>
+          <h2>{{ corpus.author.title }}</h2>
+          <h3>{{ corpus.author.date }}</h3>
+          <section class="editions">
+            <h4 class="editions-quantity">{{ corpus.author.editionsQuantity }}</h4>
+            <div v-if="corpus.author.editions" class="editions" v-html="corpus.author.editions"/>
+          </section>
+          <h4 class="texts-quantity">{{ corpus.author.textsQuantity }}</h4>
+        </header>
+        <ul class="texts-list">
+          <li v-for="text in corpus.editions.content" :key="text.uuid">
             <h3>
               <a
                 :href="text.url"

+ 13 - 10
src/store/modules/corpus.js

@@ -33,11 +33,11 @@ export default {
             console.log('getCorpuses authors data', data)
             commit('setAuthors', data.content)
             // get the texts list for each corpus (aka author)
-            let authorsUuids = []
-            for (let author of data.content) {
-              authorsUuids.push(author.uuid)
-            }
-            dispatch('getEditionsList', authorsUuids)
+            // let authorsUuids = []
+            // for (let author of data.content) {
+            //   authorsUuids.push(author.uuid)
+            // }
+            dispatch('getEditionsList', data.content)
               .then((editionslist) => {
                 console.log('all texts returned: editionslist', editionslist)
                 commit('setEditionslist', editionslist)
@@ -58,16 +58,19 @@ export default {
         })
     },
     // get editionslist
-    getEditionsList ({ dispatch, commit, state }, authorsUuids) {
-      return Promise.all(authorsUuids.map(function (uuid) {
-        return REST.get(`/corpus/` + uuid, {})
+    getEditionsList ({ dispatch, commit, state }, authors) {
+      return Promise.all(authors.map(function (author) {
+        return REST.get(`/corpus/` + author.uuid, {})
           .then(({ data }) => {
-            console.log('corpus getEditionsList REST: data', data)
+            console.log('corpus getEditionsList REST: author, data', author, data)
             // work arround
             if (!Array.isArray(data.content)) {
               data.content = [data.content]
             }
-            return data
+            return {
+              author: author,
+              editions: data
+            }
           })
           .catch((error) => {
             console.warn('Issue with getEditionsList', error)