diff options
author | Zero~Informatique | 2022-04-12 21:35:24 +0200 |
---|---|---|
committer | Zero~Informatique | 2022-04-12 21:35:24 +0200 |
commit | 581029f1b15b51f90812a47b20bce454014da32a (patch) | |
tree | 7bd0c65e680202b8c48ed9d875b9d0c45223b9e2 /viewer/src/components/item_handlers | |
parent | 2f9e51b5cd7dfafadac90ec896edd365da12a1c8 (diff) | |
download | ldgallery-581029f1b15b51f90812a47b20bce454014da32a.tar.gz |
viewer: add markdown item handler
Minor CSS fixes
Comment for future upgrade to Vue3
Diffstat (limited to 'viewer/src/components/item_handlers')
-rw-r--r-- | viewer/src/components/item_handlers/LdMarkdownViewer.vue | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/viewer/src/components/item_handlers/LdMarkdownViewer.vue b/viewer/src/components/item_handlers/LdMarkdownViewer.vue index ecebbcf..3b9a8d6 100644 --- a/viewer/src/components/item_handlers/LdMarkdownViewer.vue +++ b/viewer/src/components/item_handlers/LdMarkdownViewer.vue | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | <template> | 21 | <template> |
22 | <b-loading v-if="isLoading" active /> | 22 | <b-loading v-if="isLoading" active /> |
23 | <Markdown v-else-if="markdown" class="flex-grow-1" :markdown="markdown" /> | 23 | <Markdown v-else-if="markdown" :class="$style.container" :markdown="markdown" /> |
24 | </template> | 24 | </template> |
25 | 25 | ||
26 | <script lang="ts"> | 26 | <script lang="ts"> |
@@ -48,6 +48,7 @@ export default class LdMarkdownViewer extends Vue { | |||
48 | return this.$galleryStore.resourceRoot + this.item.properties.resource; | 48 | return this.$galleryStore.resourceRoot + this.item.properties.resource; |
49 | } | 49 | } |
50 | 50 | ||
51 | // TODO: Identical to SplashScreen.vue, use composition with Vue3. | ||
51 | fetchMarkdown() { | 52 | fetchMarkdown() { |
52 | FetchWithCheck.get(this.itemResourceUrl) | 53 | FetchWithCheck.get(this.itemResourceUrl) |
53 | .then(response => response.text()) | 54 | .then(response => response.text()) |
@@ -69,14 +70,7 @@ export default class LdMarkdownViewer extends Vue { | |||
69 | </script> | 70 | </script> |
70 | 71 | ||
71 | <style lang="scss" module> | 72 | <style lang="scss" module> |
72 | .splashscreen { | 73 | .container { |
73 | display: flex; | 74 | padding: 8px; |
74 | flex-flow: column; | ||
75 | align-items: center; | ||
76 | padding: 32px; | ||
77 | } | ||
78 | .buttonOkay { | ||
79 | min-width: 310px; | ||
80 | align-self: center; | ||
81 | } | 75 | } |
82 | </style> | 76 | </style> |