Skip to content

Commit

Permalink
Added google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
thebspin committed Mar 25, 2020
1 parent 0705a56 commit 2f14322
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
8 changes: 7 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ export default {
*/
buildModules: [
// Doc: https://github.com/nuxt-community/eslint-module
"@nuxtjs/eslint-module"
"@nuxtjs/eslint-module",
[
"@nuxtjs/google-analytics",
{
id: "UA-161806082-1"
}
]
],
/*
** Nuxt.js modules
Expand Down
17 changes: 16 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@
"devDependencies": {
"@nuxtjs/eslint-config": "^2.0.0",
"@nuxtjs/eslint-module": "^1.0.0",
"@nuxtjs/google-analytics": "^2.2.3",
"@vue/test-utils": "^1.0.0-beta.27",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"eslint": "^6.1.0",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-nuxt": ">=0.4.2",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1",
"@vue/test-utils": "^1.0.0-beta.27",
"babel-jest": "^24.1.0",
"jest": "^24.1.0",
"prettier": "^1.19.1",
"vue-jest": "^4.0.0-0"
}
}
10 changes: 7 additions & 3 deletions pages/country/_name.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<p>
{{ country }}
</p>
<b-container>
<b-row>
<b-col>
<h1>{{ country.country }} statistics</h1>
</b-col>
</b-row>
</b-container>
</template>

<script>
Expand Down
15 changes: 12 additions & 3 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@
<h3>Cases: {{ numberWithComma(allCases.cases) }}</h3>
</b-col>
<b-col>
<h3>Deaths: {{ numberWithComma(allCases.deaths) }}</h3>
<h3 class="text-center">
Deaths: {{ numberWithComma(allCases.deaths) }}
</h3>
</b-col>
<b-col>
<h3>Recovered: {{ numberWithComma(allCases.recovered) }}</h3>
<h3 class="text-right">
Recovered: {{ numberWithComma(allCases.recovered) }}
</h3>
</b-col>
</b-row>
<main-table :countries="countries" class="mt-4" />
<main-table
v-if="countries.length > 0"
:countries="countries"
class="mt-4"
/>
<p v-else>The database is currently unreachable</p>
<p>Data last updated: {{ updatedCases }}</p>
</b-container>
</template>
Expand Down

0 comments on commit 2f14322

Please sign in to comment.