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/nouns.vue

60 lines
1.8 KiB
Vue
Raw Permalink Normal View History

2020-08-04 07:15:41 -07:00
<template>
2020-11-16 11:43:44 -08:00
<div>
<NounsNav/>
2020-09-11 03:17:29 -07:00
<h2>
2020-12-18 08:32:18 -08:00
<Icon v="book"/>
2020-11-16 13:22:04 -08:00
<T>nouns.headerLonger</T>
2020-09-11 03:17:29 -07:00
</h2>
2020-08-04 07:15:41 -07:00
<section>
<T>nouns.intro</T>
2020-08-04 07:15:41 -07:00
2020-10-12 02:46:26 -07:00
<Share :title="$t('nouns.headerLong')"/>
2020-08-04 07:15:41 -07:00
</section>
2020-10-16 03:57:03 -07:00
<NounsExtra>
2020-10-31 04:29:34 -07:00
<details v-if="config.nouns.collapsable" class="border mb-3" ref="dictionarywrapper">
<summary class="bg-light p-3" @click="$refs.collapsabledictionary.loadNouns()">
2020-10-16 03:57:03 -07:00
<h4 class="h5 d-inline">
<Icon v="book"/>
<T>nouns.dictionary</T>
</h4>
</summary>
<div class="border-top">
2020-10-31 04:29:34 -07:00
<Dictionary ref="collapsabledictionary"/>
2020-10-16 03:57:03 -07:00
</div>
</details>
2020-10-31 04:29:34 -07:00
<Dictionary v-else load ref="dictionary"/>
2020-10-16 03:57:03 -07:00
</NounsExtra>
2020-08-04 07:15:41 -07:00
</div>
</template>
<script>
2020-09-23 12:29:55 -07:00
import { head } from "../src/helpers";
2020-11-16 13:22:04 -08:00
import NounsNav from "../data/nouns/NounsNav.vue";
import NounsExtra from "../data/nouns/NounsExtra.vue";
import hash from "../plugins/hash";
2020-08-04 07:15:41 -07:00
export default {
2020-11-16 13:22:04 -08:00
components: { NounsNav, NounsExtra },
mixins: [ hash ],
2020-08-05 03:04:31 -07:00
mounted() {
this.handleHash(this.config.nouns.hashNamespace || '', filter => {
if (this.$refs.dictionarywrapper) {
this.$refs.dictionarywrapper.open = true;
this.$refs.collapsabledictionary.setFilter(filter);
} else {
this.$refs.dictionary.setFilter(filter);
}
});
2020-08-05 03:04:31 -07:00
},
2020-08-04 07:15:41 -07:00
head() {
2020-09-23 12:29:55 -07:00
return head({
2020-11-16 13:22:04 -08:00
title: this.$t('nouns.headerLonger'),
description: this.$t('nouns.description'),
2020-09-23 12:29:55 -07:00
});
2020-08-04 07:15:41 -07:00
},
}
</script>