css variables, change max_guesses behaviour in wordle
Build / Build-image (push) Successful in 1m19s

This commit is contained in:
2026-09-05 13:00:41 +02:00
parent cc892fdebf
commit 5613a95063
4 changed files with 21 additions and 8 deletions
+7 -2
View File
@@ -1,6 +1,6 @@
<template>
<Modal v-model:open="open">
<h1>Wordle for the tired</h1>
<h1>Wordle for word {{ index }}</h1>
<br>
<div class="flex-container-a gap-1.5">
<template v-for="i in max_guesses">
@@ -18,9 +18,13 @@
<WordleRow v-if="guesses.length < i" :length="correct.length"/>
</template>
<template v-if="guesses[guesses.length-1].toString().replace(/\,/gi, '') == correct">
You guessed word #{{ index }}! It was '{{ correct }}'
</template>
</div>
<UButton @click="onsubmit" class="m-1.5">
<UButton @click="onsubmit" class="m-1.5" v-if="guesses[guesses.length-1].toString().replace(/\,/gi, '') != correct">
Submit
</UButton>
</Modal>
@@ -54,6 +58,7 @@
},
mounted() {
this.guesses = JSON.parse(localStorage.getItem('guesses-' + this.index) || '[""]');
this.max_guesses = this.correct.length > 5 ? this.correct.length : 6
},
methods: {
onsubmit () {