Update formatting of game login selection

This commit is contained in:
Oliver-Akins 2020-09-19 00:52:05 -06:00
parent 950797c984
commit 10d7e74db7

View file

@ -1,20 +1,25 @@
<template>
<div id="game_code_entry">
<h2>
Enter a game code:
</h2>
<h1>
Secret Hitler Online
</h1>
<div>
<label for="username">Username:</label>
<input
type="text"
name="Game Code"
v-model="game_code"
@keyup.enter="submit_game_code()"
id="username"
name="User Name"
v-model="username"
>
<br>
<button
@onclick.stop="submit_game_code()"
<label for="gamecode">Game Code:</label>
<input
type="text"
id="gamecode"
name="Game Code"
v-model="game_code"
>
Confirm URL
</button>
</div>
</div>
</template>
@ -24,28 +29,46 @@ export default {
components: {},
data() {return {
game_code: ``,
username: ``,
}},
methods: {
submit_game_code() {
if (this.game_code.length > 0) {
this.$emit(`set-game-code`, this.game_code);
} else {
alert(`Invalid game code. Must have a code`)
}
},
},
methods: {},
}
</script>
<style lang="stylus">
@import "../theme.styl"
#game_code_entry {
text-align: center
height: 100vh
width: 33vw
margin: 0 auto
height: 100vh
width: 50vw
color: $main-text-colour
h1, h3 {
letter-spacing: $title-letter-spacing
}
p {
letter-spacing: $body-letter-spacing
}
@media screen and (max-width: 600px) {
width: 90vw
}
}
</style>
<style lang="stylus" scoped>
@import "../theme.styl"
#game_code_entry {
label {
font-size: 1.2em
}
input[type="text"] {
margin-bottom: 10px
margin-left: 10px
text-align: left
}
}
</style>