123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <template>
- <div class="h-100">
- <!-- BACKGROUND (mode) -->
- <!-- <component :is="mode" /> -->
- <!-- FOREGROUND (texts) -->
- <section v-for="group in groups" :key="group.id" class="split-screen">
- <text-card :id="group.id" />
- <div>
- <text-card v-for="id in group.prod" :key="id" :id="id" />
- </div>
- </section>
- </div>
- </template>
- <script>
- import { CardList, CardMap, TreeMap } from './library'
- import TextCard from '@/components/text/TextCard'
- export default {
- name: 'Library',
- components: {
- // CardList,
- // CardMap,
- // TreeMap,
- TextCard
- },
- metaInfo () {
- return {
- title: this.groups.length ? 'Bibliothèque - ' + this.groups[0].id : 'Bibliothèque',
- meta: [
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' }
- ]
- }
- },
- props: {
- mode: { type: String, required: true },
- texts: { type: Array, required: true }
- },
- computed: {
- groups () {
- return this.texts.map(text => {
- const [id, ...prod] = text
- return { id, prod }
- })
- }
- },
- methods: {
- openText () {
- this.$router.push({
- query: {
- mode: this.mode,
- texts: [...this.texts, [50]]
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- </style>
|