2020-08-04 07:15:41 -07:00
|
|
|
<template>
|
|
|
|
<div class="container">
|
2020-09-11 03:17:29 -07:00
|
|
|
<h2>
|
2020-08-04 07:15:41 -07:00
|
|
|
<Icon v="atom-alt"/>
|
2020-09-28 08:51:26 -07:00
|
|
|
<T>nouns.headerLong</T>
|
2020-09-11 03:17:29 -07:00
|
|
|
</h2>
|
2020-08-04 07:15:41 -07:00
|
|
|
|
|
|
|
<section>
|
2020-09-28 08:51:26 -07:00
|
|
|
<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-10-12 11:28:20 -07:00
|
|
|
import NounsExtra from "../data/nouns/NounsExtra.vue";
|
2020-08-04 07:15:41 -07:00
|
|
|
|
|
|
|
export default {
|
2020-10-12 11:28:20 -07:00
|
|
|
components: { NounsExtra },
|
2020-08-05 03:04:31 -07:00
|
|
|
mounted() {
|
2020-10-09 15:13:00 -07:00
|
|
|
if (process.client) {
|
|
|
|
if (window.location.hash) {
|
2020-10-12 12:07:10 -07:00
|
|
|
const anchor = decodeURIComponent(window.location.hash.substr(1));
|
|
|
|
this.$nextTick(_ => {
|
|
|
|
const $anchor = document.getElementById(anchor);
|
|
|
|
if ($anchor) {
|
|
|
|
$anchor.scrollIntoView();
|
|
|
|
} else {
|
2020-10-31 04:29:34 -07:00
|
|
|
if (this.$refs.dictionarywrapper) {
|
|
|
|
this.$refs.dictionarywrapper.open = true;
|
|
|
|
this.$refs.collapsabledictionary.setFilter(anchor);
|
|
|
|
} else {
|
|
|
|
this.$refs.dictionary.setFilter(anchor);
|
|
|
|
}
|
2020-10-12 12:07:10 -07:00
|
|
|
}
|
|
|
|
})
|
2020-10-09 15:13:00 -07:00
|
|
|
}
|
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-09-28 10:22:36 -07:00
|
|
|
title: this.$t('nouns.headerLong'),
|
|
|
|
description: this.$t('nouns.description'),
|
2020-09-23 12:29:55 -07:00
|
|
|
banner: 'bannerNouns.png',
|
|
|
|
});
|
2020-08-04 07:15:41 -07:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|