Skip to content

Commit 6f47e1d

Browse files
EricEric
Eric
authored and
Eric
committed
Initial commit.
1 parent 98dc2d8 commit 6f47e1d

20 files changed

+9878
-0
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_size = 2
6+
indent_style = space
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# mtgjson-graphs
2+
3+
This Vue/Chart.js-based data visualization fetches Magic: The Gathering JSON data and charts the various card "types" present on cards for a single MTG set.
4+
5+
## Project setup
6+
```
7+
yarn install
8+
```
9+
10+
### Compiles and hot-reloads for development
11+
```
12+
yarn serve
13+
```
14+
15+
### Compiles and minifies for production
16+
```
17+
yarn build
18+
```
19+
20+
### Lints and fixes files
21+
```
22+
yarn lint
23+
```
24+
25+
## Notes/Todo
26+
27+
- Fetched sets JSON file to populate a dynamic list of set names.

babel.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
}

package.json

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "mtgjson-graphs",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"serve": "vue-cli-service serve",
7+
"build": "vue-cli-service build",
8+
"lint": "vue-cli-service lint"
9+
},
10+
"dependencies": {
11+
"chart.js": "^2.9.3",
12+
"core-js": "^3.5.0",
13+
"vue": "^2.6.11",
14+
"vuex": "^3.1.2"
15+
},
16+
"devDependencies": {
17+
"@vue/cli-plugin-babel": "^4.1.1",
18+
"@vue/cli-plugin-eslint": "^4.1.1",
19+
"@vue/cli-service": "^4.1.1",
20+
"babel-eslint": "^10.0.3",
21+
"eslint": "^6.7.2",
22+
"eslint-plugin-vue": "^6.0.1",
23+
"node-sass": "^4.13.0",
24+
"pug": "^2.0.4",
25+
"pug-plain-loader": "^1.0.0",
26+
"sass-loader": "^8.0.0",
27+
"vue-template-compiler": "^2.6.11"
28+
},
29+
"eslintConfig": {
30+
"root": true,
31+
"env": {
32+
"node": true
33+
},
34+
"extends": [
35+
"plugin:vue/essential",
36+
"eslint:recommended"
37+
],
38+
"rules": {},
39+
"parserOptions": {
40+
"parser": "babel-eslint"
41+
}
42+
},
43+
"postcss": {
44+
"plugins": {
45+
"autoprefixer": {}
46+
}
47+
},
48+
"browserslist": [
49+
"> 1%",
50+
"last 2 versions"
51+
]
52+
}

public/favicon.ico

14.7 KB
Binary file not shown.

public/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8+
<title>mtgjson-graphs</title>
9+
</head>
10+
<body>
11+
<noscript>
12+
<strong>We're sorry but mtgjson-graphs doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
13+
</noscript>
14+
<div id="app"></div>
15+
<!-- built files will be auto injected -->
16+
</body>
17+
</html>

src/App.vue

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<template lang='pug'>
2+
main#app
3+
Loader
4+
Graph
5+
</template>
6+
7+
<script>
8+
import Graph from "./components/Graph";
9+
import Loader from "./components/Loader";
10+
11+
export default {
12+
name: "app",
13+
components: {
14+
Graph,
15+
Loader
16+
}
17+
};
18+
</script>
19+
20+
<style lang="scss">
21+
@import "./assets/styles/main";
22+
</style>
23+

src/assets/images/mtg-pw-icon.svg

+61
Loading

src/assets/styles/globals/fonts.scss

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap');

src/assets/styles/globals/reset.scss

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/* http://meyerweb.com/eric/tools/css/reset/
2+
v2.0 | 20110126
3+
License: none (public domain)
4+
*/
5+
6+
html, body, div, span, applet, object, iframe,
7+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8+
a, abbr, acronym, address, big, cite, code,
9+
del, dfn, em, img, ins, kbd, q, s, samp,
10+
small, strike, strong, sub, sup, tt, var,
11+
b, u, i, center,
12+
dl, dt, dd, ol, ul, li,
13+
fieldset, form, label, legend,
14+
table, caption, tbody, tfoot, thead, tr, th, td,
15+
article, aside, canvas, details, embed,
16+
figure, figcaption, footer, header, hgroup,
17+
menu, nav, output, ruby, section, summary,
18+
time, mark, audio, video {
19+
margin: 0;
20+
padding: 0;
21+
border: 0;
22+
font-size: 100%;
23+
font: inherit;
24+
vertical-align: baseline;
25+
box-sizing: border-box;
26+
}
27+
/* HTML5 display-role reset for older browsers */
28+
article, aside, details, figcaption, figure,
29+
footer, header, hgroup, menu, nav, section {
30+
display: block;
31+
}
32+
body {
33+
line-height: 1;
34+
-webkit-font-smoothing: antialiased;
35+
-moz-osx-font-smoothing: grayscale;
36+
}
37+
ol, ul {
38+
list-style: none;
39+
}
40+
blockquote, q {
41+
quotes: none;
42+
}
43+
blockquote:before, blockquote:after,
44+
q:before, q:after {
45+
content: '';
46+
content: none;
47+
}
48+
table {
49+
border-collapse: collapse;
50+
border-spacing: 0;
51+
}
52+
strong {
53+
font-weight: bold;
54+
}
55+
p {
56+
line-height: 1.2em;
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$copy-color: #2c3e50;
2+
$accent-color: purple;
3+
4+
$font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
5+
$font-stack: 'Gill Sans', $font-family;

src/assets/styles/main.scss

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@import './globals/fonts';
2+
@import './globals/reset';
3+
@import './includes/variables';
4+
5+
body {
6+
font-family: $font-stack;
7+
background-color: #f6f7f7;
8+
color: $copy-color;
9+
font-size: 16px;
10+
}
11+
12+
.content-wrapper {
13+
position: relative;
14+
max-width: 1280px;
15+
padding-left: 20px;
16+
padding-right: 20px;
17+
}
18+
19+
pre {
20+
font-family: monospace, 'Courier', sans-serif;
21+
background-color: $copy-color;
22+
display: inline-block;
23+
border-radius: 3px;
24+
padding: 3px 5px;
25+
font-size: 14px;
26+
color: white;
27+
}
28+
29+
@media (min-width: 800px){
30+
.content-wrapper {
31+
padding-left: 30px;
32+
padding-right: 30px;
33+
}
34+
}

0 commit comments

Comments
 (0)