From ee5be01638d5ed4ffc12327d1309c89640a8f178 Mon Sep 17 00:00:00 2001 From: Nikki Date: Fri, 24 Feb 2023 10:39:12 +0800 Subject: [PATCH 1/8] add tech stack icon --- components/Icon/Node.vue | 18 ++++++++++++++++++ components/TechStack.vue | 1 + 2 files changed, 19 insertions(+) create mode 100644 components/Icon/Node.vue diff --git a/components/Icon/Node.vue b/components/Icon/Node.vue new file mode 100644 index 0000000..39e1234 --- /dev/null +++ b/components/Icon/Node.vue @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/components/TechStack.vue b/components/TechStack.vue index 4677e58..5e98874 100644 --- a/components/TechStack.vue +++ b/components/TechStack.vue @@ -7,6 +7,7 @@
+ From e9ce222cd18304becab05ca84ff6cf87fe043b1d Mon Sep 17 00:00:00 2001 From: Nikki Date: Wed, 8 Mar 2023 22:28:28 +0800 Subject: [PATCH 2/8] add tech stack icons --- components/Icon/Angular.vue | 3 +++ components/Icon/Gcp.vue | 3 +++ components/Icon/Node.vue | 21 +++------------------ components/Icon/React.vue | 3 +++ components/TechStack.vue | 6 ++++-- 5 files changed, 16 insertions(+), 20 deletions(-) create mode 100644 components/Icon/Angular.vue create mode 100644 components/Icon/Gcp.vue create mode 100644 components/Icon/React.vue diff --git a/components/Icon/Angular.vue b/components/Icon/Angular.vue new file mode 100644 index 0000000..f762fe1 --- /dev/null +++ b/components/Icon/Angular.vue @@ -0,0 +1,3 @@ + diff --git a/components/Icon/Gcp.vue b/components/Icon/Gcp.vue new file mode 100644 index 0000000..50fc0a0 --- /dev/null +++ b/components/Icon/Gcp.vue @@ -0,0 +1,3 @@ + diff --git a/components/Icon/Node.vue b/components/Icon/Node.vue index 39e1234..4929d82 100644 --- a/components/Icon/Node.vue +++ b/components/Icon/Node.vue @@ -1,18 +1,3 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/components/Icon/React.vue b/components/Icon/React.vue new file mode 100644 index 0000000..b45bc58 --- /dev/null +++ b/components/Icon/React.vue @@ -0,0 +1,3 @@ + diff --git a/components/TechStack.vue b/components/TechStack.vue index 5e98874..4e2661a 100644 --- a/components/TechStack.vue +++ b/components/TechStack.vue @@ -7,14 +7,16 @@
+ - + - + +
From ae15c321b790140729f24ecfc20ab1fe182bedd7 Mon Sep 17 00:00:00 2001 From: Nikki Date: Wed, 8 Mar 2023 22:31:51 +0800 Subject: [PATCH 3/8] revisions to ga setup --- plugins/vue-gtag.js | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/plugins/vue-gtag.js b/plugins/vue-gtag.js index 7e064e5..8f7a6e7 100644 --- a/plugins/vue-gtag.js +++ b/plugins/vue-gtag.js @@ -1,6 +1,34 @@ -import Vue from 'vue' -import VueGtag from 'vue-gtag' +export default ({ app }) => { + /* + ** Only run on client-side and only in production mode + */ + if (process.env.NODE_ENV === 'production' && process.client) { -Vue.use(VueGtag, { - config: { id: process.env.GOOGLE_ANALYTICS_ID } -}) \ No newline at end of file + const analyticsID = process.env.GOOGLE_ANALYTICS_ID + + // first check to see if our script is already in the DOM + const myScriptExists = Boolean( + document.querySelector( + `head > script[src="https://www.googletagmanager.com/gtag/js?id=${analyticsID}"]` + ) + ) + + if (!myScriptExists) { + // if it isn't already in the DOM, create and insert our script + const myScript = document.createElement('script') + myScript.type = 'text/javascript' + myScript.src = `https://www.googletagmanager.com/gtag/js?id=${analyticsID}` + myScript.hid = 'gtm' + myScript.async = true + document.head.appendChild(myScript); + } + + // part 2 of Google Analytics script + window.dataLayer = window.dataLayer || []; + // eslint-disable-next-line no-undef + function gtag() { dataLayer.push(arguments); } + gtag('js', new Date()); + gtag('set', { cookie_flags: 'SameSite=None;Secure' }); + gtag('config', `${analyticsID}`); + } +} \ No newline at end of file From d7726e1fe6cd6bc313e074b8b66fd56be8688c39 Mon Sep 17 00:00:00 2001 From: Nikki Date: Wed, 8 Mar 2023 22:38:02 +0800 Subject: [PATCH 4/8] update tech stack text --- components/TechStack.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/TechStack.vue b/components/TechStack.vue index 4e2661a..49b8f41 100644 --- a/components/TechStack.vue +++ b/components/TechStack.vue @@ -1,7 +1,7 @@