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 @@ + + + + + + + + + + + + + + {{ $t('text.open-origin') }} + + + + {{ $t('text.open-artwork') }} + + + + + + + {{ toCommaList(node.authors) }}, + , + {{ node.date.start }} + + + + + + + + + + + + + + + + + + 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'
+ {{ toCommaList(node.authors) }}, + , + {{ node.date.start }} +