Commit 2fae6713 authored by quentin.vrel's avatar quentin.vrel

Home page

parent 6f2fedfb
<template>
<button class="text-button" :style="this.style" v-on:click="this.emit">
{{text}}
</button>
</template>
<style>
.text-button{
background: transparent;
border: none;
margin-bottom: 36px;
font-family: Shojumaru;
font-style: normal;
font-weight: normal;
font-size: 48px;
line-height: 64px;
text-align: center;
color: #000000;
background: rgba(196, 196, 196, 0.6);
padding: 20px;
}
</style>
<script>
export default {
props: {
text: { type: String, default: ''},
width: { type: [String], default: "750px" },
height: { type: [String], default: "130px" },
click: {type: String, default: ''}
},
computed: {
style() {
const style = {
height: this.height,
maxWidth: this.width
}
return style;
},
emit () {
const emit = "$emit('"+this.click+"')";
return emit
}
}
}
</script>
\ No newline at end of file
<template> <template>
<button :onclick="this.onclick"> <button class="svg-button" :onclick="this.onclick">
<img :src="this.svg" :width="this.width" :height="this.height"/> <img :src="this.svg" :width="this.width" :height="this.height"/>
</button> </button>
</template> </template>
<style> <style>
button{ .svg-button{
background: transparent; background: transparent;
border: none; border: none;
margin: 50px; margin: 50px;
......
import Vue from 'vue' import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
Vue.use(VueRouter) Vue.use(VueRouter)
const routes = [ const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{ {
path: '/about', path: '/about',
name: 'About', name: 'About',
......
<template>
<div class="home">
<page-title pagetitle="Riichi Mahjong"/>
<form action="#" @submit.prevent="login">
<button-text width="615px" height="130px" text="Se Connecter"/>
</form>
<form action="#" @submit.prevent="register">
<button-text width="615px" height="130px" text="S'Enregistrer"/>
</form>
</div>
</template>
<script>
import PageTitle from '@/components/PageTitle.vue'
import ButtonText from '../components/ButtonText.vue'
export default {
name: 'Home',
components: {
PageTitle,
ButtonText
},
methods: {
login: function(){
this.$router.push('login');
},
register: function(){
this.$router.push('register');
}
}
}
</script>
<style>
.home{
position: relative;
top: 200px;
display: flex;
flex-direction: column;
}
.home *{
margin-left:auto;
margin-right:auto;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment