diff --git a/assets/css/app.scss b/assets/css/app.scss index d001aa4..0ddb922 100644 --- a/assets/css/app.scss +++ b/assets/css/app.scss @@ -529,13 +529,13 @@ section[role="main-content"]{ } footer[role="tools"]{ - $list-item-h: 5em; + $list-item-h: 7em; @mixin resultItem{ box-sizing: border-box; // we are only on 10 colls as 2 are occupied by sides flex-basis: percentage(2/($default_sum - 2)); - height: $list-item-h; + max-height: $list-item-h; overflow: hidden; padding-bottom: 1em; padding-right: $default_gap; @@ -602,7 +602,7 @@ footer[role="tools"]{ z-index: 9; background-color: $gris; padding:1.2em $side-padding; - max-height: $list-item-h * 5; + max-height: $list-item-h * 3; @include accordeon-transition($list-item-h * 3); >header{ .search-keys{ @@ -636,6 +636,17 @@ footer[role="tools"]{ // TODO: how to center the loading } } + + >header, section.results-list{ + transition: opacity 0.2s ease-in-out; + } + &.loading { + >header, section.results-list{ + transition: opacity 0.5s ease-in-out; + opacity:0.5; + pointer-events: none; + } + } } #footer-bottom{ z-index: 10; @@ -740,6 +751,16 @@ footer[role="tools"]{ padding-top:0.2em; } } + form{ + transition: opacity 0.2s ease-in-out; + } + &.loading{ + form{ + opacity:0.5; + transition: opacity 0.5s ease-in-out; + pointer-events: none; + } + } } } h2{ diff --git a/src/components/Content/ResultItem.vue b/src/components/Content/ResultItem.vue index e53dd38..c4c9211 100644 --- a/src/components/Content/ResultItem.vue +++ b/src/components/Content/ResultItem.vue @@ -35,9 +35,9 @@ export default { required: true } }, - data: () => ({ - preview: '' - }), + // data: () => ({ + // preview: '' + // }), computed: { ...mapState({ editionsbyuuid: state => state.Corpus.editionsbyuuid @@ -46,14 +46,14 @@ export default { return this.editionsbyuuid[this.result.textId].title } }, - created () { - if (this.result.extract) { - const subString = this.result.extract.substr(0, 80) - this.preview = subString.substr(0, subString.lastIndexOf(' ')) + ' …' - } else { - console.warn(`No extract for ${this.result.textId}/${this.result.uuid}`) - } - }, + // created () { + // if (this.result.extract) { + // const subString = this.result.extract.substr(0, 80) + // this.preview = subString.substr(0, subString.lastIndexOf(' ')) + ' …' + // } else { + // console.warn(`No extract for ${this.result.textId}/${this.result.uuid}`) + // } + // }, methods: { ...mapActions({ addHistoryItem: 'History/addItem' diff --git a/src/components/nav/Results.vue b/src/components/nav/Results.vue index 21b8b02..25f70ad 100644 --- a/src/components/nav/Results.vue +++ b/src/components/nav/Results.vue @@ -4,11 +4,22 @@ v-if="opened" id="results" class="row" + :class="{ loading: isloading }" >

Resultats

{{ keys }}
{{ resultsCount }} +
@@ -19,6 +30,7 @@
@@ -37,24 +49,31 @@ diff --git a/src/components/nav/Search.vue b/src/components/nav/Search.vue index d9b2d2c..5d20a1f 100644 --- a/src/components/nav/Search.vue +++ b/src/components/nav/Search.vue @@ -1,6 +1,6 @@