remove pug

This commit is contained in:
polv committed 2020-12-16 01:12:41 +07:00
1 parent e397c9ae1e
commit 68840c9c60
49 files changed
+1421 -806

No files matched your search

-35
View File
@@ -1,35 +0,0 @@
<template>
<svg
class="NuxtLogo"
width="245"
height="180"
viewBox="0 0 452 342"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
fill="#00C58E"
/>
<path
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
fill="#108775"
/>
<path
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
fill="#2F495E"
/>
</svg>
</template>
<style>
.NuxtLogo {
animation: 1s appear;
margin: auto;
}
@keyframes appear {
0% {
opacity: 0;
}
}
</style>
+92
View File
@@ -0,0 +1,92 @@
<template>
<article>
<post-teaser v-for="p in posts" :key="p.path" :post="p"></post-teaser>
<nav v-if="count > 5">
<ul>
<li v-if="page > 2">
<nuxt-link :to="makePageUrl(1)" aria-label="page 1"> &lt; </nuxt-link>
</li>
<li v-if="page > 1">
<nuxt-link :to="makePageUrl(1)" aria-label="page 1">1</nuxt-link>
</li>
<li v-if="page > 4">
<span> &hellip; </span>
</li>
<li v-if="page > 3">
<nuxt-link
:to="makePageUrl(page - 1)"
:aria-label="`page ${page - 1}`"
>
{{ page - 1 }}
</nuxt-link>
</li>
<li>
<span>
{{ page }}
</span>
</li>
<li v-if="page < total - 2">
<nuxt-link
:to="makePageUrl(page + 1)"
:aria-label="`page ${page + 1}`"
>
{{ page + 1 }}
</nuxt-link>
</li>
<li v-if="page < total - 3">
<span> &hellip; </span>
</li>
<li v-if="page < total">
<nuxt-link :to="makePageUrl(total)" :aria-label="`page ${total}`">
{{ total }}
</nuxt-link>
</li>
<li v-if="page < total - 1">
<nuxt-link
:to="makePageUrl(page + 1)"
:aria-label="`page ${page + 1}`"
>
&gt;
</nuxt-link>
</li>
</ul>
</nav>
</article>
</template>
<script lang="ts">
import { Vue, Component, Prop } from 'nuxt-property-decorator'
@Component
export default class PostQuery extends Vue {
@Prop({ required: true }) posts!: IPostTeaser[]
@Prop({ required: true }) count!: number
get page() {
return parseInt((this.$route.query.page as string) || '1')
}
get total() {
return Math.ceil(this.count / 5)
}
makePageUrl(page: number) {
return this.$router.resolve({
path: this.$route.path,
query: {
...this.$route.query,
page: page.toString(),
},
})
}
}
</script>
+48
View File
@@ -0,0 +1,48 @@
<template>
<section>
<h2>
<nuxt-link :to="'post/' + post.path">
{{ post.title }}
</nuxt-link>
</h2>
<small>
<span>
by
<a
v-if="theme.author.url"
:href="theme.author.url"
target="_blank"
rel="noopener"
>
{{ theme.author.name }}
</a>
<span v-else>
{{ theme.author.name }}
</span>
</span>
<span v-if="post.date" style="float: right">
{{ post.date | formatDate }}
</span>
</small>
<article v-html="post.excerpt"></article>
</section>
</template>
<script lang="ts">
import { Vue, Component, Prop } from 'nuxt-property-decorator'
import { THEME } from '~/assets/global'
@Component
export default class PostTeaser extends Vue {
@Prop() post!: IPostTeaser
theme = THEME
}
</script>
<style scoped>
article {
margin-top: 2em;
}
</style>
-7
View File
@@ -1,7 +0,0 @@
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._