Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
2pai committed Sep 29, 2019
0 parents commit ef8356c
Show file tree
Hide file tree
Showing 18 changed files with 11,600 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
11,242 changes: 11,242 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "animoji",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"popper.js": "^1.14.7",
"jquery": "^3.3.1",
"vue": "^2.6.6",
"vue-router": "^3.0.2",
"vuex": "^3.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.5.0",
"@vue/cli-plugin-eslint": "^3.5.0",
"@vue/cli-service": "^3.5.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.8.0",
"eslint-plugin-vue": "^5.0.0",
"vue-cli-plugin-bootstrap": "^1.0.0-alpha.1",
"vue-template-compiler": "^2.5.21"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}
Binary file added public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<title>Animoji🐿</title>
</head>
<body>
<noscript>
<strong>We're sorry but sakata-vue doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
50 changes: 50 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<body>
<div id="app" class="container">
<header>
<h1 class="text-center" style=" font-size: 8rem; padding-bottom: 30px;">Animoji 🐿</h1>
<div class="row">
<div class="col-md-8">
<cardHeader/>
</div>
<div class="col-md-4">
<cardContribute/>
</div>
</div>
</header>
<router-view/>
<hr class="separator">
<footer>
<footerContent/>
</footer>
</div>
</body>
</template>
<script>
import footerContent from '@/components/footerContent'
import cardHeader from '@/components/cardHeader'
import cardContribute from '@/components/cardContributor'
export default {
components:{
footerContent,
cardHeader,
cardContribute
},created () {
document.title = "Animoji 🐿";
}
}
</script>
<style>
@import url("https://fonts.googleapis.com/css?family=Mansalva&display=swap");
h1{
font-family: 'Mansalva', cursive;
padding-top: 10px;
color:white;
text-shadow: 0 0 10px #f545; /* horizontal-offset vertical-offset 'blur' colour */
user-select: none;
}
.separator{
border: 1px solid white;
}
</style>
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background-color:dimgrey;
}
25 changes: 25 additions & 0 deletions src/components/cardContributor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<div class="border-contributor">
<p class="desc text-justify " style="font-size: 20px; font-weight: bold;" >Looking to add your favorite anime to Animoji ? ✨🌏🌷</p>
<button class="btn btn-primary btn-lg">Contribute 🔥</button>
</div>
</template>
<script>
export default {
name:'cardContributor'
}
</script>
<style>
.btn-primary, .btn-primary:hover, .btn-primary:active, .btn-primary:visited {
background-color: #8064A2 !important;
border-color: white;
}
.border-contributor{
box-sizing: border-box;
padding: 30px 20px 20px 20px;
border: 3px solid #fae6e9;
}
.desc{
color:whitesmoke;
}
</style>
27 changes: 27 additions & 0 deletions src/components/cardEmoji.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div class="card">
<div class="card-body text-center" data-toggle="collapse" :href="`#desc-${animeId}`" aria-expanded="false" style="font-size: 40px;">
{{animeEmoji}}
</div>
<div class="card-body text-center collapse" v-bind:id="`desc-${animeId}`" style="font-size: 20px; font-weight: bold;">
{{animeName}} ({{animeYear}})
</div>
</div>
</template>
<script>
export default {
name:'cardEmoji',
props:{
animeEmoji: String,
animeName: String,
animeYear: Number,
animeId:Number
}
}
</script>

<style scoped>
.card{
user-select: none;
}
</style>
18 changes: 18 additions & 0 deletions src/components/cardHeader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div class="card" style="height: 100%;background-color: teal;">
<div class="card-body">
<h3><b>Describe your favorite anime with emoji 🌈🌕⛅️</b></h3>
<p style="font-size: 20px;" class="desc">Click on the emojis to reveal the anime name!</p>
</div>
</div>
</template>
<script>
export default {
name:'cardHeader'
}
</script>
<style>
h3,.desc{
color:whitesmoke;
}
</style>
16 changes: 16 additions & 0 deletions src/components/footerContent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div class="text-center" style="font-size: 25px;">
<p style="color:white">Now Animoji has <b>{{count}}</b> anime 🔥</p>
</div>
</template>

<script>
export default {
name:'footerContent',
data(){
return{
count:this.$store.getters.getCount
}
}
}
</script>
17 changes: 17 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Vue from 'vue'
import App from './App.vue'
import 'bootstrap'
import 'bootstrap/dist/css/bootstrap.min.css'
import router from './router'
import Vuex from 'vuex'
import store from './store'
import "@/assets/style.css"

Vue.config.productionTip = false
Vue.use(Vuex);

new Vue({
router,
store,
render: h => h(App)
}).$mount('#app')
16 changes: 16 additions & 0 deletions src/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Vue from 'vue'
import Router from 'vue-router'
import main from './views/main.vue'
Vue.use(Router)

export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: 'home',
component: main
}
]
})
32 changes: 32 additions & 0 deletions src/store/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import Vue from 'vue'
import Vuex from 'vuex'
import ListAnime from './listAnime'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
ListAnime,
countAnime:0
},
getters: {
getListAnime: state => {
return state.ListAnime
},
getCount:state => {
return state.countAnime
}
},
mutations: {
setListAnime(state,status){
state.ListAnime = status;
},
setCount(state,value){
state.countAnime = value;
}
},
actions:{
init({commit}){
commit('setListAnime',ListAnime);
commit('setCount',ListAnime.length);
}
}
})
18 changes: 18 additions & 0 deletions src/store/listAnime.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export default [
{
animeEmoji:" 🏀 🏆 ⛹🏻‍♂️",
animeName:"Kuroko's Basketball",
animeYear:2012
},
{
animeEmoji:" 👦🏻👩🏼🎻🎹😭" ,
animeName:"Shigatsu wa kimi no uso",
animeYear:2014
},
{
animeEmoji:" ⚔️⚡️🙍🏻‍♂️🙍🏼‍♀️🧚🏻‍♂️" ,
animeName:"Sword Art Online",
animeYear:2009
}

]
42 changes: 42 additions & 0 deletions src/views/main.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<div class="main">
<div class="container">
<hr class="separator">
<div class="row">
<div
class="col-md-4"
v-for="({animeEmoji,animeName,animeYear,id},index) in listAnime"
:key="{index}">
<cardEmoji
:animeEmoji=animeEmoji
:animeName=animeName
:animeYear=animeYear
:animeId=index />
</div>
</div>
</div>
</div>
</template>
<script>
import cardEmoji from '@/components/cardEmoji'
export default {
name:'main',
components:{
cardEmoji
},
data(){
return{
listAnime:this.$store.getters.getListAnime
}
},
created() {
this.$store.dispatch('init');
}
}
</script>
<style>
.separator{
border: 1px solid white;
}
</style>

0 comments on commit ef8356c

Please sign in to comment.