From b114754da7a302a496ba1758bb41341d89fffabc Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Fri, 17 Apr 2020 12:37:37 -0400 Subject: [PATCH 1/7] Decrease debounce on search to 150ms --- pages/search.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/search.vue b/pages/search.vue index 987d9e5..c3b34aa 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -48,7 +48,7 @@ export default { keywords: keywords && R.split(',', keywords), tags: tags && R.split(',', tags), } - }, 500) + }, 150) }, searchInput(searchInput) { this.resources = this.$store.getters['data/findBySearchInputs'](searchInput.keywords, searchInput.tags) From ee06cb0caf913952b1589fd44ef28abaa9b109bc Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Fri, 17 Apr 2020 12:58:51 -0400 Subject: [PATCH 2/7] Load search from query --- components/Search.vue | 13 +++++++++++-- pages/search.vue | 7 +++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/components/Search.vue b/components/Search.vue index 5bc4360..21abe33 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -32,12 +32,21 @@ export default { const searchParams = new URLSearchParams() if (isNotEmpty(titles)) searchParams.append('keywords', titles) - if (isNotEmpty(tags)) + if (isNotEmpty(tags)) searchParams.append('tags', R.map(this.removeFirstChar, tags)) - + this.$router.push(this.searchPath + '?' + searchParams.toString()) }, }, + mounted() { + let keywords = this.$route.query.keywords || '' + keywords = keywords.split(',').join(' ') + + let tags = this.$route.query.tags || '' + tags = R.filter(this.isTag, tags.split(',')).map(tag => `#${tag}`).join(' ') + + this.searchInput = `${tags} ${keywords}`.trim() + }, } diff --git a/pages/search.vue b/pages/search.vue index c3b34aa..b9bdc2e 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -56,6 +56,13 @@ export default { }, mounted() { this.showTitle = true + + const keywords = this.$route.query.keywords + const tags = this.$route.query.tags + this.searchInput = { + keywords: keywords && R.split(',', keywords), + tags: tags && R.split(',', tags), + } }, methods: { async createCopyUrl(resource) { From 3a4f384517aadf7920bf4829beb8fb8d068f4704 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Fri, 17 Apr 2020 13:01:11 -0400 Subject: [PATCH 3/7] Reduce debounce time to 100ms --- pages/search.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/search.vue b/pages/search.vue index b9bdc2e..7767d6e 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -48,7 +48,7 @@ export default { keywords: keywords && R.split(',', keywords), tags: tags && R.split(',', tags), } - }, 150) + }, 100) }, searchInput(searchInput) { this.resources = this.$store.getters['data/findBySearchInputs'](searchInput.keywords, searchInput.tags) From c77e9072f52a48a09c062394f5a89d0bdf6e4d75 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Sat, 18 Apr 2020 10:17:09 -0400 Subject: [PATCH 4/7] Increase debounce time to 300ms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: wellá --- pages/search.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/search.vue b/pages/search.vue index 7767d6e..c998fd8 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -48,7 +48,7 @@ export default { keywords: keywords && R.split(',', keywords), tags: tags && R.split(',', tags), } - }, 100) + }, 300) }, searchInput(searchInput) { this.resources = this.$store.getters['data/findBySearchInputs'](searchInput.keywords, searchInput.tags) From 11b67a8bfcc764cee04baa4b1f37232afde85d25 Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Sat, 18 Apr 2020 10:35:47 -0400 Subject: [PATCH 5/7] Enter listener on Search --- components/Search.vue | 6 +++++- pages/search.vue | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/Search.vue b/components/Search.vue index 21abe33..c77ac29 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -1,5 +1,5 @@ + + + {{ HEAD }} diff --git a/components/OptOutIframe.vue b/components/OptOutIframe.vue deleted file mode 100644 index 600c98a..0000000 --- a/components/OptOutIframe.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/components/Search.vue b/components/Search.vue index c77ac29..1b79186 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -13,20 +13,6 @@ export default { searchPath: '/search', } }, - methods: { - // isTag :: String -> Bool - isTag: R.startsWith('#'), - - // removeFirstChar :: String -> String - removeFirstChar: R.compose( - R.join(''), - R.adjust(0, () => '') - ), - onEnter() { - const searchParams = new URLSearchParams({ ...this.$route.query, enter: true }) - this.$router.push(this.searchPath + '?' + searchParams.toString()) - }, - }, watch: { searchInput(input) { const words = R.filter(isNotEmpty, R.split(' ', input)) @@ -51,6 +37,20 @@ export default { this.searchInput = `${tags} ${keywords}`.trim() }, + methods: { + // isTag :: String -> Bool + isTag: R.startsWith('#'), + + // removeFirstChar :: String -> String + removeFirstChar: R.compose( + R.join(''), + R.adjust(0, () => ''), + ), + onEnter() { + const searchParams = new URLSearchParams({ ...this.$route.query, enter: true }) + this.$router.push(this.searchPath + '?' + searchParams.toString()) + }, + }, } diff --git a/components/Sidebar.vue b/components/Sidebar.vue index 2a652e2..66ec821 100644 --- a/components/Sidebar.vue +++ b/components/Sidebar.vue @@ -5,9 +5,7 @@ //- nuxt-link(:to='$i18n.path(category.slug)') {{ category.title }} nuxt-link(:to='category.slug') {{ category.title }} hr - nuxt-link(to='/privacy-policy') Privacy Policy - nuxt-link(to='/cookie-policy') Cookie Policy - nuxt-link(to='/imprint') Imprint + nuxt-link(to='/legal-notice') Legal Notice hr div(class="toggleWrapper" @click="toggleCardsVisible") div(class="viewToggle" :class="{active: areCardsVisible}") Cards diff --git a/nuxt.config.js b/nuxt.config.js index f08a356..d8a138b 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -62,10 +62,6 @@ export default { plugins: [ '~/plugins/i18n.js', - { - src: '~/plugins/vue-matomo.js', - ssr: false, - }, ], /* ** Nuxt.js modules diff --git a/package.json b/package.json index 843b501..8af4eb9 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ "nuxt": "^2.4.0", "nuxt-clipboard2": "^0.2.1", "vue-i18n": "^8.11.2", - "ramda": "^0.26.1", - "vue-matomo": "^3.12.0-5" + "ramda": "^0.26.1" }, "devDependencies": { "@babel/core": "^7.6.4", diff --git a/pages/cookie-policy.vue b/pages/cookie-policy.vue deleted file mode 100644 index 5e75323..0000000 --- a/pages/cookie-policy.vue +++ /dev/null @@ -1,56 +0,0 @@ - - - - - \ No newline at end of file diff --git a/pages/imprint.vue b/pages/legal-notice.vue similarity index 98% rename from pages/imprint.vue rename to pages/legal-notice.vue index a3436cb..1a918ed 100644 --- a/pages/imprint.vue +++ b/pages/legal-notice.vue @@ -1,6 +1,6 @@