From 1ec83b318a5bf52185cc88489137aa04d80c59f7 Mon Sep 17 00:00:00 2001 From: axolotle Date: Sun, 9 May 2021 00:08:01 +0200 Subject: [PATCH] add some debug styling and display notes data in content --- src/assets/scss/main.scss | 38 +++++++++++++++++++ src/components/text/TextCard.vue | 15 +++++--- src/components/text/TextCardBase.vue | 57 ++++++++++++++++++++++------ src/components/text/TextMiniCard.vue | 5 +++ src/messages/fr.json | 5 ++- src/pages/library/CardList.vue | 3 +- 6 files changed, 105 insertions(+), 18 deletions(-) diff --git a/src/assets/scss/main.scss b/src/assets/scss/main.scss index ee138ea..8fb139d 100644 --- a/src/assets/scss/main.scss +++ b/src/assets/scss/main.scss @@ -34,3 +34,41 @@ main { width: 100%; height: 100%; } + + +// TEMP +.text-authors { + font: { + size: 1.2em; + } +} + +.text-title { + font: { + size: 1em; + style: italic; + weight: normal; + } +} + +.text-edition { + font: { + size: .8em; + weight: normal; + } +} + +.clickable { + cursor: pointer; +} + +.card-footer { + display: flex; + justify-content: space-between; +} + +.tags { + > :not(:last-of-type) { + margin-right: .5rem; + } +} diff --git a/src/components/text/TextCard.vue b/src/components/text/TextCard.vue index dd3bc94..26ba983 100644 --- a/src/components/text/TextCard.vue +++ b/src/components/text/TextCard.vue @@ -22,18 +22,19 @@ {{ $t('siblings') }}
-
- {{ toCommaList(sibling.authors) }}, - {{ sibling.title }}, - {{ sibling.edition }} +
+ {{ toCommaList(sibling.authors) }}, + {{ sibling.title }}, + {{ text.edition ? text.edition.name : text.edition }}
@@ -61,6 +62,10 @@ export default { this.$emit('open', id, childId) }, + onSiblingOpen (_, id) { + this.$emit('open', id) + }, + onSelfClose (e, id) { // stop the click event propagation to avoid other listeners to interact with a soon to be deleted element. e.stopPropagation() diff --git a/src/components/text/TextCardBase.vue b/src/components/text/TextCardBase.vue index 25a7f52..84f4f3d 100644 --- a/src/components/text/TextCardBase.vue +++ b/src/components/text/TextCardBase.vue @@ -5,27 +5,62 @@

- + +
+ +
+
+

+ Numéro de note : {{ note.number || 'aucun ?' }} +

+ +

+ Contenu : +

+
+
+ Aucun ? +
+ +

+ Liens : +

+
    +
  • + {{ toCommaList(link.authors) }}, + {{ link.title }} — + {{ link.families[0].name }} + (id: {{ link.id }}) +
  • +
+
+ Aucun +
+
+
+ - - {{ tag.name }} - +
+ + {{ tag.name }} + +
diff --git a/src/components/text/TextMiniCard.vue b/src/components/text/TextMiniCard.vue index a55a2a5..3029109 100644 --- a/src/components/text/TextMiniCard.vue +++ b/src/components/text/TextMiniCard.vue @@ -1,5 +1,10 @@ diff --git a/src/messages/fr.json b/src/messages/fr.json index c0083ea..b8fc471 100644 --- a/src/messages/fr.json +++ b/src/messages/fr.json @@ -29,5 +29,8 @@ "title": "Rechercher" } }, - "siblings": "Textes rebonds" + "siblings": "Textes rebonds", + "text": { + "read": "Voir le texte" + } } diff --git a/src/pages/library/CardList.vue b/src/pages/library/CardList.vue index 211ff7b..d39253a 100644 --- a/src/pages/library/CardList.vue +++ b/src/pages/library/CardList.vue @@ -7,7 +7,7 @@ v-for="parent in parents" :key="parent.id" :id="parent.id" :text-data="parent" - @click.native="$emit('open', parent.id)" + @open="$emit('open', $event)" />
@@ -15,6 +15,7 @@