feat: new login & lobby full bourred
This commit is contained in:
+180
-1
@@ -1,10 +1,189 @@
|
||||
<script setup lang="ts">
|
||||
import goStore, { netcode_create_game, join_game } from '~/netcode';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const erika_alive = ref(true);
|
||||
|
||||
function killErika() {
|
||||
erika_alive.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<div class="background">
|
||||
<div class="title">
|
||||
Entrez dans le Royaume de Héron !
|
||||
</div>
|
||||
|
||||
<div class="middle-row">
|
||||
<div class="create-game-zone">
|
||||
<button @click="netcode_create_game">Create Game</button>
|
||||
</div>
|
||||
|
||||
<div class="games-list-zone">
|
||||
<div v-for="g in goStore.lobby?.games"><button @click="join_game(g)">{{ g }}</button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overlay" v-if="erika_alive">
|
||||
<img class="overlay-image" src="https://static.wikia.nocookie.net/umineko/images/9/9d/PC_Erika.Casual.Sprite_36.png" alt="pétasse" />
|
||||
<div class="speech-bubble">
|
||||
<p>Ohoho!<br>Je suis Erika Furudo, la détective la plus forte du monde !</p>
|
||||
<p>Je vais vous montrer comment jouer à Héron Realms !</p>
|
||||
<p>Cliquez moi-dessus pour afficher les <span style="color: red">règles</span>.</p>
|
||||
<p>Ou sinon, commencez direct en créant une partie ou rejoingnant une partie existante.</p>
|
||||
</div>
|
||||
<div class="overlay-button">
|
||||
<button class="kill-erika-button" @click="killErika()">Tuer Erika</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
.background {
|
||||
background-color: #f0f0f0;
|
||||
background-image: url('https://www.pockettactics.com/wp-content/sites/pockettactics/2023/01/fire-emblem-engage-review-29.jpg');
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-family: 'Kanit', 'Roboto', sans-serif;
|
||||
font-size: 64px;
|
||||
color: white;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.middle-row {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 100px;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.create-game-zone {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
|
||||
button {
|
||||
background-color: #4CAF50;
|
||||
border: none;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
border-radius: 12px;
|
||||
padding: 10px 24px;
|
||||
height: 50px;
|
||||
transition-duration: 0.4s;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.games-list-zone {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
|
||||
button {
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
border: none;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
border-radius: 12px;
|
||||
padding: 20px 24px;
|
||||
height: 120px;
|
||||
transition-duration: 0.4s;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.overlay-image {
|
||||
position: absolute;
|
||||
top: 60%;
|
||||
right: 20px;
|
||||
z-index: 1;
|
||||
height: 40%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.speech-bubble {
|
||||
position: absolute;
|
||||
top: 60%;
|
||||
right: 260px;
|
||||
z-index: 1;
|
||||
background-color: rgba(225, 225, 225, 0.8);
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
font-family: 'Kanit', 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
color: black;
|
||||
text-align: center;
|
||||
max-width: 420px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.overlay-button {
|
||||
position: absolute;
|
||||
top: 49%;
|
||||
right: 20px;
|
||||
z-index: 1;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
padding-top: 50px;
|
||||
|
||||
.kill-erika-button {
|
||||
display: none;
|
||||
background-color: #f44336;
|
||||
border: none;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
border-radius: 12px;
|
||||
padding: 10px 24px;
|
||||
height: 50px;
|
||||
transition-duration: 0.4s;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
}
|
||||
}
|
||||
|
||||
.overlay-button:hover {
|
||||
.kill-erika-button {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -13,15 +13,94 @@ async function discordLogin() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="background">
|
||||
<div class="title">
|
||||
Entrez dans le Royaume de Héron !
|
||||
</div>
|
||||
|
||||
<div class="middle-row">
|
||||
<div class="icon">
|
||||
<CardPreview :data=null></CardPreview>
|
||||
</div>
|
||||
|
||||
<div v-if="goStore.current_game?.started">
|
||||
<b>SPECTATOR MODE</b>
|
||||
<b>Mode spectateur</b>
|
||||
</div>
|
||||
|
||||
<template v-if="!goStore.current_game?.started">
|
||||
<!-- <input type="text" v-model="username" />
|
||||
<button @click="register(username)">LOGIN</button> -->
|
||||
<button @click="discordLogin()">DISCORD</button>
|
||||
<button class="menu-button" @click="discordLogin()">Se connecter via Discord</button>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
Héron Realms n'est en aucun cas affilié à Hero Realms.<br>
|
||||
Le concept et certains noms de cartes sont la propriété de Wise Wizard Games.<br>
|
||||
Les illustrations sont la propriété de leurs auteurs respectifs (il y en a plein).<br>
|
||||
Ce magnifique fond d'écran est tiré de Fire Emblem: Engage.<br>
|
||||
Programmeur principal, owner du projet: Legonzaur
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped>
|
||||
.background {
|
||||
background-color: #f0f0f0;
|
||||
background-image: url('https://www.pockettactics.com/wp-content/sites/pockettactics/2023/01/fire-emblem-engage-review-29.jpg');
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-family: 'Kanit', 'Roboto', sans-serif;
|
||||
font-size: 64px;
|
||||
color: white;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.middle-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 100px;
|
||||
margin-bottom: 100px;
|
||||
}
|
||||
|
||||
.menu-button {
|
||||
background-color: #4CAF50;
|
||||
border: none;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 16px;
|
||||
margin: auto;
|
||||
cursor: pointer;
|
||||
border-radius: 12px;
|
||||
padding: 20px 24px;
|
||||
height: 120px;
|
||||
transition-duration: 0.4s;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
color: white;
|
||||
width: 100%;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user