-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
179 lines (137 loc) · 6.18 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wordle Helper</title>
<meta charset="UTF-8">
<meta name="theme-color" content="#FF284F">
<meta name="description" content="Just see next words to try">
<!-- Facebook Title -->
<meta property="og:title" content="Wordle Helper">
<meta property="og:site_name" content="anwarulislam.github.io">
<meta property="og:description" content="Just see next words to try">
<meta property="og:image" content="https://images.indianexpress.com/2022/01/Wordle-Google-Easter-Egg.jpg">
<meta property="og:image:secure_url" content="https://images.indianexpress.com/2022/01/Wordle-Google-Easter-Egg.jpg">
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="627">
<!-- end Facebook Title -->
<!-- Twitter title -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@anwaarulislaam">
<meta name="twitter:domain" content="anwarulislam.github.io">
<meta name="twitter:creator" content="@anwaarulislaam">
<meta name="twitter:title" content="Wordle Helper">
<meta name="twitter:description" content="Just see next words to try">
<meta name="twitter:image:src" content="https://images.indianexpress.com/2022/01/Wordle-Google-Easter-Egg.jpg">
<meta name="twitter:image:width" content="1200">
<meta name="twitter:image:height" content="627">
<!-- end Twitter title -->
<!-- vuejs -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<link rel="stylesheet" href="style.css">
<script type="text/x-template" id="modal-template">
<transition name="modal">
<div class="modal-mask">
<div class="modal-wrapper">
<div class="modal-container">
<span class="close-button" @click="$emit('close')">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512" class="svg-inline fa-times fa-w-10 fa-3x"><path fill="currentColor" d="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z" class=""></path></svg>
</span>
<div class="modal-header">
<slot name="header">
Words
</slot>
</div>
<div class="modal-body">
<slot name="body">
</slot>
</div>
</div>
</div>
</div>
</transition>
</script>
</head>
<body>
<div id="app">
<div>
<nav>
<div>
<!-- Place this tag where you want the button to render. -->
<a class="github-button" href="https://github.com/anwarulislam/wordle-helper" data-icon="octicon-star"
data-show-count="true" aria-label="Star anwarulislam/wordle-helper on GitHub">Star</a>
</div>
<div class="logo">
<h4>
WORDLE HELPER
</h4>
</div>
<div style="text-align: right;">
<!-- Place this tag where you want the button to render. -->
<a class="github-button" href="https://github.com/anwarulislam" data-show-count="true"
aria-label="Follow @anwarulislam on GitHub">Follow</a>
</div>
</nav>
</div>
<div class="container">
<modal v-if="showStep" @close="showStep = null">
<h3 slot="header">Words after Step {{+showStep + 1}} - {{remainingWords[showStep].length}}</h3>
<div slot="body">
<div class="word-list">
<template v-for="(word, wordIndex) in remainingWords[showStep]">
<div class="word">{{ word }}</div>
</template>
<template v-if="!remainingWords[showStep].length">
<div class="word">No words left</div>
</template>
</div>
</div>
</modal>
<div class="board">
<template v-for="(word, wordIndex) in boardState">
<div class="tile-row" v-if="word">
<div class="tile" v-for="(letter, letterIndex) in splitWord(word)"
:class="evaluations[wordIndex][letterIndex]" @click="setEvaluation(wordIndex, letterIndex)">
{{ letter }}
</div>
<a class="f-btn show-btn" v-if="currentIndex > wordIndex" @click="showRemainingWords(wordIndex);">Show</a>
<a class="f-btn" v-if="currentIndex == wordIndex" @click="filterWords()">Next</a>
</div>
<!-- empty word -->
<div class="tile-row" v-if="!word">
<div class="tile" v-for="(letter, letterIndex) in [null, null, null, null, null]"
:class="evaluations[wordIndex][letterIndex]" @click="setEvaluation(wordIndex, letterIndex)">
{{ letter }}
</div>
</div>
<!-- end empty word -->
</template>
</div>
</div>
<div class="container">
<div id="keyboard">
<div class="row" v-for="(row, rowIndex) in keyboard">
<template v-if="rowIndex == 1">
<div class="spacer half"></div>
</template>
<button @click="pressKey(key)" v-for="(key, keyIndex) in row"
:class="{'one-and-a-half': rowIndex == 2 && (keyIndex == 0 || keyIndex == row.length - 1)}">
{{ key }}
</button>
<template v-if="rowIndex == 1">
<div class="spacer half"></div>
</template>
</div>
</div>
</div>
</div>
<script src="./words.js"></script>
<script src="./proto.js"></script>
<script src="./main.js"></script>
<!-- Place this tag in your head or just before your close body tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>