From b3e8f6edc281508de23d599c2bff314b841afc16 Mon Sep 17 00:00:00 2001 From: svyeh Date: Tue, 18 Jul 2023 21:43:16 +0800 Subject: [PATCH 01/24] add custom layout add a custom-layout and modify page staff --- layouts/app.vue | 161 ++++++++++++++++++++++++++++++++++++++++++ pages/about/staff.vue | 15 ++++ 2 files changed, 176 insertions(+) create mode 100644 layouts/app.vue diff --git a/layouts/app.vue b/layouts/app.vue new file mode 100644 index 0000000000..8881889098 --- /dev/null +++ b/layouts/app.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/pages/about/staff.vue b/pages/about/staff.vue index aff80016f2..7d14c29a09 100644 --- a/pages/about/staff.vue +++ b/pages/about/staff.vue @@ -39,12 +39,26 @@ import CoreH1 from '@/components/core/titles/H1' import i18n from '@/i18n/about/staff.i18n' export default { + layout(context) { + return 'app' + }, + /* + layout(context) { + return this.isAppMode ? 'app' : 'default' + }, */ i18n, name: 'PageStaff', components: { I18nPageWrapper, CoreH1, }, + /* + async fetch() { + const token = this.$nuxt.context.query.token + const store = this.$nuxt.context.store + await store.dispatch('$CCIPwhat?', { token }) + this.isAppMode = ? + }, */ data() { return { memberList: { @@ -284,6 +298,7 @@ export default { { name: 'JunWei Song', photo: 'program/JunWei Song.jpeg' }, ], }, + isAppMode: false, } }, head() { From f426850a372e7d046593ce23138c8783cbec8726 Mon Sep 17 00:00:00 2001 From: svyeh Date: Fri, 21 Jul 2023 22:18:30 +0800 Subject: [PATCH 02/24] fix: switch with ccip add if/else to switch layout with ccip in query --- layouts/{app.vue => ccip.vue} | 0 pages/about/staff.vue | 17 +++++------------ 2 files changed, 5 insertions(+), 12 deletions(-) rename layouts/{app.vue => ccip.vue} (100%) diff --git a/layouts/app.vue b/layouts/ccip.vue similarity index 100% rename from layouts/app.vue rename to layouts/ccip.vue diff --git a/pages/about/staff.vue b/pages/about/staff.vue index 7d14c29a09..d431867def 100644 --- a/pages/about/staff.vue +++ b/pages/about/staff.vue @@ -40,25 +40,18 @@ import i18n from '@/i18n/about/staff.i18n' export default { layout(context) { - return 'app' + const ccip = context.query.ccip // to determine if it's opass mobile app + if (ccip) { + return 'ccip' + } + return 'default' }, - /* - layout(context) { - return this.isAppMode ? 'app' : 'default' - }, */ i18n, name: 'PageStaff', components: { I18nPageWrapper, CoreH1, }, - /* - async fetch() { - const token = this.$nuxt.context.query.token - const store = this.$nuxt.context.store - await store.dispatch('$CCIPwhat?', { token }) - this.isAppMode = ? - }, */ data() { return { memberList: { From ec839e254dac397fb4800352855dfa473deebfe2 Mon Sep 17 00:00:00 2001 From: SeanHsieh Date: Sat, 5 Aug 2023 22:43:21 +0800 Subject: [PATCH 03/24] feat(leaflet): implement venue map --- i18n/venue/index.i18n.js | 6 + nuxt.config.js | 16 +-- package-lock.json | 246 +++++++++++++++++++++++++++++++++------ package.json | 6 +- pages/venue/index.vue | 11 +- pages/venue/venueMap.vue | 112 ++++++++++++++++++ plugins/leaflet.js | 7 ++ static/snake-icon.png | Bin 0 -> 723 bytes 8 files changed, 357 insertions(+), 47 deletions(-) create mode 100644 pages/venue/venueMap.vue create mode 100644 plugins/leaflet.js create mode 100644 static/snake-icon.png diff --git a/i18n/venue/index.i18n.js b/i18n/venue/index.i18n.js index ea5e449bc4..d8c50e076d 100644 --- a/i18n/venue/index.i18n.js +++ b/i18n/venue/index.i18n.js @@ -12,6 +12,9 @@ export default genI18nMessages({ address: 'No. 128, Sec. 2, Academia Rd., Nankang, Taipei 115, Taiwan', }, + venueMap: { + title: 'Venue Map', + }, transMode: { car: 'By Car', publicTransport: 'By Public Transport', @@ -143,6 +146,9 @@ export default genI18nMessages({ name: '中央研究院\n人文社會科學館', address: '台北市南港區研究院路 2 段 128 號', }, + venueMap: { + title: '會場地圖', + }, transMode: { car: '自行開車', publicTransport: '大眾運輸工具', diff --git a/nuxt.config.js b/nuxt.config.js index cd75afce9f..12f13734e6 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -61,11 +61,12 @@ export default { // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins) plugins: [ - '~/plugins/iterator.js', - '~/plugins/http.js', - '~/plugins/strings.js', - '~/plugins/vue-dompurify.js', - '~/plugins/vue-awesome-swiper.js', + { src: '~/plugins/iterator.js' }, + { src: '~/plugins/http.js' }, + { src: '~/plugins/strings.js' }, + { src: '~/plugins/vue-dompurify.js' }, + { src: '~/plugins/vue-awesome-swiper.js' }, + { src: '~/plugins/leaflet.js', mode: 'client' }, ], // Auto import components (https://go.nuxtjs.dev/config-components) @@ -97,7 +98,7 @@ export default { // https://github.com/WilliamDASILVA/nuxt-facebook-pixel-module 'nuxt-facebook-pixel-module', // https://i18n.nuxtjs.org/ - 'nuxt-i18n', + '@nuxtjs/i18n', [ 'nuxt-fontawesome', { @@ -124,7 +125,6 @@ export default { // This module must be at the end of the modules array '@nuxtjs/sitemap', ], - i18n: { strategy: 'prefix', locale: 'en-us', @@ -132,7 +132,7 @@ export default { fallbackLocale: 'en-us', locales: ['en-us', 'zh-hant'], detectBrowserLanguage: { - onlyOnRoot: true, // recommended + redirectOn: 'root', }, }, diff --git a/package-lock.json b/package-lock.json index 3cab27c284..7aac45be69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -133,6 +133,11 @@ "semver": "^6.1.2" } }, + "@babel/helper-environment-visitor": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==" + }, "@babel/helper-explode-assignable-expression": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", @@ -256,6 +261,11 @@ "@babel/types": "^7.14.5" } }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==" + }, "@babel/helper-validator-identifier": { "version": "7.14.9", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", @@ -1154,9 +1164,9 @@ "dev": true }, "@intlify/shared": { - "version": "9.1.7", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.7.tgz", - "integrity": "sha512-zt0zlUdalumvT9AjQNxPXA36UgOndUyvBMplh8uRZU0fhWHAwhnJTcf0NaG9Qvr8I1n3HPSs96+kLb/YdwTavQ==" + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.2.2.tgz", + "integrity": "sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==" }, "@intlify/vue-i18n-extensions": { "version": "1.0.2", @@ -1662,6 +1672,47 @@ } } }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "@jridgewell/trace-mapping": { + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", + "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + }, + "dependencies": { + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" + } + } + }, "@koa/router": { "version": "9.4.0", "resolved": "https://registry.npmjs.org/@koa/router/-/router-9.4.0.tgz", @@ -3124,6 +3175,144 @@ } } }, + "@nuxtjs/i18n": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/@nuxtjs/i18n/-/i18n-7.3.1.tgz", + "integrity": "sha512-DZP6xR8zZA1ApcNjLnukH3BhMRCfi3r236epuXVuPWWOObPf5vkp+VamewnPiSU+zs0Age+PbaaIUryFv/6pDA==", + "requires": { + "@babel/parser": "^7.18.10", + "@babel/traverse": "^7.18.10", + "@intlify/vue-i18n-extensions": "^1.0.2", + "@intlify/vue-i18n-loader": "^1.1.0", + "@nuxt/utils": "2.x", + "cookie": "^0.5.0", + "devalue": "^2.0.1", + "is-https": "^4.0.0", + "js-cookie": "^3.0.1", + "klona": "^2.0.5", + "lodash.merge": "^4.6.2", + "ufo": "^0.8.5", + "vue-i18n": "^8.27.2" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "requires": { + "@babel/highlight": "^7.22.5" + } + }, + "@babel/generator": { + "version": "7.22.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", + "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "requires": { + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "requires": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==" + }, + "@babel/highlight": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", + "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==" + }, + "@babel/template": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "requires": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/traverse": { + "version": "7.22.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", + "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "requires": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/types": "^7.22.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + } + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==" + }, + "klona": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.6.tgz", + "integrity": "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==" + }, + "ufo": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-0.8.6.tgz", + "integrity": "sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw==" + } + } + }, "@nuxtjs/markdownit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@nuxtjs/markdownit/-/markdownit-2.0.0.tgz", @@ -11443,9 +11632,9 @@ } }, "js-cookie": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.0.tgz", - "integrity": "sha512-oUbbplKuH07/XX2YD2+Q+GMiPpnVXaRz8npE7suhBH9QEkJe2W7mQ6rwuMXHue3fpfcftQwzgyvGzIHyfCSngQ==" + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", + "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==" }, "js-tokens": { "version": "4.0.0", @@ -11737,7 +11926,8 @@ "klona": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", - "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==" + "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", + "dev": true }, "koa": { "version": "2.13.1", @@ -11913,6 +12103,11 @@ "launch-editor": "^2.2.1" } }, + "leaflet": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz", + "integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==" + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -12966,32 +13161,6 @@ "@fortawesome/vue-fontawesome": "^0.1.4" } }, - "nuxt-i18n": { - "version": "6.28.1", - "resolved": "https://registry.npmjs.org/nuxt-i18n/-/nuxt-i18n-6.28.1.tgz", - "integrity": "sha512-JKRs8AmixVZ7k90Rrwq468McfnInP1ymuejYHRGA4VV0nZCLYsdDQXZxXl3JXaER9VatM9C24GM3ArAYFOtUhg==", - "requires": { - "@babel/parser": "^7.14.9", - "@babel/traverse": "^7.14.9", - "@intlify/vue-i18n-extensions": "^1.0.2", - "@intlify/vue-i18n-loader": "^1.1.0", - "cookie": "^0.4.1", - "devalue": "^2.0.1", - "is-https": "^4.0.0", - "js-cookie": "^3.0.0", - "klona": "^2.0.4", - "lodash.merge": "^4.6.2", - "ufo": "^0.7.7", - "vue-i18n": "^8.25.0" - }, - "dependencies": { - "cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==" - } - } - }, "nwsapi": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", @@ -19534,9 +19703,9 @@ "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, "vue-i18n": { - "version": "8.25.0", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.25.0.tgz", - "integrity": "sha512-ynhcL+PmTxuuSE1T10htiSXzjBozxYIE3ffbM1RfgAkVbr/v1SP+9Mi/7/uv8ZVV1yGuKjFAYp9BXq+X7op6MQ==" + "version": "8.28.2", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz", + "integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==" }, "vue-jest": { "version": "3.0.7", @@ -19730,6 +19899,11 @@ "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==" }, + "vue2-leaflet": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/vue2-leaflet/-/vue2-leaflet-2.7.1.tgz", + "integrity": "sha512-K7HOlzRhjt3Z7+IvTqEavIBRbmCwSZSCVUlz9u4Rc+3xGCLsHKz4TAL4diAmfHElCQdPPVdZdJk8wPUt2fu6WQ==" + }, "vuex": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", diff --git a/package.json b/package.json index e4b7b70430..9fa321231c 100644 --- a/package.json +++ b/package.json @@ -19,19 +19,21 @@ "@fortawesome/free-regular-svg-icons": "^5.15.4", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@nuxt/http": "^0.6.2", + "@nuxtjs/i18n": "^7.3.1", "@nuxtjs/markdownit": "^2.0.0", "@nuxtjs/sitemap": "^2.4.0", "@tailwindcss/aspect-ratio": "^0.2.1", "core-js": "^3.6.5", "dayjs": "^1.10.6", + "leaflet": "^1.9.4", "nuxt": "^2.15.3", "nuxt-facebook-pixel-module": "^1.5.0", "nuxt-fontawesome": "^0.4.0", - "nuxt-i18n": "^6.18.0", "swiper": "^6.7.5", "uuid": "^8.3.2", "vue-awesome-swiper": "^4.1.1", - "vue-dompurify-html": "^2.3.0" + "vue-dompurify-html": "^2.3.0", + "vue2-leaflet": "^2.7.1" }, "devDependencies": { "@nuxt/types": "^2.14.11", diff --git a/pages/venue/index.vue b/pages/venue/index.vue index 23f52a1e16..664aa7a1fc 100644 --- a/pages/venue/index.vue +++ b/pages/venue/index.vue @@ -30,6 +30,15 @@ v-if="selectedTransModeIndex === 2" > + + + + + @@ -42,7 +51,6 @@ import VenueTab from '@/components/venue/VenueTab.vue' import VenuePublicTransporterTab from '@/components/venue/VenuePublicTransporterTab.vue' import VenueDriveTab from '@/components/venue/VenueDriveTab.vue' import VenueShuttleServiceTab from '@/components/venue/VenueShuttleServiceTab.vue' - export default { i18n, name: 'PageVenue', @@ -54,6 +62,7 @@ export default { VenuePublicTransporterTab, VenueDriveTab, VenueShuttleServiceTab, + VenueMap: () => import('./venueMap.vue'), }, data() { return { diff --git a/pages/venue/venueMap.vue b/pages/venue/venueMap.vue new file mode 100644 index 0000000000..1516c48d9c --- /dev/null +++ b/pages/venue/venueMap.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/plugins/leaflet.js b/plugins/leaflet.js new file mode 100644 index 0000000000..f5438c8424 --- /dev/null +++ b/plugins/leaflet.js @@ -0,0 +1,7 @@ +import Vue from 'vue' +import { LMap, LTileLayer, LMarker } from 'vue2-leaflet' +import 'leaflet/dist/leaflet.css' + +Vue.component('l-map', LMap) +Vue.component('l-tile-layer', LTileLayer) +Vue.component('l-marker', LMarker) diff --git a/static/snake-icon.png b/static/snake-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dd94333df4c5060b752221ae6e74c65ad5be664c GIT binary patch literal 723 zcmV;^0xbQBP)l1rDl0z*|IEI7A(g7ma!vQ*2oz)prY<%Lj~Z)7c;guDmN0Zv2+PZ8~{)*?H@dQ+2+@ z!K1Umy~8iLqv5DA5Fd~Sk{*ME^_T|#!+^|Yvq7IXIAn`fs13!kK@O0eI@XlN4mm;A z(~mt2uUS?Ym>J#?@i-q0iyWm0eR7xnx?|(yd90irv}jSdk{T9S34O)cSmD8q$u*Nh zfhuA`P>N4PD3=(Kk4S{n5Jyyi~yEwrmLeht1b#+*5ukilQirq9}^;iWiWQw8h%4-Io9W002ovPDHLk FV1f?cO%nhB literal 0 HcmV?d00001 From ad9bc1086c55b8bcd2c63a41f41cf519ab4e05dc Mon Sep 17 00:00:00 2001 From: svyeh Date: Sun, 6 Aug 2023 19:00:58 +0800 Subject: [PATCH 04/24] fix-unnecessary components --- layouts/ccip.vue | 108 +----------------------------------------- pages/about/staff.vue | 1 - 2 files changed, 2 insertions(+), 107 deletions(-) diff --git a/layouts/ccip.vue b/layouts/ccip.vue index 8881889098..28c81b4be5 100644 --- a/layouts/ccip.vue +++ b/layouts/ccip.vue @@ -10,114 +10,10 @@ export default { components: {}, data() { - return { - includeArr: ['PageConferenceSchedule'], - } + return {} }, head() { - const conferenceName = this.$store.state.configs.conferenceName - const conferenceYear = this.$store.state.configs.conferenceYear - return { - titleTemplate: (titleChunk) => { - const title = `${conferenceName} ${conferenceYear}` - return titleChunk && titleChunk !== title - ? `${titleChunk} | ${title}` - : title - }, - meta: [ - { charset: 'utf-8' }, - { - name: 'viewport', - content: 'width=device-width, initial-scale=1', - }, - { - hid: 'description', - name: 'description', - content: `${conferenceName} ${conferenceYear}`, - }, - { - hid: 'og:title', - property: 'og:title', - content: `${conferenceName} ${conferenceYear}`, - }, - { - hid: 'og:description', - property: 'og:description', - content: `${conferenceName} ${conferenceYear}`, - }, - { - hid: 'og:image', - property: 'og:image', - content: 'https://tw.pycon.org/2023/og-img.jpg', - }, - { - hid: 'og:url', - property: 'og:url', - content: 'https://tw.pycon.org' + this.$route.path, - }, - { hid: 'og:type', property: 'og:type', content: 'website' }, - ], - link: [ - { - rel: 'icon', - type: 'image/x-icon', - href: `/${conferenceYear}/favicon.ico`, - }, - { - rel: 'preconnect', - href: 'https://fonts.googleapis.com', - }, - { - rel: 'preconnect', - href: 'https://fonts.gstatic.com', - crossorigin: 'anonymous', - }, - { - rel: 'stylesheet', - href: 'https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@400;500;600;700;900&family=Source+Sans+Pro:wght@400;600;700;900&display=swap', - }, - { - rel: 'canonical', - href: 'https://tw.pycon.org' + this.$route.path, - }, - { - rel: 'alternate', - hreflang: 'x-default', - href: `https://tw.pycon.org/${conferenceYear}/en-us`, - }, - { - rel: 'alternate', - hreflang: 'en-us', - href: `https://tw.pycon.org/${conferenceYear}/en-us`, - }, - { - rel: 'alternate', - hreflang: 'zh-hant-tw', - href: `https://tw.pycon.org/${conferenceYear}/zh-hant`, - }, - ], - script: [ - { - type: 'application/ld+json', - json: { - '@context': 'https://schema.org', - '@type': 'Organization', - name: 'PyCon Taiwan', - url: 'https://tw.pycon.org', - logo: `https://tw.pycon.org/${conferenceYear}/og-img.jpg`, - sameAs: [ - 'https://www.facebook.com/pycontw/', - 'https://twitter.com/PyConTW/', - 'https://www.linkedin.com/company/pycontw', - 'https://www.youtube.com/channel/UCHLnNgRnfGYDzPCCH8qGbQw', - 'https://instagram.com/pycontw/', - 'https://github.com/pycontw/', - 'https://conf.python.tw', - ], - }, - }, - ], - } + return {} }, } diff --git a/pages/about/staff.vue b/pages/about/staff.vue index d431867def..afd2213034 100644 --- a/pages/about/staff.vue +++ b/pages/about/staff.vue @@ -291,7 +291,6 @@ export default { { name: 'JunWei Song', photo: 'program/JunWei Song.jpeg' }, ], }, - isAppMode: false, } }, head() { From e8150c6a6a30f2dbbef3fd54785768222ed486f4 Mon Sep 17 00:00:00 2001 From: svyeh Date: Sun, 6 Aug 2023 19:22:53 +0800 Subject: [PATCH 05/24] fix-unnecessary components related feature that related to #299 --- layouts/ccip.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/ccip.vue b/layouts/ccip.vue index 28c81b4be5..e74e5e7fee 100644 --- a/layouts/ccip.vue +++ b/layouts/ccip.vue @@ -1,7 +1,8 @@ From a724085486b9b49093d65ab9cae4c6011e8ec223 Mon Sep 17 00:00:00 2001 From: Josix Date: Fri, 4 Aug 2023 17:07:30 +0800 Subject: [PATCH 06/24] fix(header): reduce horizontal padding in header #429 --- components/core/header/Header.vue | 4 ++-- components/core/header/HomeIcon.vue | 3 ++- components/core/header/locale-switch/LocaleSwitch.vue | 1 + components/core/header/nav-bar/NavBar.vue | 2 +- components/core/header/nav-bar/NavBarItemDropdown.vue | 2 +- components/core/header/nav-bar/ScrollableNavBar.vue | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/core/header/Header.vue b/components/core/header/Header.vue index 6494a6088f..4d86d51a0f 100644 --- a/components/core/header/Header.vue +++ b/components/core/header/Header.vue @@ -25,8 +25,8 @@ import HomeIcon from './HomeIcon' import NavBar from './nav-bar/NavBar' import NavBarHamburger from './nav-bar/NavBarHamburger' -import ScrollableNavBar from './nav-bar/ScrollableNavBar' import LocaleSwitch from './locale-switch/LocaleSwitch' +import ScrollableNavBar from './nav-bar/ScrollableNavBar' export default { name: 'CoreHeader', components: { @@ -47,7 +47,7 @@ export default { } .header__nav-bar { - @apply flex w-full items-center justify-between px-4; + @apply flex w-full items-center justify-between px-2; pointer-events: auto; /*enable click-through ScrollableNavBar*/ } .header-container, diff --git a/components/core/header/HomeIcon.vue b/components/core/header/HomeIcon.vue index e86bdb26b0..3067a17fe4 100644 --- a/components/core/header/HomeIcon.vue +++ b/components/core/header/HomeIcon.vue @@ -1,7 +1,7 @@