cleaned, switched from stylus to sass

This commit is contained in:
2019-07-19 16:21:46 +02:00
parent dd40e24467
commit 01e4d99537
16 changed files with 874 additions and 161 deletions
-52
View File
@@ -1,52 +0,0 @@
<template>
<section v-if="opened != null">
<h2>{{ opened.title }}</h2>
<p>{{ opened.body }}</p>
<a
href="#"
@click="closePost()"
@keydown.enter="closePost()"
>
close
</a>
</section>
<ul v-else>
<li
v-for="post in posts"
:key="post.id"
>
<h2>
<a
:href="'#post-'+post.id"
@click="openPost(post)"
@keydown.enter="openPost(post)"
>
{{ post.title }}
</a>
</h2>
</li>
</ul>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
computed: mapState({
opened: state => state.posts.opened,
posts: state => state.posts.all
}),
created () {
this.$store.dispatch('posts/getAllPosts')
},
methods: mapActions('posts', [
'openPost',
'closePost'
]),
metaInfo () {
return {
title: this.opened !== null ? this.opened.title : 'home'
}
}
}
</script>
+19
View File
@@ -0,0 +1,19 @@
<template>
<nav id="">
<ul>
<li><a href="#">Index</a></li>
<li><a href="#">Bibliographie</a></li>
<li><a href="#">Blog</a></li>
</ul>
</nav>
</template>
<script>
export default {
name: 'HeaderMenu',
data: () => ({
})
}
</script>
<style lang="scss" scoped>
</style>