added Vue
This commit is contained in:
parent
d93a5fd6a1
commit
10508ded4b
37 changed files with 15941 additions and 2884 deletions
0
frontend/src/components/Button.vue
Normal file
0
frontend/src/components/Button.vue
Normal file
11
frontend/src/components/Game.vue
Normal file
11
frontend/src/components/Game.vue
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<main></main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "Game"
|
||||
}
|
||||
</script>
|
||||
18
frontend/src/components/Header.vue
Normal file
18
frontend/src/components/Header.vue
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<template>
|
||||
<h1>Raspberry Rocketeer</h1>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: "Header",
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
h1 {
|
||||
text-align: center;
|
||||
font-size: 5em;
|
||||
}
|
||||
|
||||
</style>
|
||||
25
frontend/src/components/Leaderboard.vue
Normal file
25
frontend/src/components/Leaderboard.vue
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<template>
|
||||
<h3>{{ title }}</h3>
|
||||
<div class="container">
|
||||
<div class="row" v-for="entry in data" :key="entry.rank" >
|
||||
<div class="col-1 text-left">{{entry.rank}}</div>
|
||||
<div class="offset-1 col text-left">{{entry.username}}</div>
|
||||
<div class="col text-left">{{entry.score}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: "Leaderboard",
|
||||
props: {
|
||||
title: {
|
||||
type: String
|
||||
},
|
||||
data: {
|
||||
type: Array
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
34
frontend/src/components/UserScores.vue
Normal file
34
frontend/src/components/UserScores.vue
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col text-center" >Highscore</div>
|
||||
<div class="col text-center" >Total Score</div>
|
||||
<div class="col text-center" >Total Playtime</div>
|
||||
<div class="col text-center" >Average Score</div>
|
||||
<div class="col text-center" >Games Played</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-center" >{{ this.userScores.highscore }}</div>
|
||||
<div class="col text-center" >{{ this.userScores.totalScore }}</div>
|
||||
<div class="col text-center" >{{ this.userScores.totalPlaytime }}</div>
|
||||
<div class="col text-center" >{{ this.userScores.averageScore }}</div>
|
||||
<div class="col text-center" >{{ this.userScores.gamesPlayed }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
userScores: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue