Skip to content

Commit 27aae39

Browse files
committed
add TG link; random word every load
1 parent 4d2fb26 commit 27aae39

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

src/Game.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ function genResultGrid() {
178178
</div>
179179
</Transition>
180180
<header>
181+
<a
182+
id="tg-link"
183+
href="https://t.me/RuBibleGames"
184+
target="_blank"
185+
>Telegram</a
186+
>
181187
<h1>VVORDLE</h1>
182188
<a
183189
id="source-link"

src/game.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ header {
2222
top: 0.5em;
2323
}
2424

25+
#tg-link {
26+
position: absolute;
27+
left: 1em;
28+
top: 0.5em;
29+
}
30+
2531
.correct,
2632
.present,
2733
.absent {

src/words.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ export function getWordOfTheDay() {
1414
}
1515
}
1616

17-
const now = new Date()
18-
const start = new Date(2022, 0, 0)
19-
const diff = Number(now) - Number(start)
20-
let day = Math.floor(diff / (1000 * 60 * 60 * 24))
21-
day = day % answers.length
22-
return answers[day]
17+
const randomIndex = Math.floor(Math.random() * answers.length);
18+
return answers[randomIndex];
2319
}
2420

2521
// https://azbyka.ru/shemy/imena-biblejskie.shtml

0 commit comments

Comments
 (0)