Skip to content

Commit

Permalink
Rh/welcomepage (#84)
Browse files Browse the repository at this point in the history
* in progress welcome page

* <welcome page>

---------

Co-authored-by: rachelhu <rachelehu@gmail.com>
  • Loading branch information
cameroncheung00 and rchelhu committed Jun 12, 2023
1 parent 3e0020c commit b9b0495
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 19 deletions.
129 changes: 110 additions & 19 deletions src/components/units/AppWelcome.vue
Original file line number Diff line number Diff line change
@@ -1,32 +1,123 @@
<template>
<h2 id="app-welcome">{{ t("title") }}</h2>
<div class="welcome">
<h2 id="app-welcome">Play and visualize two-player, abstract strategy games!</h2>
<p id="game-info"><strong>68+</strong> games integrated &emsp;&emsp;&emsp; <strong>9+</strong> puzzles strongly solved</p>
<div class="explore-buttons-container">
<button @click="exploreAllGames">Explore All Games</button>
<button @click="exploreAllPuzzles">Explore All Puzzles</button>
</div>
<div class="bottom-right-buttons-container">
<button class="home-button" onclick="window.location.href='//github.com/GamesCrafters/GamesmanUni'">
<img src="../../models/images/homebutton-github.png" alt="GitHub">
</button>
<button class="home-button" @click="infoGames">
<img src="../../models/images/homebutton-info.png" alt="Info">
</button>
</div>
</div>
</template>

<script lang="ts" setup>
import { useI18n } from "vue-i18n";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
const { t } = useI18n();
const { t } = useI18n();
const router = useRouter();
const exploreAllGames = () => {
router.push("/games");
}
const exploreAllPuzzles = () => {
router.push("/puzzles");
}
const infoGames = () => {
router.push("/about");
}
</script>

<style lang="scss" scoped>
#app-welcome {
font-size: 3rem;
}
.welcome {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
text-align: center;
}
#app-welcome {
font-size: 3rem;
margin-bottom: 4.5rem;
}
#game-info {
font-size: 1.5rem;
margin-bottom: 4rem;
}
#game-info strong {
font-size: 1.5rem;
font-weight: bold;
}
button {
display: inline-block;
background-color: #001378;
color: #fff;
padding: 12px 24px;
text-decoration: none;
font-size: 18px;
border-radius: 10px;
transition: background-color 0.4s ease;
}
.bottom-right-buttons-container {
position: absolute;
bottom: 0;
right: 0;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: flex-end;
padding-right: 20px;
padding-bottom: 65px;
}
.explore-buttons-container {
display: flex;
gap: 20px;
}
.home-button {
padding: 0;
border: none;
background: none;
cursor: pointer;
outline: none;
box-shadow: none;
}
.home-button img {
width: 50px;
height: 50px;
}
</style>

<i18n lang="json">
{
"cn": {
"title": "欢迎!"
},
"en-US": {
"title": "Welcome!"
},
"es": {
"title": "¡Bienvenido!"
},
"hi": {
"title": "आपका स्वागत है!"
{
"cn": {
"title": "欢迎!"
},
"en": {
"title": "Welcome! "
},
"es": {
"title": "¡Bienvenido!"
},
"hi": {
"title": "आपका स्वागत है!"
}
}
}
</i18n>

Binary file added src/models/images/homebutton-github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/models/images/homebutton-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b9b0495

Please sign in to comment.