Add on screen keyboard

This commit is contained in:
Arne Keller 2022-02-23 11:16:34 +01:00
parent 9ecc069cb6
commit acf727ea56
6 changed files with 75 additions and 91 deletions

View File

@ -3,10 +3,10 @@ set -e
word_file=deu_news_2021_100K-words.txt word_file=deu_news_2021_100K-words.txt
cat $word_file | head -n10000 | cut -f2 > top10000de_utf8.txt cat $word_file | head -n10000 | cut -f2 > top10000de_utf8.txt
awk '{ if (length($0) == 5) print }' top10000de_utf8.txt > top10000de_utf8_len5.txt awk '{ if (length($0) == 5) print }' top10000de_utf8.txt > top10000de_utf8_len5.txt
cat top10000de_utf8_len5.txt | rg "^([A-Za-z]|ä|ö|ü|Ä|Ö|Ü)+\$" | sort > top10000de_utf8_len5_filtered.txt cat top10000de_utf8_len5.txt | rg "^([A-Za-z]|ä|ö|ü|Ä|Ö|Ü)+\$" | sort > top10000de_utf8_len5_filtered.txt
comm -23 top10000de_utf8_len5_filtered.txt blacklist.txt > valid_words.txt comm -23 top10000de_utf8_len5_filtered.txt blacklist.txt > valid_words.txt
cat $word_file | cut -f2 | awk '{ if (length($0) == 5) print }' - | rg "^([A-Za-z]|ä|ö|ü|Ä|Ö|Ü)+\$" | sort > valid_guesses.txt cat $word_file | cut -f2 | awk '{ if (length($0) == 5) print }' - | rg "^([A-Za-z]|ä|ö|ü|Ä|Ö|Ü)+\$" | sort > valid_guesses.txt
comm -23 valid_guesses.txt blacklist.txt > valid_guesses2.txt comm -23 valid_guesses.txt blacklist.txt > valid_guesses2.txt
mv valid_guesses2.txt valid_guesses.txt mv valid_guesses2.txt valid_guesses.txt

View File

@ -26,11 +26,12 @@ body {
} }
.correct { .correct {
background-color: lime; background-color: rgb(0 204 136);
color: #000;
} }
.wrong-position { .wrong-position {
background-color: yellow; background-color: rgb(255 204 0);
color: #000; color: #000;
} }
@ -43,4 +44,40 @@ body {
font-size: xx-large; font-size: xx-large;
border: 1px solid #bbb; border: 1px solid #bbb;
vertical-align: top; vertical-align: top;
text-align: center;
} }
#keyboard {
margin-top: 1em;
}
/*
.keyboard-row:nth-child(2) {
margin-left: 0.75em;
}
.keyboard-row:nth-child(3) {
margin-left: 1.5em;
}
*/
.key {
width: 1.5em;
height: 1.5em;
font-size: xx-large;
margin: 0.05em;
vertical-align: top;
color: #fff;
background-color: rgb(107 114 128);
border-color: rgb(55 65 81);
cursor: pointer;
}
#backspace, #enter {
width: 3em;
margin: 0.1em;
display: inline-flex;
justify-content: center;
align-items: center;
}

View File

@ -1,14 +1,17 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf8"> <meta charset="utf8">
<title>Qwörtle</title>
<link rel="shortcut icon" href="./favicon.png"> <link rel="shortcut icon" href="./favicon.png">
<link rel="stylesheet" href="./index.css"> <link rel="stylesheet" href="./index.css">
<div class="centering"> <div class="centering">
<h1>Qwörtle</h1> <h1>Qwörtle</h1>
<div id="main"> <div id="main"></div>
<div id="keyboard">
</div> <div class="keyboard-row"></div>
<div class="keyboard-row"></div>
<div class="keyboard-row"></div>
</div>
</div> </div>
<script src="./index.js"></script> <script src="./index.js"></script>

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,6 @@ Abney
Abort Abort
About About
Abruf Abruf
absaß
Abtei Abtei
Abzug Abzug
achen achen
@ -339,10 +338,6 @@ AUKUS
Aulas Aulas
Aunty Aunty
Aures Aures
außen
Außen
außer
Außer
Autel Autel
Autor Autor
Autos Autos
@ -484,7 +479,6 @@ Beige
Beine Beine
Beins Beins
Beira Beira
beißt
Beitz Beitz
bekam bekam
Bekim Bekim
@ -532,7 +526,6 @@ Berti
Bertl Bertl
Beruf Beruf
BERUF BERUF
besaß
Besen Besen
beste beste
Beste Beste
@ -639,7 +632,6 @@ Blood
Bloom Bloom
bloss bloss
Bloss Bloss
bloße
Blubb Blubb
Blues Blues
Bluff Bluff
@ -844,10 +836,8 @@ Busch
Busen Busen
Bushs Bushs
Busse Busse
büßen
büsst büsst
Büsst Büsst
büßte
Büste Büste
Busty Busty
buten buten
@ -1781,7 +1771,6 @@ flauw
Fleck Fleck
Fleet Fleet
fleht fleht
Fleiß
Fleth Fleth
Fleur Fleur
Flick Flick
@ -1845,7 +1834,6 @@ Fötus
Fouls Fouls
Foyer Foyer
Foyth Foyth
Fraaß
Frach Frach
frage frage
Frage Frage
@ -1918,10 +1906,6 @@ Fürst
Furth Furth
furzt furzt
Füsse Füsse
fußen
Füßen
Fußes
fußte
fynup fynup
Gabby Gabby
Gabel Gabel
@ -1989,7 +1973,6 @@ GECKO
Geely Geely
Geers Geers
Geert Geert
Gefäß
gegen gegen
Gegen Gegen
gehen gehen
@ -2007,8 +1990,6 @@ Gelbe
Gelde Gelde
Gelle Gelle
gelte gelte
gemäß
Gemäß
Gemma Gemma
Gemmi Gemmi
Gempp Gempp
@ -2022,7 +2003,6 @@ Genre
Genth Genth
Genua Genua
genug genug
Genuß
Geoff Geoff
geölt geölt
gerät gerät
@ -2033,7 +2013,6 @@ Gerig
gerne gerne
Gerne Gerne
Gerty Gerty
Gesäß
gesät gesät
Geste Geste
getan getan
@ -2055,7 +2034,6 @@ gibts
Gibts Gibts
Giesa Giesa
Giess Giess
gießt
Gifts Gifts
Giger Giger
Giggs Giggs
@ -2129,7 +2107,6 @@ Gosar
Gosau Gosau
Gössi Gössi
Gössl Gössl
Goßow
Gothe Gothe
Götti Götti
Götze Götze
@ -2195,9 +2172,6 @@ Groos
Gropp Gropp
Grosi Grosi
Gross Gross
große
Große
Größe
grote grote
Grote Grote
Groth Groth
@ -2212,8 +2186,6 @@ grüne
Grüne Grüne
GRÜNE GRÜNE
Grupp Grupp
Grüße
grüßt
Guard Guard
Guben Guben
Gucci Gucci
@ -2421,10 +2393,6 @@ Heint
heise heise
Heise Heise
heiss heiss
heiße
Heiße
heißt
Heißt
Heist Heist
Heitz Heitz
Helau Helau
@ -2468,7 +2436,6 @@ Hertz
herum herum
Herzl Herzl
Hesse Hesse
Heßes
hetze hetze
Hetze Hetze
hetzt hetzt
@ -3050,7 +3017,6 @@ Kerne
Kerns Kerns
Kerry Kerry
Kerze Kerze
Keßen
Kette Kette
Keule Keule
Keven Keven
@ -3099,7 +3065,6 @@ klart
klärt klärt
klaum klaum
klaus klaus
Klauß
klaut klaut
Klaws Klaws
klebt klebt
@ -3533,7 +3498,6 @@ Liegt
Lienz Lienz
Liere Liere
Liese Liese
ließe
liest liest
Liest Liest
Lieth Lieth
@ -3695,7 +3659,6 @@ lupft
Lupin Lupin
Lürig Lürig
Lusin Lusin
Lüßen
Lütge Lütge
Luthe Luthe
Lüthi Lüthi
@ -3822,10 +3785,6 @@ Maske
Mason Mason
masse masse
Masse Masse
maßen
Maßen
Maßes
mäßig
matar matar
Matej Matej
Mateo Mateo
@ -4093,11 +4052,8 @@ Musik
Musks Musks
Müsli Müsli
müsse müsse
müßig
Müßig
musst musst
müsst müsst
müßte
Mutes Mutes
mutet mutet
mutig mutig
@ -4293,7 +4249,6 @@ nTred
Nübel Nübel
Nueva Nueva
Nüsse Nüsse
Nüßle
nutze nutze
Nutze Nutze
nütze nütze
@ -4654,7 +4609,6 @@ Preis
Prenn Prenn
PREOS PREOS
Press Press
Preuß
Prevc Prevc
price price
Price Price
@ -4883,7 +4837,6 @@ Reins
reise reise
Reise Reise
Reiss Reiss
reißt
reist reist
Reitz Reitz
Reize Reize
@ -5175,8 +5128,6 @@ Sapri
Sarma Sarma
Sarno Sarno
Sasha Sasha
saßen
säßen
Sassy Sassy
Satan Satan
satte satte
@ -5217,7 +5168,6 @@ schon
Schon Schon
schön schön
Schön Schön
Schoß
Schub Schub
schuf schuf
Schuh Schuh
@ -5480,7 +5430,6 @@ Spice
spiel spiel
Spiel Spiel
Spies Spies
Spieß
Spiez Spiez
Spind Spind
Spins Spins
@ -5548,7 +5497,6 @@ statt
Statt Statt
Staub Staub
Staus Staus
Stauß
staut staut
stays stays
Steak Steak
@ -5585,7 +5533,6 @@ stieg
Stieg Stieg
Stiel Stiel
Stier Stier
stieß
Stiff Stiff
Stift Stift
Stihl Stihl
@ -5618,13 +5565,9 @@ störe
Storm Storm
stört stört
Storz Storz
stoße
Stöße
stößt
Stoxx Stoxx
STOXX STOXX
Stoye Stoye
Straß
Stree Stree
Strem Strem
streu streu
@ -5675,11 +5618,6 @@ Supes
Suppe Suppe
Susan Susan
Sushi Sushi
süßen
Süßen
süßer
süßes
Süßes
Suter Suter
Svend Svend
Sweep Sweep
@ -6345,10 +6283,6 @@ Weine
weint weint
weise weise
Weise Weise
weiße
Weiße
weißt
Weißt
weist weist
Weisz Weisz
weite weite

View File

@ -37,8 +37,6 @@ Arten
Ärzte Ärzte
Asien Asien
Augen Augen
außen
außer
Autor Autor
Autos Autos
Babys Babys
@ -226,7 +224,6 @@ fühlt
führe führe
führt führt
Funke Funke
Füßen
gaben gaben
ganze ganze
Ganze Ganze
@ -239,7 +236,6 @@ gehen
Geist Geist
Gelbe Gelbe
gelte gelte
gemäß
genau genau
Genau Genau
genug genug
@ -255,9 +251,6 @@ griff
Griff Griff
Grill Grill
Gross Gross
große
Große
Größe
Grund Grund
grüne grüne
Grüne Grüne
@ -285,8 +278,6 @@ hätte
Hätte Hätte
Hause Hause
heben heben
heiße
heißt
helfe helfe
heran heran
Herrn Herrn
@ -476,7 +467,6 @@ Marke
Markt Markt
Maske Maske
Masse Masse
mäßig
Mauer Mauer
meine meine
Meine Meine
@ -597,7 +587,6 @@ sagen
Sagen Sagen
sagte sagte
sahen sahen
saßen
Sätze Sätze
sauer sauer
schon schon
@ -661,14 +650,12 @@ Stern
stets stets
Stich Stich
stieg stieg
stieß
still still
Stock Stock
Stoff Stoff
stolz stolz
Stolz Stolz
Stopp Stopp
stößt
Strom Strom
Stück Stück
Stufe Stufe
@ -766,8 +753,6 @@ Wegen
wehrt wehrt
Weile Weile
Weise Weise
weiße
Weiße
weist weist
weite weite
Welle Welle