Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# Nuxt generate
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea
.editorconfig

# Service worker
sw.*

# Mac OSX
.DS_Store
22 changes: 22 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# client

>

## Build Setup

``` bash
# install dependencies
$ npm run install

# serve with hot reload at localhost:3000
$ npm run dev

# build for production and launch server
$ npm run build
$ npm run start

# generate static project
$ npm run generate
```

For detailed explanation on how things work, checkout [Nuxt.js docs](https://nuxtjs.org).
10 changes: 10 additions & 0 deletions client/api/axios.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import axios from 'axios';

const route = 'http://localhost:5000/api';

export default {
create: () => axios.create({
baseURL: route,
timeout: 10000,
})
}
41 changes: 41 additions & 0 deletions client/api/pokemon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import axios from './axios';

const route = '/pokemon';

export default {
search: async (name) => {
return axios.create().get(`${route}?q=${name}`)
.then(res => res.data)
.catch(err => {
console.log(err);
return [];
});
},

searchById: async (id) => {
return axios.create().get(`${route}/${id}`)
.then(res => res.data)
.catch(err => {
console.log(err);
return [];
});
},

add: async (pokemon) => {
return axios.create().post(`${route}`, pokemon)
.then()
.catch(err => console.log(err));
},

update: async (id, pokemon) => {
return axios.create().put(`${route}/${id}`, pokemon)
.then()
.catch(err => console.log(err));
},

delete: async (id) => {
return axios.create().delete(`${route}/${id}`)
.then()
.catch(err => console.log(err));
}
}
44 changes: 44 additions & 0 deletions client/api/type.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import axios from './axios';

const route = '/type';

export default {
search: async (name) => {
return axios.create().get(`${route}?q=${name}`)
.then(res => res.data)
.catch(err => {
console.log(err);
return [];
})
},

searchById: async (id) => {
return axios.create().get(`${route}/${id}`)
.then(res => res.data)
.catch(err => {
console.log(err);
return [];
})
},

add: async (type) => {
return axios.create().post(`${route}`, type)
.then()
.catch(err => {
console.log(err);
return [];
})
},

update: async (id, type) => {
return axios.create().put(`${route}/${id}`, type)
.then()
.catch(err => console.log(err));
},

delete: async (id) => {
return axios.create().delete(`${route}/${id}`)
.then()
.catch(err => console.log(err));
}
}
41 changes: 41 additions & 0 deletions client/api/weather.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import axios from './axios';

const route = '/weather';

export default {
search: async (name) => {
return axios.create().get(`${route}?q=${name}`)
.then(res => res.data)
.catch(err => {
console.log(err);
return [];
})
},

searchById: async (id) => {
return axios.create().get(`${route}/${id}`)
.then(res => res.data)
.catch(err => {
console.log(err);
return [];
});
},

add: async (weather) => {
return axios.create().post(`${route}`, weather)
.then()
.catch(err => console.log(err));
},

delete: async (id) => {
return axios.create().delete(`${route}/${id}`)
.then()
.catch(err => console.log(err))
},

update: async (id, weather) => {
return axios.create().put(`${route}/${id}`, weather)
.then()
.catch(err => console.log(err));
}
}
7 changes: 7 additions & 0 deletions client/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ASSETS

**This directory is not required, you can delete it if you don't want to use it.**

This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.

More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
Binary file added client/assets/images/1.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 client/assets/images/logo-300x156.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 client/assets/images/weather/Weather_Icon_Foggy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 client/assets/images/weather/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions client/assets/scss/_fill.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.bg-{
&primary{
background-color: $primary-color !important;
}

&Grass{
background-color: $type-grass-color !important;
}
&Poison{
background-color: $type-poison-color !important;
}
&Fire{
background-color: $type-fire-color !important;
}
&Flying{
background-image: linear-gradient($type-flying-color-1 50%, $type-flying-color-2 50%) !important;
}
&Water{
background-color: $type-water-color !important;
}
&Bug{
background-color: $type-bug-color !important;
}
&Normal{
background-color: $type-normal-color !important;
}
&Electric{
background-color: $type-electric-color !important;
}
&Ground{
background-image: linear-gradient($type-ground-color-1 50%, $type-ground-color-2 50%) !important;
}
&Fairy{
background-color: $type-fairy-color !important;
}

&Ghost{
background-color: $type-ghost-color !important;
}
&Psychic{
background-color: $type-psychic-color !important;
}
&Rock{
background-color: $type-rock-color !important;
}
&Dark{
background-color: $type-dark-color !important;
}
&Dragon{
background-image: linear-gradient($type-dragon-color-1 50%, $type-dragon-color-2 50%) !important;
}
&Ice{
background-color: $type-ice-color !important;
}
&Steel{
background-color: $type-steel-color !important;
}
&Fighting{
background-color: $type-fighting-color !important;
}
}

.fill-{
&width{
width: 100%;
}
}
13 changes: 13 additions & 0 deletions client/assets/scss/_size.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.img--{
&size-{
&1{
max-width: 96px !important;
max-height: 96px !important;
}

&2{
width: 28px !important;
height: 28px !important;
}
}
}
28 changes: 28 additions & 0 deletions client/assets/scss/_style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.center-item{
position: relative;
top: 50%;
transform: translateY(-50%);
}

.bottom-item{
display: inline-block;
position: relative;
bottom: 0%;
}

.decoration--none{
text-decoration: none !important;
}

.container {
padding: 50px;
background: white;
margin-top: 20px;
margin-bottom: 20px;
border-radius: 4px;
box-shadow: 1px 1px 5px 1px darkgray;
}

.v-content__wrap {
background-color: whitesmoke;
}
14 changes: 14 additions & 0 deletions client/assets/scss/_text.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.center--text {
display: inline-block;
position: relative;
top: 50%;
transform: translateY(-50%);
}

.text--{
&size-{
&1 {
font-size: 11px !important;
}
}
}
Loading