init blog (wip)

This commit is contained in:
Hans Pagel
2021-07-09 18:24:23 +02:00
parent 1b7ef80603
commit 2e40a827fb
17 changed files with 748 additions and 6 deletions

View File

@@ -0,0 +1,50 @@
<template>
<article class="c-post-detail">
<header class="c-post-detail__header text">
<h1 class="c-post-detail__title">
{{ title }}
</h1>
<p class="c-post-detail__meta">
Published
<time :datetime="publishedAt">
{{ formattedPublishedAt }}
</time>
</p>
</header>
<VueRemarkContent class="text" />
</article>
</template>
<script>
import moment from 'moment'
export default {
props: {
title: {
default: null,
type: String,
},
author: {
default: null,
type: String,
},
content: {
default: null,
type: String,
},
publishedAt: {
default: null,
type: String,
},
},
computed: {
formattedPublishedAt() {
return moment(this.publishedAt).format('MMM Do, YYYY')
},
},
}
</script>
<style lang="scss" src="./style.scss"></style>

View File

@@ -0,0 +1,25 @@
.c-post-detail {
&__header {
margin-bottom: 1.5rem;
@media (min-width: 500px) {
margin-bottom: 3rem;
}
}
&__title {
margin: 0;
}
&__meta {
margin: 0.5rem 0 0 0;
--text-color: rgba(var(--text), 0.4);
color: var(--text-color);
}
&__author {
margin: 2rem 0 0 0;
--text-color: rgba(var(--text), 0.4);
color: var(--text-color);
}
}