This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/routes/any.vue

75 lines
2.0 KiB
Vue
Raw Normal View History

2020-09-13 13:15:44 -07:00
<template>
<div class="container">
<h2>
<Icon v="tag"/>
<T>template.intro</T>:
2020-09-13 13:15:44 -07:00
</h2>
<section>
<div class="alert alert-primary">
<h2 class="text-center mb-0">
<strong><T>template.any.short</T></strong>
2020-09-13 13:15:44 -07:00
</h2>
<p class="h6 small text-center mb-0 mt-2">
<em>
<T>template.any.description</T>
(<T>template.any.options</T>)
2020-09-13 13:15:44 -07:00
</em>
</p>
</div>
</section>
<section>
<h2 class="h4">
<Icon v="file-signature"/>
<T>template.examples</T>:
2020-09-13 13:15:44 -07:00
</h2>
<ul>
<li v-for="example in examples" class="my-1">
<Example :example="example" :template="randomTemplate()" link/>
</li>
</ul>
</section>
<section>
<Share :title="`${$t('template.intro')}: ${$t('template.any.short')}`"/>
2020-09-13 13:15:44 -07:00
</section>
<Separator icon="info"/>
<section class="mb-0">
<h2 class="h4">
<Icon v="info-circle"/>
<T>home.whatisit</T>:
2020-09-13 13:15:44 -07:00
</h2>
<T>home.about</T>
2020-09-13 13:15:44 -07:00
<Homepage align="center"/>
</section>
</div>
</template>
<script>
import { examples, templates } from "~/src/data";
2020-09-23 12:29:55 -07:00
import { head } from "../src/helpers";
2020-09-13 13:15:44 -07:00
export default {
data() {
return {
examples: examples,
}
},
head() {
2020-09-23 12:29:55 -07:00
return head({
title: `${this.$t('template.intro')}: ${this.$t('template.any.short')}`,
2020-10-31 13:33:59 -07:00
banner: `api/banner/${this.$t('template.any.short')}.png`,
2020-09-23 12:29:55 -07:00
});
2020-09-13 13:15:44 -07:00
},
methods: {
randomTemplate() {
const keys = Object.keys(templates);
return templates[keys[keys.length * Math.random() << 0]];
},
}
}
</script>