created MainContentLayout slot template
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<article class="locorum item">
|
||||||
|
<header>
|
||||||
|
<h1>
|
||||||
|
<a
|
||||||
|
:href="item.url"
|
||||||
|
@click.prevent="onclick"
|
||||||
|
@keyup.enter="onclick"
|
||||||
|
v-html="item.title"
|
||||||
|
/>
|
||||||
|
</h1>
|
||||||
|
</header>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'LocorumItem',
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
|
||||||
|
}),
|
||||||
|
methods: {
|
||||||
|
onclick () {
|
||||||
|
console.log('clicked on locorum item', this.item)
|
||||||
|
// this.$router.push({
|
||||||
|
// name: `locorumItem`,
|
||||||
|
// query: { id: this.item.uuid }
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
:id="id"
|
||||||
|
class="full-width row"
|
||||||
|
>
|
||||||
|
<header class="col-3">
|
||||||
|
<slot name="header" />
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<section class="col-6">
|
||||||
|
<slot />
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<nav class="col-3">
|
||||||
|
<slot name="nav" />
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'MainContentLayout',
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
</style>
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<span>Index</span>
|
<span>Index</span>
|
||||||
<ul>
|
<ul>
|
||||||
<li><router-link to="/nominum">Nominum</router-link></li>
|
<li><router-link to="/nominum">Personnes</router-link></li>
|
||||||
<li><router-link to="/locorum">Locorum</router-link></li>
|
<li><router-link to="/locorum">Lieux</router-link></li>
|
||||||
<li><router-link to="/operum">Operum</router-link></li>
|
<li><router-link to="/operum">Œuvres</router-link></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><router-link to="/bibliographie">Bibliographie</router-link></li>
|
<li><router-link to="/bibliographie">Bibliographie</router-link></li>
|
||||||
|
|||||||
+19
-15
@@ -1,29 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<MainContentLayout id="corpus">
|
||||||
id="corpus"
|
<template v-slot:header>
|
||||||
class="full-width"
|
<h1>Corpus</h1>
|
||||||
>
|
<span v-if="!items.length">Loading ...</span>
|
||||||
<h1>Corpus</h1>
|
</template>
|
||||||
<span v-if="!items.length">Loading ...</span>
|
|
||||||
<div v-else class="item-list">
|
<ul v-if="items.length" class="item-list">
|
||||||
<ul>
|
<li v-for="item in items" :key="item.url">
|
||||||
<li v-for="item in items" :key="item.url">
|
<CorpusItem :item="item" />
|
||||||
<CorpusItem :item="item" />
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
</ul>
|
|
||||||
</div>
|
<template v-slot:nav>
|
||||||
</div>
|
nav
|
||||||
|
</template>
|
||||||
|
</MainContentLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import CorpusItem from '../components/Content/CorpusItem'
|
import CorpusItem from '../components/Content/CorpusItem'
|
||||||
|
import MainContentLayout from '../components/Layouts/MainContentLayout'
|
||||||
import { mapState, mapActions } from 'vuex'
|
import { mapState, mapActions } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Corpus',
|
name: 'Corpus',
|
||||||
components: {
|
components: {
|
||||||
CorpusItem
|
CorpusItem,
|
||||||
|
MainContentLayout
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
// items: []
|
// items: []
|
||||||
|
|||||||
+18
-14
@@ -1,26 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<transition name="fade" appear>
|
<MainContentLayout id="text" class="text">
|
||||||
<span v-if="!loaded">Loading...</span>
|
<template v-slot:header>
|
||||||
<article v-else class="item row">
|
<h1>
|
||||||
<header class="col-3">
|
{{ item.title }}
|
||||||
<h1>
|
</h1>
|
||||||
{{ item.title }}
|
<span v-if="!loaded">Loading...</span>
|
||||||
</h1>
|
</template>
|
||||||
</header>
|
|
||||||
<section v-html="item.tei" class="col-6"/>
|
<section v-html="item.tei" class="col-6"/>
|
||||||
<section class="col-3">
|
|
||||||
tree
|
<template v-slot:nav>
|
||||||
</section>
|
tree
|
||||||
</article>
|
</template>
|
||||||
</transition>
|
</MainContentLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { REST } from 'api/rest-axios'
|
import { REST } from 'api/rest-axios'
|
||||||
|
import MainContentLayout from '../components/Layouts/MainContentLayout'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Item',
|
name: 'Item',
|
||||||
|
components: {
|
||||||
|
MainContentLayout
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
uuid: {
|
uuid: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
+26
-19
@@ -1,38 +1,45 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<MainContentLayout id="locorum">
|
||||||
id="locorum"
|
<template v-slot:header>
|
||||||
class="full-width"
|
<h1>Lieux</h1>
|
||||||
>
|
<span v-if="!items.length">Loading ...</span>
|
||||||
<h1>Locorum</h1>
|
</template>
|
||||||
<span v-if="!items.length">Loading ...</span>
|
|
||||||
</div>
|
<ul v-if="items.length" class="item-list">
|
||||||
|
<li v-for="item in items" :key="item.url">
|
||||||
|
<LocorumItem :item="item" />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<template v-slot:nav>
|
||||||
|
nav
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</MainContentLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { REST } from 'api/rest-axios'
|
import { REST } from 'api/rest-axios'
|
||||||
|
import MainContentLayout from '../components/Layouts/MainContentLayout'
|
||||||
|
import LocorumItem from '../components/Content/LocorumItem'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Locorum',
|
name: 'Locorum',
|
||||||
|
components: {
|
||||||
|
LocorumItem,
|
||||||
|
MainContentLayout
|
||||||
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
items: []
|
items: []
|
||||||
|
|
||||||
}),
|
}),
|
||||||
beforeCreate () {
|
beforeCreate () {
|
||||||
// items/gdpLeMaire1685T01BodyFr01.003.016
|
|
||||||
// texts/gdpSauval1724
|
|
||||||
REST.get(`/indexLocorum`, {})
|
REST.get(`/indexLocorum`, {})
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
console.log('locorum REST: data', data)
|
console.log('locorum REST: data', data)
|
||||||
// if(data.length){
|
if (data.content.length) {
|
||||||
// commit('setItems',data)
|
this.items = data.content
|
||||||
// // console.log('items.length', this.items.length);
|
}
|
||||||
// if(state.infiniteLoadingState)
|
|
||||||
// state.infiniteLoadingState.loaded()
|
|
||||||
// }else{
|
|
||||||
// if(state.infiniteLoadingState)
|
|
||||||
// state.infiniteLoadingState.complete()
|
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.warn('Issue with locorum', error)
|
console.warn('Issue with locorum', error)
|
||||||
|
|||||||
+19
-15
@@ -1,29 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<MainContentLayout id="nominum">
|
||||||
id="nominum"
|
<template v-slot:header>
|
||||||
class="full-width"
|
<h1>Personnes</h1>
|
||||||
>
|
<span v-if="!items.length">Loading ...</span>
|
||||||
<h1>Nominum</h1>
|
</template>
|
||||||
<span v-if="!items.length">Loading ...</span>
|
|
||||||
<div v-else class="item-list">
|
<ul v-if="items.length" class="item-list">
|
||||||
<ul>
|
<li v-for="item in items" :key="item.url">
|
||||||
<li v-for="item in items" :key="item.url">
|
<NominumItem :item="item" />
|
||||||
<NominumItem :item="item" />
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
</ul>
|
|
||||||
</div>
|
<template v-slot:nav>
|
||||||
</div>
|
nav
|
||||||
|
</template>
|
||||||
|
</MainContentLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { REST } from 'api/rest-axios'
|
import { REST } from 'api/rest-axios'
|
||||||
|
import MainContentLayout from '../components/Layouts/MainContentLayout'
|
||||||
import NominumItem from '../components/Content/NominumItem'
|
import NominumItem from '../components/Content/NominumItem'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Nominum',
|
name: 'Nominum',
|
||||||
components: {
|
components: {
|
||||||
NominumItem
|
NominumItem,
|
||||||
|
MainContentLayout
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
items: []
|
items: []
|
||||||
|
|||||||
+19
-18
@@ -1,37 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<MainContentLayout id="operum">
|
||||||
id="operum"
|
<template v-slot:header>
|
||||||
class="full-width"
|
<h1>Œuvres</h1>
|
||||||
>
|
<span v-if="!items.length">Loading ...</span>
|
||||||
<h1>Operum</h1>
|
</template>
|
||||||
<span v-if="!items.length">Loading ...</span>
|
|
||||||
<div v-else class="item-list">
|
<ul v-if="items.length" class="item-list">
|
||||||
<ul>
|
<li v-for="item in items" :key="item.url">
|
||||||
<li v-for="item in items" :key="item.url">
|
<OperumItem :item="item" />
|
||||||
<OperumItem :item="item" />
|
</li>
|
||||||
</li>
|
</ul>
|
||||||
</ul>
|
|
||||||
</div>
|
<template v-slot:nav>
|
||||||
</div>
|
nav
|
||||||
|
</template>
|
||||||
|
</MainContentLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import { REST } from 'api/rest-axios'
|
import { REST } from 'api/rest-axios'
|
||||||
|
import MainContentLayout from '../components/Layouts/MainContentLayout'
|
||||||
import OperumItem from '../components/Content/OperumItem'
|
import OperumItem from '../components/Content/OperumItem'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Operum',
|
name: 'Operum',
|
||||||
components: {
|
components: {
|
||||||
OperumItem
|
OperumItem,
|
||||||
|
MainContentLayout
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
items: []
|
items: []
|
||||||
|
|
||||||
}),
|
}),
|
||||||
beforeCreate () {
|
beforeCreate () {
|
||||||
// items/gdpLeMaire1685T01BodyFr01.003.016
|
|
||||||
// texts/gdpSauval1724
|
|
||||||
REST.get(`/indexOperum`, {})
|
REST.get(`/indexOperum`, {})
|
||||||
.then(({ data }) => {
|
.then(({ data }) => {
|
||||||
console.log('operum REST: data', data)
|
console.log('operum REST: data', data)
|
||||||
|
|||||||
Reference in New Issue
Block a user