started logos on home page #1258

This commit is contained in:
2023-02-19 20:58:07 +01:00
parent 6229131748
commit acc36bb1e9
10 changed files with 65 additions and 26 deletions
+14
View File
@@ -1190,6 +1190,8 @@ footer[role="tools"]{
&>*{ &>*{
// disable grid gap // disable grid gap
padding-right: 0; padding-right: 0;
flex-grow: 0;
flex-shrink: 0;
} }
#footer-tabs{ #footer-tabs{
ul{ ul{
@@ -1332,6 +1334,18 @@ footer[role="tools"]{
} }
} }
} }
;
#logos{
box-sizing: content-box;
max-height: 50px;
padding:1em;
text-align: right;
img{
display: inline-block;
max-height: 100%;
padding-left: 1em;
}
}
} }
h2{ h2{
margin:0; margin:0;
+10 -1
View File
@@ -24,6 +24,14 @@
<div id="footer-bottom" class="row"> <div id="footer-bottom" class="row">
<FooterTabs /> <FooterTabs />
<Search /> <Search />
<div
v-if="$route.name === 'home' && (!searchResults || !searchResults.length)"
id="logos"
class="col-7"
>
<img src="/static/img/logos/labex.jpg" alt="">
<img src="/static/img/logos/PIA logo.png" alt="">
</div>
</div> </div>
</footer> </footer>
</div> </div>
@@ -58,7 +66,8 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
resultsOpened: state => state.Search.opened, resultsOpened: state => state.Search.opened,
editionslist: state => state.Corpus.editionslist editionslist: state => state.Corpus.editionslist,
searchResults: state => state.Corpus.results
}) })
}, },
created () { created () {
+21 -8
View File
@@ -1,7 +1,7 @@
<template> <template>
<div id="search" class="col-11" :class="{ loading: isloading }"> <div id="search" class="" :class="[isloading ? loading : '', wrapperClass]">
<form class="search-form row"> <form class="search-form row">
<fieldset class="search small-col-10 med-col-4 large-col-4"> <fieldset class="" :class="['search', 'small-col-10', firstFieldsetClass]">
<div> <div>
<label for="keys">Search</label> <label for="keys">Search</label>
<input <input
@@ -103,19 +103,31 @@ export default {
data: () => ({ data: () => ({
}), }),
computed: { computed: {
// TODO: do not synch keys instantetly (infinite loading will drop)
keys: {
get () { return this.$store.state.Search.keys },
set (value) { this.$store.commit('Search/setKeys', value) }
},
...mapState({ ...mapState({
isloading: state => state.Search.isloading, isloading: state => state.Search.isloading,
searchTypeOptions: state => state.Search.searchTypeOptions, searchTypeOptions: state => state.Search.searchTypeOptions,
searchTypeValue: state => state.Search.searchTypeValue, searchTypeValue: state => state.Search.searchTypeValue,
filters: state => state.Search.filters, filters: state => state.Search.filters,
activeFilters: state => state.Search.activeFilters, activeFilters: state => state.Search.activeFilters,
corpusLoaded: state => state.Corpus.corpusLoaded corpusLoaded: state => state.Corpus.corpusLoaded,
results: state => state.Corpus.results
}), }),
// TODO: do not synch keys instantetly (infinite loading will drop)
wrapperClass () {
console.log('this.$route.name', this.$route.name)
if (this.$route.name === 'home' && (!this.results || !this.results.length)) {
return 'col-4'
} else {
return 'col-11'
}
},
firstFieldsetClass () {
return (this.$route.name === 'home' && (!this.results || !this.results.length)) ? 'med-col-10 large-col-10' : 'med-col-4 large-col-4'
},
keys: {
get () { return this.$store.state.Search.keys },
set (value) { this.$store.commit('Search/setKeys', value) }
},
personsOptions () { personsOptions () {
return this.filters.persons.filter(option => !this.activeFilters.persons.includes(option)) return this.filters.persons.filter(option => !this.activeFilters.persons.includes(option))
}, },
@@ -128,6 +140,7 @@ export default {
textsOptions () { textsOptions () {
return this.filters.texts.filter(option => !this.activeFilters.texts.includes(option)) return this.filters.texts.filter(option => !this.activeFilters.texts.includes(option))
} }
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
+1 -1
View File
@@ -90,7 +90,7 @@
<p class="titles">{{ item.titles }}</p> <p class="titles">{{ item.titles }}</p>
<p class="edition">{{ item.edition }}</p> <p class="edition">{{ item.edition }}</p>
<p class="extent">{{ item.extent }}</p> <p class="extent">{{ item.extent }}</p>
<p class="tei" v-html="item.tei"/> <p class="tei" v-html="item.tei" />
<ul vi-if="item.manifestations.length" class="item-list"> <ul vi-if="item.manifestations.length" class="item-list">
<li v-for="manif in item.manifestations" :key="manif.uuid"> <li v-for="manif in item.manifestations" :key="manif.uuid">
<router-link <router-link
+2 -1
View File
@@ -18,9 +18,9 @@
<div v-html="trimedTei(page.tei)" /> <div v-html="trimedTei(page.tei)" />
<a <a
:href="page.url" :href="page.url"
class="readmore"
@click.prevent="onclick(page.uuid)" @click.prevent="onclick(page.uuid)"
@keyup.enter="onclick(page.uuid)" @keyup.enter="onclick(page.uuid)"
class="readmore"
> >
<span>Lire la suite</span> <span>Lire la suite</span>
</a> </a>
@@ -30,6 +30,7 @@
</section> </section>
</div> </div>
</template> </template>
<script> <script>
+1 -2
View File
@@ -47,8 +47,7 @@
<!-- default slot --> <!-- default slot -->
<IndexItemOcurrences v-if="content" :content="content" /> <IndexItemOcurrences v-if="content" :content="content" />
<template v-if="content" v-slot:nav> <template v-if="content" v-slot:nav />
</template>
</MainContentLayout> </MainContentLayout>
</template> </template>
+12 -12
View File
@@ -31,6 +31,18 @@ export default {
// page () { // page () {
// } // }
}, },
watch: {
$route (n, o) {
console.log('static route changed', n, o)
this.uuid = n.name
if (this.colophon && this.colophon.length > 0) {
this.setPage()
}
},
colophon (n, o) {
this.setPage()
}
},
beforeCreate () { beforeCreate () {
}, },
@@ -44,18 +56,6 @@ export default {
this.setPage() this.setPage()
} }
}, },
watch: {
$route (n, o) {
console.log('static route changed', n, o)
this.uuid = n.name
if (this.colophon && this.colophon.length > 0) {
this.setPage()
}
},
colophon (n, o) {
this.setPage()
}
},
methods: { methods: {
...mapActions({ ...mapActions({
getColophon: 'Colophon/getColophon' getColophon: 'Colophon/getColophon'
+4 -1
View File
@@ -10,7 +10,8 @@ export default {
editionslist: [], editionslist: [],
editionsbyuuid: {}, editionsbyuuid: {},
editionsuuids: [], editionsuuids: [],
corpusLoaded: false corpusLoaded: false,
numTocsItem: 0
}, },
// getters // getters
@@ -45,6 +46,7 @@ export default {
// console.log('recurseFlatToc', a) // console.log('recurseFlatToc', a)
a.forEach((item, i) => { a.forEach((item, i) => {
state.editionsbyuuid[eduuid].flattoc.push(item.uuid) state.editionsbyuuid[eduuid].flattoc.push(item.uuid)
state.numTocsItem++
if (item.children && item.children.length) { if (item.children && item.children.length) {
recurseFlatToc(state, eduuid, item.children) recurseFlatToc(state, eduuid, item.children)
} }
@@ -56,6 +58,7 @@ export default {
recurseFlatToc(state, eduuid, state.editionsbyuuid[eduuid].toc) recurseFlatToc(state, eduuid, state.editionsbyuuid[eduuid].toc)
// console.log('buildFlatTocs DONE', eduuid, state.editionsbyuuid[eduuid].flattoc) // console.log('buildFlatTocs DONE', eduuid, state.editionsbyuuid[eduuid].flattoc)
}) })
console.log('numTocsItem', state.numTocsItem)
}, },
setPaginations (state, paginationslist) { setPaginations (state, paginationslist) {
// console.log('setPaginations', paginationslist) // console.log('setPaginations', paginationslist)
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB