From a5c4cd0f518648fce0aeeb1bb764fb99fcc020d4 Mon Sep 17 00:00:00 2001 From: axolotle Date: Wed, 7 Jul 2021 21:28:27 +0200 Subject: [PATCH] add GalleryView component --- src/helpers/common.js | 12 ++ src/messages/fr.json | 8 +- src/pages/gallery/GalleryView.vue | 191 ++++++++++++++++++++++++++++++ src/pages/gallery/index.js | 1 + 4 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 src/pages/gallery/GalleryView.vue create mode 100644 src/pages/gallery/index.js diff --git a/src/helpers/common.js b/src/helpers/common.js index 42259a0..71364b4 100644 --- a/src/helpers/common.js +++ b/src/helpers/common.js @@ -8,3 +8,15 @@ export function toCommaList (arr, key = 'name') { if (!arr) return return arr.map(item => item[key]).join(', ') } + + +export function shuffle (a) { + let j, x, i + for (i = a.length - 1; i > 0; i--) { + j = Math.floor(Math.random() * (i + 1)) + x = a[i] + a[i] = a[j] + a[j] = x + } + return a +} diff --git a/src/messages/fr.json b/src/messages/fr.json index 5f861ce..af73408 100644 --- a/src/messages/fr.json +++ b/src/messages/fr.json @@ -46,8 +46,12 @@ "text": { "read": "Voir le texte", "read-origin": "Voir le texte de départ", - "read-artwork": "Voir l'œuvre" + "read-artwork": "Voir l'œuvre", + "open-origin": "Texte de référence", + "open-artwork": "Texte de l'œuvre" }, "history": "Historique de consultation", - "from": "à partir de :" + "from": "à partir de :", + "map": "Carte", + "index": "Index" } diff --git a/src/pages/gallery/GalleryView.vue b/src/pages/gallery/GalleryView.vue new file mode 100644 index 0000000..f7e15a9 --- /dev/null +++ b/src/pages/gallery/GalleryView.vue @@ -0,0 +1,191 @@ + + + + + diff --git a/src/pages/gallery/index.js b/src/pages/gallery/index.js new file mode 100644 index 0000000..3d753ff --- /dev/null +++ b/src/pages/gallery/index.js @@ -0,0 +1 @@ +export { default as GalleryView } from './GalleryView'