init vue+bulma frontend

This commit is contained in:
2019-06-11 16:12:41 +02:00
parent 286d203ba2
commit dc978fc87f
12 changed files with 11763 additions and 0 deletions

21
lootalot_front/.gitignore vendored Normal file
View File

@@ -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?

29
lootalot_front/README.md Normal file
View File

@@ -0,0 +1,29 @@
# lootalot_front
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Run your tests
```
npm run test
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}

11499
lootalot_front/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
{
"name": "lootalot_front",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"bulma": "^0.7.5",
"core-js": "^2.6.5",
"vue": "^2.6.10"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-service": "^3.8.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"vue-template-compiler": "^2.6.10"
},
"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"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>Loot-a-Lot !</title>
<script defer src="fontawesome/js/all.js"></script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
<noscript>
<strong>We're sorry but lootalot_front doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<template>
<main id="app" class="section">
<section id="content" class="columns is-desktop">
<Player></Player>
<div class="column">
<section id="main" class="columns">
<div class="column">
<div id="main-heading" class="columns is-mobile is-vcentered">
<div class="column is-narrow">
<span class="icon is-large"><i class="fas fa-3x fa-gem"></i></span>
</div>
<div class="column has-text-left">
<h1 class="title">Coffre de groupe</h1>
</div>
</div>
<Chest player_id="0"></Chest>
</div>
</section>
</div>
</section>
</main>
</template>
<script>
import Player from './components/Player.vue'
import Chest from './components/Chest.vue'
import 'bulma/css/bulma.css'
export default {
name: 'app',
components: {
Player,
Chest
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,22 @@
<template>
<table class="table is-fullwidth is-striped">
<thead>
<tr><th>Objets de {{ player_id }}</th></tr>
</thead>
<tbody>
<tr><td>Nom 1</td></tr>
<tr><td>Nom 2</td></tr>
<tr><td>Nom 3</td></tr>
</tbody>
</table>
</template>
<script>
export default {
props: ["player_id"],
data () {
return {
};
}
}
</script>

View File

@@ -0,0 +1,66 @@
<template>
<div class="column is-one-third-desktop">
<div id="sidebar" class="card">
<header id="sidebar-heading" class="card-header">
<a id="change_player" class="card-header-icon is-dark">
<span class="icon is-small">
<i class="fas fa-exchange-alt"></i>
</span>
</a>
<p id="active_player" class="card-header-title">{{ name }}</p>
</header>
<div class="card-content">
<span class="icon is-large">
<i class="fas fa-2x fa-coins"></i>
</span>
<nav class="level is-mobile">
<div class="level-item">
<div><p class="heading">CP</p><p class="subtitle">{{ wealth[0] }}</p></div>
</div>
<div class="level-item">
<div><p class="heading">SP</p><p class="subtitle">{{ wealth[1] }}</p></div>
</div>
<div class="level-item">
<div><p class="heading">GP</p><p class="subtitle">{{ wealth[2] }}</p></div>
</div>
<div class="level-item">
<div><p class="heading">PP</p><p class="subtitle">{{ wealth[3] }}</p></div>
</div>
</nav>
</div>
<footer class="card-footer">
<a @click="showChest = !showChest" href="#" class="card-footer-item is-dark">Coffre</a>
<a href="#" class="card-footer-item">Argent</a>
</footer>
</div>
<div class="card" v-show="showChest" style="margin-top: 1em;">
<div class="card-content">
<Chest player_id="0"></Chest>
</div>
</div>
</div>
</template>
<script>
import Chest from './Chest.vue'
/*
The Player control board.
*/
export default {
components: { Chest },
data () {
return {
name: "Player name",
wealth: [1000,100,10,1],
showChest: false,
};
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,8 @@
import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')