From c1367091765bf69a9ba063f4551059dae345f022 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 21 Sep 2022 16:20:21 +0200 Subject: Data info for a model --- assets/sass/_models.sass | 5 ++++ nuxt.config.js | 2 +- package-lock.json | 33 +++++++++++++++++++++++ package.json | 1 + pages/models/_id.vue | 69 ++++++++++++++++++++++++++++++++++++++++++++++-- plugins/vue-moment.js | 7 +++++ 6 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 plugins/vue-moment.js diff --git a/assets/sass/_models.sass b/assets/sass/_models.sass index 001a4ec..40ce314 100644 --- a/assets/sass/_models.sass +++ b/assets/sass/_models.sass @@ -4,3 +4,8 @@ .grid-mini grid-template-rows: 7rem + + .card + h3 + &+ svg + float: right diff --git a/nuxt.config.js b/nuxt.config.js index d85fdc0..4c7f57c 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -24,7 +24,7 @@ export default { css: [], // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins - plugins: ["~plugins/vue-toastification.js"], + plugins: ["~plugins/vue-toastification.js", "~plugins/vue-moment.js"], // Auto import components: https://go.nuxtjs.dev/config-components components: true, diff --git a/package-lock.json b/package-lock.json index d8c72d5..85a1aa6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "pug-plain-loader": "^1.1.0", "vue": "^2.6.14", "vue-3d-model": "^1.4.1", + "vue-moment": "^4.1.0", "vue-server-renderer": "^2.6.14", "vue-template-compiler": "^2.6.14", "vue-toastification": "^1.7.14", @@ -10812,6 +10813,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", + "engines": { + "node": "*" + } + }, "node_modules/move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -18663,6 +18672,17 @@ "deepmerge": "^4.2.2" } }, + "node_modules/vue-moment": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vue-moment/-/vue-moment-4.1.0.tgz", + "integrity": "sha512-Gzisqpg82ItlrUyiD9d0Kfru+JorW2o4mQOH06lEDZNgxci0tv/fua1Hl0bo4DozDV2JK1r52Atn/8QVCu8qQw==", + "dependencies": { + "moment": "^2.19.2" + }, + "peerDependencies": { + "vue": ">=1.x.x" + } + }, "node_modules/vue-no-ssr": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz", @@ -28466,6 +28486,11 @@ "integrity": "sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA==", "dev": true }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", @@ -34529,6 +34554,14 @@ "deepmerge": "^4.2.2" } }, + "vue-moment": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/vue-moment/-/vue-moment-4.1.0.tgz", + "integrity": "sha512-Gzisqpg82ItlrUyiD9d0Kfru+JorW2o4mQOH06lEDZNgxci0tv/fua1Hl0bo4DozDV2JK1r52Atn/8QVCu8qQw==", + "requires": { + "moment": "^2.19.2" + } + }, "vue-no-ssr": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/vue-no-ssr/-/vue-no-ssr-1.1.1.tgz", diff --git a/package.json b/package.json index bd01bbf..cb5f1cf 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "pug-plain-loader": "^1.1.0", "vue": "^2.6.14", "vue-3d-model": "^1.4.1", + "vue-moment": "^4.1.0", "vue-server-renderer": "^2.6.14", "vue-template-compiler": "^2.6.14", "vue-toastification": "^1.7.14", diff --git a/pages/models/_id.vue b/pages/models/_id.vue index 89abf3a..b5c3e2e 100644 --- a/pages/models/_id.vue +++ b/pages/models/_id.vue @@ -1,6 +1,9 @@ diff --git a/plugins/vue-moment.js b/plugins/vue-moment.js new file mode 100644 index 0000000..43f689c --- /dev/null +++ b/plugins/vue-moment.js @@ -0,0 +1,7 @@ +import Vue from "vue"; + +import moment from "moment"; +import "moment/locale/it"; +import vuemoment from "vue-moment"; + +Vue.use(vuemoment, { moment }); -- cgit v1.2.3-18-g5258