word-games-theme 1.2.6 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/section/wordGroup.html +0 -1
- data/_includes/word-game/word-game-generator-online.html +1 -0
- data/_includes/word-game/word-game-play.html +11 -3
- data/assets/css/game.css +25 -1
- data/assets/images/timer.svg +47 -0
- data/assets/js/createWordle.js +5 -0
- data/assets/js/game.js +57 -5
- data/assets/js/wordScrabble-test.js +5 -1
- data/assets/js/wordScrabble.js +1 -1
- data/assets/js/xyz.js +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f747fbe9f2cf0c2712706aa223d8c7afdd6e727d73248a17df658ace18b05fb
|
4
|
+
data.tar.gz: e91d475c88fd3b95c69d863943b3a17d00fdd2bac9dd6e4858d6547089f54395
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2ead3bd56ebb4de04d61404e385060742b7ece59819a15952df956f81cc6336e260d6c6885529a1897ea071fe9fda64704426e6ad8441dc7fdded7500015419
|
7
|
+
data.tar.gz: 2e9243a86ec7db0b052abe2c4e715be11b5080b6a084afe765b2257f1b146230e61a9bc9e439d0fef937293b0897e2828af5828cde579fd973b78ee0147c9f12
|
@@ -32,6 +32,7 @@
|
|
32
32
|
<div class="wordle-game-play-links">
|
33
33
|
<a style="font-size: 13px;" class="wordle-game-link"></a>
|
34
34
|
<br><br>
|
35
|
+
<a id="wordle-play-button" class="btn game-play-btn mt-2">Play Game</a>
|
35
36
|
<button type="button" class="btn copy-btn mt-2">Copy Link</button>
|
36
37
|
<!-- <button type="button" class="btn btn-primary">Play Random Word</button> -->
|
37
38
|
</div>
|
@@ -1,20 +1,27 @@
|
|
1
1
|
<div class="game">
|
2
2
|
<div class="game-container">
|
3
3
|
<div class="d-flex justify-content-center align-items-center">
|
4
|
-
<div
|
5
|
-
<i style="font-size:
|
4
|
+
<div class="pt-2" style="cursor: pointer;" data-toggle="modal" data-target="#how-to-play-wordle">
|
5
|
+
<i style="font-size:18px" class="bi bi-question-circle"></i>
|
6
6
|
</div>
|
7
7
|
<h1 class="text-center font-weight-bolder mb-0 my-4">
|
8
8
|
<a class="word-generator-link" href="/word-game-generator-online"> Make your own wordle </a>
|
9
9
|
</h1>
|
10
10
|
|
11
|
+
<div class="wordle-time pt-2" style="cursor: pointer;">
|
12
|
+
<i class="bi bi-stopwatch" style="font-size: 18px;"></i>
|
13
|
+
</div>
|
14
|
+
|
11
15
|
<!-- <div data-toggle="modal" data-target="#exampleModal">
|
12
|
-
<
|
16
|
+
<img src="/assets/images/timer.svg" alt="">
|
13
17
|
</div> -->
|
14
18
|
|
15
19
|
</div>
|
16
20
|
|
17
21
|
|
22
|
+
<div class="text-center" style="font-size: 14px;
|
23
|
+
color: #444;" id="wordle-running-timer"></div>
|
24
|
+
|
18
25
|
<div class="alert-container hide">
|
19
26
|
<span id="errorMsg"></span>
|
20
27
|
</div>
|
@@ -106,6 +113,7 @@
|
|
106
113
|
<div class="result-content">
|
107
114
|
<span id="answer" style="font-size: 20px;">You guessed the word</span>
|
108
115
|
<div id="result-guess-word" class="guess-word"></div>
|
116
|
+
<div style="font-size: 15px; margin-top: 15px;" id="game-result-time"></div>
|
109
117
|
</div>
|
110
118
|
<div class="wordle-game-play-links pt-4" style="padding:0 30px">
|
111
119
|
<a class="wordle-game-restart" href="/word-game-generator-online">
|
data/assets/css/game.css
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
color:#404040;
|
12
12
|
box-shadow: 0 0 1px rgba(0,0,0,0.1);
|
13
13
|
border-radius: 4px;
|
14
|
-
margin: 0
|
14
|
+
margin: 0 15px;
|
15
15
|
border:1px solid rgba(0,0,0,.1)
|
16
16
|
}
|
17
17
|
.create-wordle .custom-word{
|
@@ -39,6 +39,26 @@
|
|
39
39
|
font-size: 12px;
|
40
40
|
font-weight: 600;
|
41
41
|
}
|
42
|
+
|
43
|
+
.game-play-btn{
|
44
|
+
display: block;
|
45
|
+
margin: 5px auto;
|
46
|
+
background-color: #6aaa64;
|
47
|
+
border: #6aaa64;
|
48
|
+
color: #fff;
|
49
|
+
padding: 12px 15px;
|
50
|
+
width: 120px;
|
51
|
+
border-radius: 40px;
|
52
|
+
font-size: 12px;
|
53
|
+
font-weight: 600;
|
54
|
+
}
|
55
|
+
|
56
|
+
.game-play-btn:hover{
|
57
|
+
color:#fff !important
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
|
42
62
|
.create-wordle .generate-word-game-link:hover,.copy-btn:hover{
|
43
63
|
color:#fff !important
|
44
64
|
}
|
@@ -80,6 +100,7 @@
|
|
80
100
|
justify-content: center;
|
81
101
|
}
|
82
102
|
.game .game-container .game-board .tile{
|
103
|
+
caret-color: transparent;
|
83
104
|
display: flex;
|
84
105
|
justify-content: center;
|
85
106
|
align-items: center;
|
@@ -96,6 +117,9 @@
|
|
96
117
|
text-transform: uppercase;
|
97
118
|
transition: transform 240ms linear;
|
98
119
|
}
|
120
|
+
.game .game-container .game-board .tile:focus-visible{
|
121
|
+
outline: none !important;
|
122
|
+
}
|
99
123
|
.popAni{
|
100
124
|
animation: popAni 495ms ease-in-out;
|
101
125
|
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
viewBox="0 0 352.214 352.214" style="enable-background:new 0 0 352.214 352.214;" xml:space="preserve">
|
6
|
+
<g>
|
7
|
+
<path d="M306.78,134.119c3.26-1.166,6.216-3.137,8.555-5.791l0.369-0.418c7.539-8.551,6.717-21.641-1.834-29.181l-45.647-40.251
|
8
|
+
c-3.779-3.333-8.634-5.168-13.669-5.168c-5.935,0-11.589,2.552-15.509,6.997l-0.376,0.425c-1.853,2.101-3.229,4.506-4.095,7.084
|
9
|
+
c-10.61-4.573-21.856-7.938-33.566-9.927V42h6.393c11.363,0,20.607-9.245,20.607-20.607v-0.785C228.008,9.245,218.764,0,207.4,0
|
10
|
+
h-62.785c-11.363,0-20.607,9.245-20.607,20.607v0.785c0,11.363,9.244,20.607,20.607,20.607h7.393v15.756
|
11
|
+
C81.705,69.301,27.894,130.48,27.894,204c0,81.726,66.488,148.214,148.213,148.214c81.726,0,148.214-66.488,148.214-148.214
|
12
|
+
C324.32,178.746,317.965,154.951,306.78,134.119z M176.106,316.214c-61.874,0-112.213-50.339-112.213-112.214
|
13
|
+
S114.232,91.786,176.106,91.786c61.875,0,112.214,50.339,112.214,112.214S237.981,316.214,176.106,316.214z"/>
|
14
|
+
<path d="M191.008,177.583V133c0-8.284-6.716-15-15-15c-8.284,0-15,6.716-15,15v44.697c-8.778,5.186-14.683,14.742-14.683,25.656
|
15
|
+
c0,16.422,13.359,29.783,29.781,29.783c16.422,0,29.782-13.36,29.782-29.783C205.889,192.358,199.895,182.742,191.008,177.583z"/>
|
16
|
+
</g>
|
17
|
+
<g>
|
18
|
+
</g>
|
19
|
+
<g>
|
20
|
+
</g>
|
21
|
+
<g>
|
22
|
+
</g>
|
23
|
+
<g>
|
24
|
+
</g>
|
25
|
+
<g>
|
26
|
+
</g>
|
27
|
+
<g>
|
28
|
+
</g>
|
29
|
+
<g>
|
30
|
+
</g>
|
31
|
+
<g>
|
32
|
+
</g>
|
33
|
+
<g>
|
34
|
+
</g>
|
35
|
+
<g>
|
36
|
+
</g>
|
37
|
+
<g>
|
38
|
+
</g>
|
39
|
+
<g>
|
40
|
+
</g>
|
41
|
+
<g>
|
42
|
+
</g>
|
43
|
+
<g>
|
44
|
+
</g>
|
45
|
+
<g>
|
46
|
+
</g>
|
47
|
+
</svg>
|
data/assets/js/createWordle.js
CHANGED
@@ -3,6 +3,10 @@ let generateLinkButton = document.querySelector(".generate-word-game-link")
|
|
3
3
|
let wordleGameLink = document.querySelector(".wordle-game-link")
|
4
4
|
let copy_btn = document.querySelector(".copy-btn")
|
5
5
|
|
6
|
+
|
7
|
+
let wordlePlayButton = document.querySelector("#wordle-play-button")
|
8
|
+
|
9
|
+
|
6
10
|
let form = document.querySelector('#create-wordle-form')
|
7
11
|
let openPopup = document.querySelector(".open-popup")
|
8
12
|
|
@@ -43,6 +47,7 @@ const createWordle = (e) => {
|
|
43
47
|
openPopup.click()
|
44
48
|
copy_btn.innerHTML = "Copy"
|
45
49
|
copy_btn.style.background = "dodgerblue"
|
50
|
+
wordlePlayButton.setAttribute("href", `/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`)
|
46
51
|
wordleGameLink.setAttribute("href", `/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`)
|
47
52
|
wordleGameLink.innerHTML = `${window.location.protocol + "//" + window.location.hostname}/word-game-play?q=${btoa(customWord.value.toLocaleLowerCase())}`
|
48
53
|
}
|
data/assets/js/game.js
CHANGED
@@ -26,6 +26,52 @@ document.querySelector(".relatedPosts").style.display = "none"
|
|
26
26
|
document.querySelector(".footer-section").style.display = "none"
|
27
27
|
document.querySelector(".rating-tool").style.display = "none"
|
28
28
|
|
29
|
+
let wordleTime = document.querySelector(".wordle-time")
|
30
|
+
let gameResultTime = document.querySelector("#game-result-time")
|
31
|
+
let wordleRunningTimer = document.querySelector("#wordle-running-timer")
|
32
|
+
// wordleRunningTimer.innerHTML = "00:00"
|
33
|
+
|
34
|
+
let second = 0
|
35
|
+
let minutes = 0
|
36
|
+
let clear
|
37
|
+
let bool = false
|
38
|
+
function startTime() {
|
39
|
+
second++
|
40
|
+
if (second == 59) {
|
41
|
+
minutes++
|
42
|
+
second = 0
|
43
|
+
}
|
44
|
+
min = checkTime(minutes)
|
45
|
+
sec = checkTime(second)
|
46
|
+
|
47
|
+
console.log(min + ":" + sec)
|
48
|
+
|
49
|
+
wordleRunningTimer.innerText = min + ":" + sec
|
50
|
+
gameResultTime.innerHTML = "Your game ended :" + " " + min + ":" + sec
|
51
|
+
|
52
|
+
clear = setTimeout(function () {
|
53
|
+
startTime()
|
54
|
+
}, 1000)
|
55
|
+
}
|
56
|
+
function expriyTime() {
|
57
|
+
clearInterval(clear)
|
58
|
+
}
|
59
|
+
function checkTime(i) {
|
60
|
+
if (i < 10) {
|
61
|
+
i = '0' + i
|
62
|
+
}
|
63
|
+
return i
|
64
|
+
}
|
65
|
+
|
66
|
+
// wordleTime.addEventListener("click", (() => {
|
67
|
+
// if (bool) {
|
68
|
+
// bool = false
|
69
|
+
// wordleRunningTimer.style.display = "block"
|
70
|
+
// } else {
|
71
|
+
// bool = true
|
72
|
+
// wordleRunningTimer.style.display = "none"
|
73
|
+
// }
|
74
|
+
// }))
|
29
75
|
|
30
76
|
let dictionary
|
31
77
|
let attempt = 0
|
@@ -38,6 +84,10 @@ getData()
|
|
38
84
|
|
39
85
|
const handleClick = (e) => {
|
40
86
|
if (e.target.matches("[data-key]")) {
|
87
|
+
pressCount++;
|
88
|
+
if (pressCount == 1) {
|
89
|
+
startTime()
|
90
|
+
}
|
41
91
|
pressKey(e.target.dataset.key)
|
42
92
|
return
|
43
93
|
}
|
@@ -50,7 +100,12 @@ const handleClick = (e) => {
|
|
50
100
|
return
|
51
101
|
}
|
52
102
|
}
|
103
|
+
let pressCount = 0;
|
53
104
|
const handleKeyPress = (e) => {
|
105
|
+
pressCount++;
|
106
|
+
if (pressCount == 1) {
|
107
|
+
startTime()
|
108
|
+
}
|
54
109
|
if (e.key === "Enter") {
|
55
110
|
handleSubmit()
|
56
111
|
return
|
@@ -59,7 +114,6 @@ const handleKeyPress = (e) => {
|
|
59
114
|
deleteKey()
|
60
115
|
return
|
61
116
|
}
|
62
|
-
|
63
117
|
if (e.key.match(/^[a-zA-Z]$/)) {
|
64
118
|
pressKey(e.key)
|
65
119
|
return
|
@@ -125,7 +179,6 @@ const handleSubmit = () => {
|
|
125
179
|
const evaluateTiles = (allTiles, matchedLettersCount, guessWord) => {
|
126
180
|
let reEvaluate = []
|
127
181
|
allTiles.map((tile, index) => {
|
128
|
-
|
129
182
|
if (targetWord !== guessWord) {
|
130
183
|
setTimeout(() => {
|
131
184
|
tile.classList.add("flip")
|
@@ -137,8 +190,6 @@ const evaluateTiles = (allTiles, matchedLettersCount, guessWord) => {
|
|
137
190
|
tile.classList.remove("flip")
|
138
191
|
})
|
139
192
|
}
|
140
|
-
|
141
|
-
|
142
193
|
let letter = tile.dataset.letter
|
143
194
|
let key = keyboard.querySelector(`[data-key="${letter}"i]`)
|
144
195
|
if (targetWord[index] === letter) {
|
@@ -161,7 +212,6 @@ const evaluateTiles = (allTiles, matchedLettersCount, guessWord) => {
|
|
161
212
|
tile.dataset.state = "wrong-word"
|
162
213
|
key.dataset.state = "wrong-word"
|
163
214
|
}
|
164
|
-
|
165
215
|
})
|
166
216
|
startAllEventListeners()
|
167
217
|
gameOver(guessWord, allTiles)
|
@@ -186,6 +236,7 @@ const gameOver = (guessWord, tiles) => {
|
|
186
236
|
})
|
187
237
|
}
|
188
238
|
if (guessWord === targetWord) {
|
239
|
+
expriyTime()
|
189
240
|
// console.log(`Wordle guessed in ${attempt}/6!`)
|
190
241
|
facebookSHareLink.setAttribute("href",
|
191
242
|
`https://www.facebook.com/share.php?u=${window.location.protocol + "//" + window.location.hostname}/word-game-play?q=${(serachValue)}"e=
|
@@ -212,6 +263,7 @@ const gameOver = (guessWord, tiles) => {
|
|
212
263
|
}
|
213
264
|
const remainingTiles = gameBoard.querySelectorAll(":not([data-letter])")
|
214
265
|
if (remainingTiles.length === 0) {
|
266
|
+
expriyTime()
|
215
267
|
facebookSHareLink.setAttribute("href",
|
216
268
|
`https://www.facebook.com/share.php?u=${window.location.protocol + "//" + window.location.hostname}/word-game-play?q=${(serachValue)}"e=
|
217
269
|
I guessed this wordle in ${attempt}/6 tries. Can you do better ?
|
@@ -5,6 +5,7 @@ const getScript = document.currentScript
|
|
5
5
|
let form = document.querySelector('#form')
|
6
6
|
let wordCount = document.querySelector('.wordCount')
|
7
7
|
let main = document.querySelector('.main')
|
8
|
+
// let loader = document.querySelector(".main-loader")
|
8
9
|
let errorMsg = document.querySelector('.errorMsg')
|
9
10
|
let script = document.currentScript
|
10
11
|
|
@@ -359,6 +360,8 @@ function getWords(data) {
|
|
359
360
|
`
|
360
361
|
let tabs = document.getElementsByClassName('tab_link')
|
361
362
|
tabs[0] ? tabs[0].classList.add('active-tab') : ''
|
363
|
+
|
364
|
+
|
362
365
|
main.innerHTML += `
|
363
366
|
<div class="allGroupWords wordlistContainer" id="alpha_${i}">
|
364
367
|
<div class="wordListHeading">
|
@@ -371,6 +374,7 @@ function getWords(data) {
|
|
371
374
|
</div>
|
372
375
|
</div>
|
373
376
|
`
|
377
|
+
|
374
378
|
}
|
375
379
|
}
|
376
380
|
}
|
@@ -759,7 +763,7 @@ function Filtering(id) {
|
|
759
763
|
}
|
760
764
|
})
|
761
765
|
|
762
|
-
document.
|
766
|
+
document.documentElement.scrollTop = sections[sort_val + '_' + id] + 5
|
763
767
|
}
|
764
768
|
|
765
769
|
// next && previous functionality
|
data/assets/js/wordScrabble.js
CHANGED
data/assets/js/xyz.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: word-games-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- manpreet-appscms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -262,6 +262,7 @@ files:
|
|
262
262
|
- assets/images/star.png
|
263
263
|
- assets/images/star.svg
|
264
264
|
- assets/images/test.png
|
265
|
+
- assets/images/timer.svg
|
265
266
|
- assets/images/twitter-square.svg
|
266
267
|
- assets/images/twitter.svg
|
267
268
|
- assets/images/twitter2.svg
|