-
-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,097 additions
and
884 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
.github/ISSUE_TEMPLATE/bug_statemine.yml → .github/ISSUE_TEMPLATE/bug_assetshub.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<template> | ||
<div class="article"> | ||
<div | ||
class="is-flex is-justify-content-space-between has-text-grey is-size-5"> | ||
<div>{{ attributes.tags }}</div> | ||
<div v-if="attributes.date"> | ||
{{ format(new Date(attributes.date), 'dd.MM.yyyy') }} | ||
</div> | ||
</div> | ||
<h1>{{ attributes.title }}</h1> | ||
<p v-if="attributes.subtitle" class="subtitle">{{ attributes.subtitle }}</p> | ||
<img | ||
v-if="attributes.image" | ||
:src="attributes.image" | ||
:alt="attributes.title" | ||
width="100%" /> | ||
<component :is="singlePostComponent" /> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { format } from 'date-fns' | ||
import { convertMarkdownToText } from '@/utils/markdown' | ||
const { $seoMeta } = useNuxtApp() | ||
const route = useRoute() | ||
const slug = route.params.slug | ||
const attributes = ref({}) | ||
const singlePostComponent = ref('') | ||
onMounted(async () => { | ||
const post = await import(`~/content/blog/${slug}.md`) | ||
attributes.value = post.attributes | ||
singlePostComponent.value = post.vue.component | ||
}) | ||
const title = computed(() => attributes.value.title) | ||
const meta = computed(() => { | ||
return [ | ||
...$seoMeta({ | ||
title: attributes.value.title, | ||
description: convertMarkdownToText(attributes.value.subtitle), | ||
url: route.path, | ||
image: attributes.value.image, | ||
}), | ||
] | ||
}) | ||
useNuxt2Meta({ | ||
title, | ||
meta, | ||
}) | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import '@/styles/abstracts/variables'; | ||
.article { | ||
margin: 0 auto; | ||
max-width: 40rem; | ||
.subtitle { | ||
font-size: 25px; | ||
margin-bottom: 0; | ||
} | ||
h1 { | ||
font-size: 3rem; | ||
font-weight: 700; | ||
margin: 1rem 0; | ||
} | ||
h2 { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
margin-bottom: 1rem; | ||
} | ||
img { | ||
border-radius: 1rem; | ||
margin: 2.5rem 0; | ||
} | ||
p { | ||
font-size: 20px; | ||
line-height: 30px; | ||
margin-bottom: 1rem; | ||
} | ||
@include ktheme() { | ||
.markdown-body { | ||
color: theme('k-accentlight2-dark'); | ||
} | ||
img { | ||
border: 1px solid theme('border-color'); | ||
} | ||
} | ||
@include touch { | ||
.subtitle { | ||
font-size: 1.25rem; | ||
} | ||
h1 { | ||
font-size: 1.75rem; | ||
} | ||
h2, | ||
p { | ||
font-size: 1rem; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.