transversal links to nav history #786, restored scrolls
This commit is contained in:
+71
-66
@@ -6,6 +6,25 @@
|
|||||||
@import './base/fonts';
|
@import './base/fonts';
|
||||||
@import './base/transitions';
|
@import './base/transitions';
|
||||||
|
|
||||||
|
/* The emerging W3C standard
|
||||||
|
that is currently Firefox-only */
|
||||||
|
* {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
scrollbar-color: $grisclair rgba(255,255,255,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Works on Chrome/Edge/Safari */
|
||||||
|
*::-webkit-scrollbar {
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
|
*::-webkit-scrollbar-track {
|
||||||
|
background: rgba(255,255,255,0);
|
||||||
|
}
|
||||||
|
*::-webkit-scrollbar-thumb {
|
||||||
|
background-color: $grisclair;
|
||||||
|
border-radius: 20px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
body{
|
body{
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
@@ -479,8 +498,48 @@ section[role="main-content"]{
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer[role="tools"]{
|
footer[role="tools"]{
|
||||||
$list-item-h: 5.3em;
|
$list-item-h: 5em;
|
||||||
|
|
||||||
|
@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;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
padding-right: $default_gap;
|
||||||
|
article{
|
||||||
|
max-height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
article.item{
|
||||||
|
h1{
|
||||||
|
@include title3black;
|
||||||
|
font-weight: 600;
|
||||||
|
max-width: 95%;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
@include title3black;
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
font-size: 0.882em;
|
||||||
|
}
|
||||||
|
// .preview{
|
||||||
|
// font-size: 0.882em;
|
||||||
|
// margin:0;
|
||||||
|
// code{
|
||||||
|
// @include fontserif;
|
||||||
|
// background-color: lighten(desaturate($rouge,20%), 20%);
|
||||||
|
// padding:0 0.2em;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#history{
|
#history{
|
||||||
z-index: 8;
|
z-index: 8;
|
||||||
background-color: $or;
|
background-color: $or;
|
||||||
@@ -496,7 +555,7 @@ footer[role="tools"]{
|
|||||||
height:100%;
|
height:100%;
|
||||||
// hidding the scrollbar
|
// hidding the scrollbar
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
width:calc(100% + 1em);
|
// width:calc(100% + 1em);
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
>ul{
|
>ul{
|
||||||
padding:0;
|
padding:0;
|
||||||
@@ -506,35 +565,7 @@ footer[role="tools"]{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
li.item{
|
li.item{
|
||||||
box-sizing: border-box;
|
@include resultItem;
|
||||||
// we are only on 10 colls as 2 are occupied by sides
|
|
||||||
flex-basis: percentage(2/($default_sum - 2));
|
|
||||||
height: $list-item-h;
|
|
||||||
overflow: hidden;
|
|
||||||
padding-bottom: 1em;
|
|
||||||
padding-right: $default_gap;
|
|
||||||
article{
|
|
||||||
max-height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
article.history.item{
|
|
||||||
header{
|
|
||||||
h1{
|
|
||||||
font-size: 0.882em;
|
|
||||||
font-weight: normal;
|
|
||||||
margin:0 0 0.5em 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.extract{
|
|
||||||
p{
|
|
||||||
font-size: 0.882em;
|
|
||||||
margin:0;
|
|
||||||
}
|
|
||||||
code{
|
|
||||||
background-color: lighten(desaturate($rouge,20%), 20%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -560,7 +591,7 @@ footer[role="tools"]{
|
|||||||
height:100%;
|
height:100%;
|
||||||
// hidding the scrollbar
|
// hidding the scrollbar
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
width:calc(100% + 1em);
|
// width:calc(100% + 1em);
|
||||||
padding-right: 1em;
|
padding-right: 1em;
|
||||||
>ul{
|
>ul{
|
||||||
padding:0;
|
padding:0;
|
||||||
@@ -570,39 +601,7 @@ footer[role="tools"]{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
li.result{
|
li.result{
|
||||||
box-sizing: border-box;
|
@include resultItem;
|
||||||
// we are only on 10 colls as 2 are occupied by sides
|
|
||||||
flex-basis: percentage(2/($default_sum - 2));
|
|
||||||
height: $list-item-h;
|
|
||||||
overflow: hidden;
|
|
||||||
padding-bottom: 1em;
|
|
||||||
padding-right: $default_gap;
|
|
||||||
article{
|
|
||||||
max-height: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
article.result.item{
|
|
||||||
h1{
|
|
||||||
@include title3black;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
h2{
|
|
||||||
@include title3black;
|
|
||||||
text-transform: none;
|
|
||||||
}
|
|
||||||
span{
|
|
||||||
font-size: 0.882em;
|
|
||||||
}
|
|
||||||
// .preview{
|
|
||||||
// font-size: 0.882em;
|
|
||||||
// margin:0;
|
|
||||||
// code{
|
|
||||||
// @include fontserif;
|
|
||||||
// background-color: lighten(desaturate($rouge,20%), 20%);
|
|
||||||
// padding:0 0.2em;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
.infinite-loading-container{
|
.infinite-loading-container{
|
||||||
// TODO: how to center the loading
|
// TODO: how to center the loading
|
||||||
@@ -652,12 +651,18 @@ footer[role="tools"]{
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: $bleuroi;
|
background-color: $bleuroi;
|
||||||
form{
|
form{
|
||||||
// padding: 0.7em;
|
padding: 0;
|
||||||
|
// display: flex;
|
||||||
|
// flex-direction: row;
|
||||||
|
// flex-wrap: wrap;
|
||||||
fieldset{
|
fieldset{
|
||||||
padding:0.7em 1em;
|
padding:0.7em 1em;
|
||||||
border: none;
|
border: none;
|
||||||
|
box-sizing:border-box;
|
||||||
// width correction as row is not the same width as others in the page
|
// width correction as row is not the same width as others in the page
|
||||||
|
// flex-basis: percentage(2/($default_sum - 1));
|
||||||
flex-basis: 17.667%;
|
flex-basis: 17.667%;
|
||||||
|
// flex-basis: percentage(2 / 11);
|
||||||
&:not(:first-of-type){
|
&:not(:first-of-type){
|
||||||
border-left: 1px solid $grisclair;
|
border-left: 1px solid $grisclair;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<article class="history item">
|
<article class="result item">
|
||||||
<header>
|
<h1>
|
||||||
<h1>
|
<a
|
||||||
<a
|
:href="'/edition/'+item.textId+'/'+item.uuid"
|
||||||
:href="item.url"
|
@click.prevent="onclick"
|
||||||
@click.prevent="onclick"
|
@keyup.enter="onclick"
|
||||||
@keyup.enter="onclick"
|
v-html="item.title"
|
||||||
v-html="item.textId"
|
/>
|
||||||
/>
|
</h1>
|
||||||
</h1>
|
<h2>
|
||||||
</header>
|
<a
|
||||||
<div class="extract" v-html="item.extract" />
|
:href="'/edition/'+item.textId+'/'+item.uuid"
|
||||||
|
@click.prevent="onclick"
|
||||||
|
@keyup.enter="onclick"
|
||||||
|
v-html="item.editionTitle"
|
||||||
|
/>
|
||||||
|
</h2>
|
||||||
|
<!-- <p v-if="preview" class="preview" v-html="preview" /> -->
|
||||||
|
<aside>
|
||||||
|
<span>Pagination</span> | <span>Nbr mots</span>
|
||||||
|
</aside>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { REST } from 'api/rest-axios'
|
import { REST } from 'api/rest-axios'
|
||||||
|
import { mapState, mapActions } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Occurence',
|
name: 'Occurence',
|
||||||
@@ -49,6 +50,14 @@ export default {
|
|||||||
isopened: false,
|
isopened: false,
|
||||||
tei: ''
|
tei: ''
|
||||||
}),
|
}),
|
||||||
|
computed: {
|
||||||
|
...mapState({
|
||||||
|
editionsbyuuid: state => state.Corpus.editionsbyuuid
|
||||||
|
}),
|
||||||
|
editionTitle () {
|
||||||
|
return this.editionsbyuuid[this.ed.item].title
|
||||||
|
}
|
||||||
|
},
|
||||||
created () {
|
created () {
|
||||||
console.log('occurence beforeCreate')
|
console.log('occurence beforeCreate')
|
||||||
REST.get(`${window.apipath}/items/` + this.oc.uuid, {})
|
REST.get(`${window.apipath}/items/` + this.oc.uuid, {})
|
||||||
@@ -66,9 +75,19 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapActions({
|
||||||
|
addHistoryItem: 'History/addItem'
|
||||||
|
}),
|
||||||
onGoToText (e) {
|
onGoToText (e) {
|
||||||
console.log('clicked on text occurence', e)
|
console.log('clicked on text occurence', e, this.oc.title, this.ed)
|
||||||
|
|
||||||
if (e.target.getAttribute('eduuid')) {
|
if (e.target.getAttribute('eduuid')) {
|
||||||
|
this.addHistoryItem({
|
||||||
|
id: e.target.getAttribute('eduuid'),
|
||||||
|
textid: e.target.getAttribute('uuid'),
|
||||||
|
title: this.oc.title,
|
||||||
|
editionTitle: this.editionTitle
|
||||||
|
})
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: `editiontext`,
|
name: `editiontext`,
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
@@ -60,7 +60,19 @@ export default {
|
|||||||
}),
|
}),
|
||||||
onclick () {
|
onclick () {
|
||||||
console.log('clicked on result item', this.result)
|
console.log('clicked on result item', this.result)
|
||||||
this.addHistoryItem(this.result)
|
this.addHistoryItem({
|
||||||
|
id: this.result.textId,
|
||||||
|
textid: this.result.uuid,
|
||||||
|
title: this.result.title[0],
|
||||||
|
editionTitle: this.editionTitle
|
||||||
|
})
|
||||||
|
this.$router.push({
|
||||||
|
name: `editiontext`,
|
||||||
|
params: {
|
||||||
|
id: this.result.textId,
|
||||||
|
textid: this.result.uuid
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="search" class="col-11">
|
<div id="search" class="col-11">
|
||||||
<form class="search-form row">
|
<form class="search-form row">
|
||||||
<fieldset class="search col-2">
|
<fieldset class="search">
|
||||||
<div>
|
<div>
|
||||||
<label for="keys">Search</label>
|
<label for="keys">Search</label>
|
||||||
<input
|
<input
|
||||||
|
|||||||
@@ -29,13 +29,13 @@ export default {
|
|||||||
console.log('history add item', item, router)
|
console.log('history add item', item, router)
|
||||||
commit('addItem', item)
|
commit('addItem', item)
|
||||||
commit('setOpened', true)
|
commit('setOpened', true)
|
||||||
router.push({
|
// router.push({
|
||||||
name: `editiontext`,
|
// name: `editiontext`,
|
||||||
params: {
|
// params: {
|
||||||
id: item.textId,
|
// id: item.textId,
|
||||||
textid: item.uuid
|
// textid: item.uuid
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
navigateToItem ({ dispatch, commit, state }, item) {
|
navigateToItem ({ dispatch, commit, state }, item) {
|
||||||
console.log('history navigate to item', item, router)
|
console.log('history navigate to item', item, router)
|
||||||
|
|||||||
Reference in New Issue
Block a user