created MainContentLayout slot template

This commit is contained in:
2019-09-27 16:26:05 +02:00
parent 08e6433c0e
commit df9f5a865c
8 changed files with 179 additions and 84 deletions
+41
View File
@@ -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>
+3 -3
View File
@@ -5,9 +5,9 @@
<li>
<span>Index</span>
<ul>
<li><router-link to="/nominum">Nominum</router-link></li>
<li><router-link to="/locorum">Locorum</router-link></li>
<li><router-link to="/operum">Operum</router-link></li>
<li><router-link to="/nominum">Personnes</router-link></li>
<li><router-link to="/locorum">Lieux</router-link></li>
<li><router-link to="/operum">Œuvres</router-link></li>
</ul>
</li>
<li><router-link to="/bibliographie">Bibliographie</router-link></li>