Skip to content

Commit

Permalink
update controller
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxMuehlbauer committed Apr 29, 2024
1 parent 5a6d122 commit e64e2e0
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions src/pages/controller.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,7 @@
<body>
<div class="bg" x-data="$store.game">
<div class="monitor">
<template x-for="(question, qIndex) in questions">
<div class="ui" x-show="qIndex === activeQuestion" x-data="question">
<h1 x-text="text"></h1>
<ul class="list">
<template x-for="(answer, aIndex) in answers">
<li class="word" x-data="answer">
<button class="reveal" aria-label="reveal" @click="reveal"></button>
<span class="number" x-reveal="{ text: aIndex + 1, delay: 0 }"></span>
<span class="word" x-reveal="{ text, delay: 2 }"></span>
<span class="points" x-reveal="{ text: pts, delay: 33 }"></span>
</li>
</template>
</ul>
<div class="controls left" x-data="fails.teamA">
<ul class="list fail-list">
<li x-bind:class="fails >= 1 ? 'active' : ''">X</li>
<li x-bind:class="fails >= 2 ? 'active' : ''">X</li>
<li x-bind:class="fails >= 3 ? 'active' : ''">X</li>
</ul>
<button class="increase" aria-label="increase" @click="increase"></button>
</div>
<div class="controls middle">
<span x-bind:class="qIndex === 0 ? 'inactive' : 'active'">prev</span>
<span x-bind:class="qIndex >= questions.length - 1 ? 'inactive' : 'active'">next</span>
<button class="increase" aria-label="previous question" @click="prevQuestion"></button>
<button class="increase right" aria-label="next question" @click="nextQuestion"></button>
</div>
<div class="controls right" x-data="fails.teamB">
<ul class="list fail-list right" @click="increase">
<li x-bind:class="fails >= 1 ? 'active' : ''">X</li>
<li x-bind:class="fails >= 2 ? 'active' : ''">X</li>
<li x-bind:class="fails >= 3 ? 'active' : ''">X</li>
</ul>
<button class="increase" aria-label="increase" @click="increase"></button>
</div>
</div>
</template>
stay tuned
</div>
</div>
<script type="module" src="/src/scripts/main.ts"></script>
Expand Down

0 comments on commit e64e2e0

Please sign in to comment.