remove twig for index page
This commit is contained in:
parent
9e3a6721c9
commit
93708f0cf0
3 changed files with 35 additions and 42 deletions
14
public/index.html
Normal file
14
public/index.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>
|
||||
<title>🧩 jigsaw.hyottoko.club</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module">
|
||||
import Index from "/views/Index.vue.js"
|
||||
new Vue({ el: '#app', render: (h) => h(Index) })
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -10,11 +10,6 @@ export default {
|
|||
GameTeaser,
|
||||
ImageTeaser,
|
||||
},
|
||||
props: {
|
||||
gamesRunning: Array,
|
||||
gamesFinished: Array,
|
||||
images: Array,
|
||||
},
|
||||
template: `
|
||||
<div id="app">
|
||||
<h1>Running games</h1>
|
||||
|
|
@ -72,8 +67,19 @@ export default {
|
|||
tiles: 1000,
|
||||
image: '',
|
||||
scoreMode: GameCommon.SCORE_MODE_ANY,
|
||||
|
||||
gamesRunning: [],
|
||||
gamesFinished: [],
|
||||
images: [],
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const res = await fetch('/api/index-data')
|
||||
const json = await res.json()
|
||||
this.gamesRunning = json.gamesRunning
|
||||
this.gamesFinished = json.gamesFinished
|
||||
this.images = json.images
|
||||
},
|
||||
methods: {
|
||||
time(start, end) {
|
||||
const icon = end ? '🏁' : '⏳'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue