Skip to content

Commit

Permalink
Merge branch 'release/1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
avimehenwal committed Jul 8, 2020
2 parents e3e1a9a + 164b07c commit 878974f
Show file tree
Hide file tree
Showing 15 changed files with 353 additions and 65 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"page",
"vue",
"typo",
"search"
"search",
"chart"
]
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## Demo

![Demo homepage](/demo/Screenshot_20200409_183322.png)
![Dashboard View](/demo/dashboard-view.png)
![Google Tag Manager](/demo/Screenshot_20200410_004900.png)
---

Expand All @@ -29,13 +30,17 @@
* [x] Card and image skeleton placeholders for upcoming content
* https://www.gamevix.com/games/browse/best-rated
* [x] Use @nuxt/Components
* [x] Use [chart.js](https://github.com/chartjs/Chart.js/releases/tag/v2.9.3)
* No need anymore to manually import them in the script section
* [ ] Use @nuxt/Content
* write in a `content/` directory
* [ ] Add character details
* [ ] Add data transform Mixin
* [ ] Pass information from index page to description page using URL

![charjs demo](/demo/chartjs.png)
![Doughnut chartjs](/demo/doughnut-chart.png)

## Learning

* Image lazy loading
Expand Down
9 changes: 9 additions & 0 deletions components/bar-chart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Bar } from 'vue-chartjs'

export default {
extends: Bar,
props: ['data', 'options'],
mounted () {
this.renderChart(this.data, this.options)
}
}
9 changes: 9 additions & 0 deletions components/doughnut-chart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Doughnut } from 'vue-chartjs'

export default {
extends: Doughnut,
props: ['data', 'options'],
mounted () {
this.renderChart(this.data, this.options)
}
}
21 changes: 21 additions & 0 deletions content/resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Anime Resources

> Form of compelling storytelling and character development
* [Most Popular Anime Movies and TV Shows](https://www.imdb.com/search/keyword/?keywords=anime)
* [viz Schonen Jump - weekly anime magazine](https://www.viz.com/shonenjump)
* [List of Japanese manga magazines by circulation](https://en.wikipedia.org/wiki/List_of_Japanese_manga_magazines_by_circulation)


### Where to publish you own comics

* [Tapas: Publish your own comics](https://tapas.io/about)
* [Webtoons](https://www.webtoons.com/en/creators101/getstarted)

### Terminologies

* [Hiatus chart](https://en.wikipedia.org/wiki/Hiatus_(linguistics))
* https://hiatus-hiatus.github.io/
* https://www.reddit.com/r/Berserk/comments/7wrc0p/berserk_manga_hiatus_chart_im_new_to_reddit_so/
* https://myanimelist.net/forum/?topicid=1602046

36 changes: 35 additions & 1 deletion content/sevendeadlysins.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,38 @@ Can summon **Domain of god**

## 10 Commendments

> Power of commendment/curses from deamon king
> Power of commendment/curses from deamon king
* Cursed Vine Tree
*
* Monspeet † Reticence
* Hell Fire Bird
* Ash Dragon
* Derieri † Purity
* Drole † Patience
* Giga Crush | Giga Fall
* Estarossa Love
* Fraudrin † Selflessness
* Galand † Truth
- Gloxinia † Repose
* Droplet of Life
- Grayroad | Pacifism
- Melascula Faith
* Cacoon Of Darkness
- Zeldris (Leader) Piety

## 7 Sins

1. Escanor
1. Hear me and obey my will, divine axe Rhitta!
2. Meliodas
1. 1000 divine cuts
2. Revenge counter
3. Full counter
3. Ban
1. Zero Sign
2. Fox hunt
4. Merlin
1. Exterminate Ray
2. Infinity
3. Endless Whirl
Binary file added demo/chartjs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/dashboard-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/doughnut-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export default {
title: 'Resources',
to: '/resources'
},
{
icon: 'mdi-chart-bar',
title: 'Project Stats',
to: '/stats'
},
{
icon: 'mdi-format-list-bulleted-square',
title: 'Test',
Expand Down
10 changes: 9 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export default {
** Plugins to load before mounting the App
*/
plugins: [
// file do not exists
// {
// src: '~/plugins/vue-chart.js', mode: 'client'
// }
],
/*
** Nuxt.js dev-modules
Expand Down Expand Up @@ -60,7 +64,8 @@ export default {
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxt/content'
'@nuxt/content',
'@nuxt/http'
],
/*
** Axios module configuration
Expand Down Expand Up @@ -101,5 +106,8 @@ export default {
*/
extend (config, ctx) {
}
},
env: {
githubToken: '42cdf9fd55abf41d24f34c0f8a4d9ada5f9e9b93'
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
"dependencies": {
"@nuxt/components": "^1.0.7",
"@nuxt/content": "^1.4.1",
"@nuxt/http": "^0.5.7",
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/gtm": "^2.2.3",
"chart.js": "^2.9.3",
"moment": "^2.24.0",
"nuxt": "^2.13.3"
"nuxt": "^2.13.3",
"vue-chartjs": "^3.5.0"
},
"devDependencies": {
"@commitlint/cli": "^9.0.1",
Expand Down
60 changes: 0 additions & 60 deletions pages/resources.vue

This file was deleted.

150 changes: 150 additions & 0 deletions pages/stats.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<template>
<div>
<v-row>
<v-card width="20%" color="light-blue darken-4">
<v-card-text>
<div class="display-4 text-center grey--text text--lighten-4 font-weight-regular">
{{ ghUser.public_repos }}
</div>
</v-card-text>
<v-card-subtitle class="text-center font-weight-bold">
Public Repositories
</v-card-subtitle>
</v-card>
<v-spacer />
<v-card width="20%" outlined>
<v-card-text>
<div class="display-4 text-center blue--text text--lighten-3">
{{ ghUser.public_gists }}
</div>
</v-card-text>
<v-card-subtitle class="text-center font-weight-bold">
Public Gists
</v-card-subtitle>
</v-card>
<v-spacer />
<v-card width="20%" outlined>
<v-card-text>
<div class="display-4 text-center red--text text--lighten-3">
{{ ghUser.followers }}
</div>
</v-card-text>
<v-card-subtitle class="text-center font-weight-bold">
Githhub Followers
</v-card-subtitle>
</v-card>
<v-spacer />
<v-card width="20%" outlined>
<v-card-text>
<div class="display-4 text-center green--text text--lighten-3">
{{ ghUser.following }}
</div>
</v-card-text>
<v-card-subtitle class="text-center font-weight-bold">
Github Following
</v-card-subtitle>
</v-card>
</v-row>
<br>
<v-row>
<v-card width="29%" outlined>
<v-card-title>
Project contributor(s)
</v-card-title>
<v-card-subtitle>
Number of people contributing to the project, with the volume of contributions
</v-card-subtitle>
<v-card-text>
<DoughnutChart :data="doughnutChartData" :options="{ legend: { display: false }, maintainAspectRatio: false }" />
</v-card-text>
</v-card>
<v-spacer />
<v-card width="70%" outlined right>
<v-card-title>
Commit Activity
</v-card-title>
<v-card-text>
<BarChart :data="barChartData" :options="{ maintainAspectRatio: false }" />
</v-card-text>
</v-card>
</v-row>
</div>
</template>

<script>
import moment from 'moment'
import DoughnutChart from '~/components/doughnut-chart'
import BarChart from '~/components/bar-chart'
function isBot (username) {
return username.includes('[bot]') || username.includes('-bot')
}
function getRandomColor () {
const letters = '0123456789ABCDEF'
let color = '#'
for (let i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)]
}
return color
}
export default {
components: {
DoughnutChart,
BarChart
},
async asyncData ({ $http, env }) {
let contributors = await $http.$get('https://api.github.com/repos/avimehenwal/fan-gallery/contributors', {
headers: {
Authorization: `token ${env.githubToken}`
}
})
const stats = await $http.$get('https://api.github.com/repos/avimehenwal/fan-gallery/stats/commit_activity', {
headers: {
Authorization: `token ${env.githubToken}`
}
})
const ghUser = await $http.$get('https://api.github.com/users/avimehenwal')
contributors = contributors.filter(c => c.contributions >= 10 && !isBot(c.login))
return {
barChartData: {
labels: stats.map(stat => moment(stat.week * 1000).format('GGGG[-W]WW')),
datasets: [
{
label: 'avimehenwal/fan-gallery Commit Activity',
backgroundColor: '#41B38A',
data: stats.map(stat => stat.total)
}
]
},
doughnutChartData: {
labels: contributors.map(c => c.login),
datasets: [
{
label: 'Nuxt.js Contributors',
backgroundColor: contributors.map(getRandomColor),
data: contributors.map(c => c.contributions)
}
]
},
ghUser
}
}
}
</script>

<style scoped>
/* .doughnut-chart {
width: 80%;
height: 80%;
margin: auto;
margin-top: 30px;
}
.bar-chart {
width: 80%;
height: 80%;
margin: auto;
margin-top: 30px;
} */
</style>
Loading

0 comments on commit 878974f

Please sign in to comment.