From 4c2288cf971e6813eca2afb6f14e71a6f7a12f13 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Fri, 17 Jul 2020 12:59:48 +0200 Subject: [PATCH] added text preview in index item's occurences list --- assets/css/app.scss | 59 ++++++++++-- .../Content/IndexItemOcurrences.vue | 36 ++----- src/components/Content/Occurence.vue | 95 +++++++++++++++++++ src/pages/Nominum.vue | 5 + 4 files changed, 159 insertions(+), 36 deletions(-) create mode 100644 src/components/Content/Occurence.vue diff --git a/assets/css/app.scss b/assets/css/app.scss index d24f2bb..3f138fe 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -228,16 +228,63 @@ section[role="main-content"]{ .occurences{ >ul{ >li{ - padding:0 0 1em 0; + padding:0 0 2em 0; h3{ - @include title2black; - padding:0 0 0.3em 0; + @include title1black; + padding:0 0 1em 0; } >ul{ >li{ - padding:0 0 0.3em 0; - h4{ - @include title3black; + padding:0 0 1em 0; + section{ + h4{ + @include title2black; + display: inline-block; + } + span.open-close{ + cursor: pointer; + display: inline-block; + svg{ + transform: rotate(-90deg) scale(0.8); + transition: transform 0.3s ease-in-out; + path{ + fill:$bleuroi; + } + } + } + div.text{ + max-height: 0; + transition: max-height 0.3s ease-in-out; + overflow: hidden; + box-sizing: content-box; + p, h1, h2, h3, h4, h5, h6{ + margin: 0.5em 0 0 0; + } + } + a.lire-plus{ + color: $bleuroi; + opacity: 0; + display: inline-block; + height: 0; + overflow: hidden; + transition: height, opacity 0.3s ease-in-out; + } + &.opened{ + span.open-close{ + cursor: pointer; + display: inline-block; + svg{ + transform: scale(0.8) rotate(0); + } + } + div.text{ + max-height:100px; + } + a.lire-plus{ + opacity: 1; + height:1em; + } + } } } } diff --git a/src/components/Content/IndexItemOcurrences.vue b/src/components/Content/IndexItemOcurrences.vue index ede3e87..8befc20 100644 --- a/src/components/Content/IndexItemOcurrences.vue +++ b/src/components/Content/IndexItemOcurrences.vue @@ -24,17 +24,7 @@ v-for="oc in ed.occurences" :key="oc.uuid" > --> -

- - {{ oc.title }} - -

+ @@ -43,8 +33,13 @@ + diff --git a/src/pages/Nominum.vue b/src/pages/Nominum.vue index 6e582f7..357b50f 100644 --- a/src/pages/Nominum.vue +++ b/src/pages/Nominum.vue @@ -10,6 +10,11 @@ {{ content.birthDate }}, {{ content.birthPlace }}
{{ content.deathDate }}, {{ content.deathPlace }}

+