2020-10-10 09:31:31 -07:00
|
|
|
<template>
|
2020-11-29 02:03:01 -08:00
|
|
|
<div>
|
2020-10-10 09:31:31 -07:00
|
|
|
<h2>
|
|
|
|
<Icon v="map-marker-question"/>
|
|
|
|
<T>faq.headerLong</T>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<section>
|
2020-12-17 13:18:18 -08:00
|
|
|
<details v-for="question in Object.keys($t('faq.questions'))" class="border mb-3" :id="question" :ref="question.replace(/-/g, '_')" @click="setHash('', question)">
|
2020-10-10 09:31:31 -07:00
|
|
|
<summary class="bg-light p-3"><T>faq.questions.{{question}}.question</T></summary>
|
|
|
|
<div class="p-3 border-top">
|
|
|
|
<T>faq.questions.{{question}}.answer</T>
|
|
|
|
</div>
|
|
|
|
</details>
|
|
|
|
</section>
|
2020-10-11 07:27:21 -07:00
|
|
|
|
|
|
|
<section>
|
|
|
|
<Share :title="$t('faq.headerLong')"/>
|
|
|
|
</section>
|
2020-10-10 09:31:31 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-10-10 10:28:01 -07:00
|
|
|
import { head } from "../src/helpers";
|
2020-12-17 13:18:18 -08:00
|
|
|
import hash from "../plugins/hash";
|
2020-10-10 10:28:01 -07:00
|
|
|
|
2020-10-10 09:31:31 -07:00
|
|
|
export default {
|
2020-12-17 13:18:18 -08:00
|
|
|
mixins: [ hash ],
|
2020-10-10 09:31:31 -07:00
|
|
|
mounted() {
|
2020-12-17 13:18:18 -08:00
|
|
|
this.handleHash('', hash => {
|
|
|
|
const $el = this.$refs[hash.replace(/-/g, '_')];
|
2020-10-10 09:31:31 -07:00
|
|
|
if (!$el) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$el[0].open = true;
|
|
|
|
$el[0].focus();
|
|
|
|
$el[0].scrollIntoView();
|
|
|
|
setTimeout(_ => {
|
|
|
|
$el[0].scrollIntoView();
|
|
|
|
}, 1000);
|
2020-12-17 13:18:18 -08:00
|
|
|
}, false)
|
2020-10-10 09:31:31 -07:00
|
|
|
},
|
2020-10-10 10:28:01 -07:00
|
|
|
head() {
|
|
|
|
return head({
|
|
|
|
title: this.$t('faq.headerLong'),
|
|
|
|
});
|
|
|
|
},
|
2020-10-10 09:31:31 -07:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
details {
|
|
|
|
summary {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|