started js and favicon
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Sass
|
||||
*.css.map
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
BIN
android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
apple-touch-icon.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
9
browserconfig.xml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/mstile-150x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
BIN
favicon-16x16.png
Normal file
After Width: | Height: | Size: 833 B |
BIN
favicon-32x32.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
|
@ -11,6 +11,9 @@ body {
|
|||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
header {
|
||||
|
@ -97,14 +100,14 @@ header p {
|
|||
transition: all 0.3s;
|
||||
transform: scale(-1, 1);
|
||||
}
|
||||
.letters .row .backspace {
|
||||
.letters .row #backspace {
|
||||
width: 5rem;
|
||||
}
|
||||
.letters .row .backspace svg {
|
||||
.letters .row #backspace svg {
|
||||
transform: scale(-1, 1);
|
||||
width: 50%;
|
||||
}
|
||||
.letters .row .enter {
|
||||
.letters .row #enter {
|
||||
width: 5rem;
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["index.sass","index.css"],"names":[],"mappings":"AAOA;EACE,UAAA;EACA,SAAA;EACA,sBAAA;ACNF;;ADQA;EACE,YAAA;EACA,aAAA;EAEA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;ACNF;;ADQA;EACE,sCAtBM;EAuBN,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,uBAAA;ACLF;ADOE;EACE,iBAAA;EACA,gBAAA;EACA,mBAAA;ACLJ;;ADOA;EACE,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,WAAA;EACA,kCArCW;ACiCb;;ADMA;EACE,aAAA;EACA,sBAAA;EACA,WAAA;ACHF;ADKE;EACE,aAAA;EACA,mBAAA;EACA,WAAA;ACHJ;ADKI;EACE,WAAA;EACA,YAAA;EACA,yBAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,uBAAA;ACHN;ADKM;EACE,yBA1DQ;EA2DR,WAAA;EACA,YAAA;ACHR;ADKM;EACE,yBAhEQ;EAiER,WAAA;EACA,YAAA;ACHR;ADKM;EACE,yBAnEO;EAoEP,WAAA;EACA,YAAA;ACHR;;ADKA;EACE,aAAA;EACA,sBAAA;EACA,SAAA;EACA,iBAAA;EACA,gBAAA;ACFF;ADIE;EACE,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,SAAA;ACFJ;ADII;EACE,WAAA;EACA,YAAA;EACA,uBAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;EACA,oBAAA;EACA,uBAAA;ACFN;ADII;EACE,WAAA;ACFN;ADIM;EACE,uBAAA;EACA,UAAA;ACFR;ADKI;EACE,WAAA;ACHN;;ADKA;EACE,sCAlHM;EAmHN,eAAA;EACA,gBAAA;EACA,gBAAA;ACFF;ADIE;EACE,WAAA;EACA,qBAAA;EACA,gBAAA;EACA,oBAAA;ACFJ;ADII;EACE,WAAA;ACFN","file":"index.css"}
|
||||
{"version":3,"sources":["index.sass","index.css"],"names":[],"mappings":"AAWA;EACE,UAAA;EACA,SAAA;EACA,sBAAA;ACVF;;ADYA;EACE,YAAA;EACA,aAAA;EAEA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EAEA,yBAAA;KAAA,sBAAA;UAAA,iBAAA;ACXF;;ADaA;EACE,sCA5BM;EA6BN,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,uBAAA;ACVF;ADYE;EACE,iBAAA;EACA,gBAAA;EACA,mBAAA;ACVJ;;ADYA;EACE,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,WAAA;EACA,kCA3CW;ACkCb;;ADWA;EACE,aAAA;EACA,sBAAA;EACA,WAAA;ACRF;ADUE;EACE,aAAA;EACA,mBAAA;EACA,WAAA;ACRJ;ADUI;EACE,WAAA;EACA,YAAA;EACA,yBAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,uBAAA;ACRN;ADUM;EACE,yBAhEQ;EAiER,WAAA;EACA,YAAA;ACRR;ADUM;EACE,yBAtEQ;EAuER,WAAA;EACA,YAAA;ACRR;ADUM;EACE,yBAzEO;EA0EP,WAAA;EACA,YAAA;ACRR;;ADUA;EACE,aAAA;EACA,sBAAA;EACA,SAAA;EACA,iBAAA;EACA,gBAAA;ACPF;ADSE;EACE,aAAA;EACA,mBAAA;EACA,uBAAA;EACA,SAAA;ACPJ;ADSI;EACE,WAAA;EACA,YAAA;EACA,uBAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;EACA,oBAAA;EACA,uBAAA;ACPN;ADSI;EACE,WAAA;ACPN;ADSM;EACE,uBAAA;EACA,UAAA;ACPR;ADUI;EACE,WAAA;ACRN;;ADUA;EACE,sCAxHM;EAyHN,eAAA;EACA,gBAAA;EACA,gBAAA;ACPF;ADSE;EACE,WAAA;EACA,qBAAA;EACA,gBAAA;EACA,oBAAA;ACPJ;ADSI;EACE,WAAA;ACPN","file":"index.css"}
|
92
index.html
|
@ -1,6 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
|
||||
<meta name="msapplication-TileColor" content="#da532c" />
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>eldroW</title>
|
||||
|
@ -20,20 +27,20 @@
|
|||
</header>
|
||||
|
||||
<div class="game">
|
||||
<div class="board">
|
||||
<div class="board" id="board">
|
||||
<div class="row">
|
||||
<div class="cell absent">Y</div>
|
||||
<div class="cell present">R</div>
|
||||
<div class="cell absent">R</div>
|
||||
<div class="cell">U</div>
|
||||
<div class="cell">C</div>
|
||||
<div class="cell absent" id="Y">Y</div>
|
||||
<div class="cell present" id="R">R</div>
|
||||
<div class="cell absent" id="R">R</div>
|
||||
<div class="cell absent" id="U">U</div>
|
||||
<div class="cell absent" id="C">C</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell">W</div>
|
||||
<div class="cell">A</div>
|
||||
<div class="cell">T</div>
|
||||
<div class="cell">E</div>
|
||||
<div class="cell">R</div>
|
||||
<div class="cell" id="R">R</div>
|
||||
<div class="cell" id="E">E</div>
|
||||
<div class="cell" id="T">T</div>
|
||||
<div class="cell" id="A">A</div>
|
||||
<div class="cell" id="W">W</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="cell"></div>
|
||||
|
@ -66,38 +73,38 @@
|
|||
</div>
|
||||
<div class="letters">
|
||||
<div class="row">
|
||||
<div class="letter">P</div>
|
||||
<div class="letter">O</div>
|
||||
<div class="letter">I</div>
|
||||
<div class="letter">U</div>
|
||||
<div class="letter">Y</div>
|
||||
<div class="letter">T</div>
|
||||
<div class="letter">R</div>
|
||||
<div class="letter">E</div>
|
||||
<div class="letter">W</div>
|
||||
<div class="letter">Q</div>
|
||||
<div class="letter" id="P">P</div>
|
||||
<div class="letter" id="O">O</div>
|
||||
<div class="letter" id="I">I</div>
|
||||
<div class="letter" id="U">U</div>
|
||||
<div class="letter" id="Y">Y</div>
|
||||
<div class="letter" id="T">T</div>
|
||||
<div class="letter" id="R">R</div>
|
||||
<div class="letter" id="E">E</div>
|
||||
<div class="letter" id="W">W</div>
|
||||
<div class="letter" id="Q">Q</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="letter">L</div>
|
||||
<div class="letter">K</div>
|
||||
<div class="letter">J</div>
|
||||
<div class="letter">H</div>
|
||||
<div class="letter">G</div>
|
||||
<div class="letter">F</div>
|
||||
<div class="letter">D</div>
|
||||
<div class="letter">S</div>
|
||||
<div class="letter">A</div>
|
||||
<div class="letter" id="L">L</div>
|
||||
<div class="letter" id="K">K</div>
|
||||
<div class="letter" id="J">J</div>
|
||||
<div class="letter" id="H">H</div>
|
||||
<div class="letter" id="G">G</div>
|
||||
<div class="letter" id="F">F</div>
|
||||
<div class="letter" id="D">D</div>
|
||||
<div class="letter" id="S">S</div>
|
||||
<div class="letter" id="A">A</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="letter enter">ENTER</div>
|
||||
<div class="letter">M</div>
|
||||
<div class="letter">N</div>
|
||||
<div class="letter">B</div>
|
||||
<div class="letter">V</div>
|
||||
<div class="letter">C</div>
|
||||
<div class="letter">X</div>
|
||||
<div class="letter">Z</div>
|
||||
<div class="letter backspace">
|
||||
<div class="letter" id="backspace">ENTER</div>
|
||||
<div class="letter" id="M">M</div>
|
||||
<div class="letter" id="N">N</div>
|
||||
<div class="letter" id="B">B</div>
|
||||
<div class="letter" id="V">V</div>
|
||||
<div class="letter" id="C">C</div>
|
||||
<div class="letter" id="X">X</div>
|
||||
<div class="letter" id="Z">Z</div>
|
||||
<div class="letter" id="backspace">
|
||||
<svg
|
||||
height="100%"
|
||||
width="100%"
|
||||
|
@ -120,7 +127,12 @@
|
|||
</div>
|
||||
|
||||
<footer>
|
||||
<p>created by <a href="crucialnet.org">rushil</a></p>
|
||||
<p>
|
||||
created by <a target="_blank" href="https://crucialnet.org">rushil</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<script src="lists.js"></script>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
40
index.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
const LENGTH = 5;
|
||||
const GUESSES = LENGTH + 1;
|
||||
|
||||
let hashDate = (date) => {
|
||||
return date.getFullYear() + date.getMonth() + date.getDate();
|
||||
};
|
||||
|
||||
const currentWord = ANSWERS[hashDate(new Date()) % ANSWERS.length];
|
||||
|
||||
// initialize board
|
||||
|
||||
let guesses = [];
|
||||
let boardElement = document.getElementById("board");
|
||||
|
||||
boardElement.innerHTML = "";
|
||||
|
||||
for (let i = 0; i < GUESSES; i++) {
|
||||
let row = document.createElement("div");
|
||||
row.classList.add("row");
|
||||
row.id = "row" + i;
|
||||
boardElement.appendChild(row);
|
||||
|
||||
for (let i = 0; i < LENGTH; i++) {
|
||||
let cell = document.createElement("div");
|
||||
cell.classList.add("cell");
|
||||
cell.id = "cell" + i;
|
||||
row.appendChild(cell);
|
||||
}
|
||||
}
|
||||
|
||||
let running = true;
|
||||
let currentGuess = "";
|
||||
|
||||
let updateBoard = () => {
|
||||
let row = document.getElementById("row" + guesses.length);
|
||||
for (let i = LENGTH; i > 0; i--) {
|
||||
let cell = document.getElementById("cell" + i);
|
||||
cell.innerHTML = currentGuess[i] || "";
|
||||
}
|
||||
};
|
10
index.sass
|
@ -4,6 +4,10 @@ $sans-serif: 'Raleway', sans-serif
|
|||
$color-present: #c9b458
|
||||
$color-correct: #6aaa64
|
||||
$color-absent: #787c7e
|
||||
|
||||
$key-color-present: #c9b458
|
||||
$key-color-correct: #6aaa64
|
||||
$key-color-absent: #787c7e
|
||||
|
||||
*
|
||||
padding: 0
|
||||
|
@ -19,6 +23,8 @@ body
|
|||
justify-content: center
|
||||
align-items: center
|
||||
|
||||
user-select: none
|
||||
|
||||
header
|
||||
font-family: $serif
|
||||
font-size: 1.5rem
|
||||
|
@ -100,7 +106,7 @@ header
|
|||
transition: all 0.3s
|
||||
transform: scale(-1, 1)
|
||||
|
||||
.backspace
|
||||
#backspace
|
||||
width: 5rem
|
||||
|
||||
svg
|
||||
|
@ -108,7 +114,7 @@ header
|
|||
width: 50%
|
||||
|
||||
|
||||
.enter
|
||||
#enter
|
||||
width: 5rem
|
||||
|
||||
footer
|
||||
|
|
BIN
mstile-144x144.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
mstile-150x150.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
mstile-310x150.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
mstile-310x310.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
mstile-70x70.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
32
safari-pinned-tab.svg
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M734 6815 c-108 -23 -222 -81 -322 -163 -96 -79 -199 -255 -227 -389
|
||||
-13 -64 -15 -404 -13 -2820 l3 -2748 27 -80 c40 -116 92 -199 183 -290 89 -90
|
||||
185 -147 315 -187 l75 -23 2690 -3 c1786 -2 2718 1 2775 8 304 36 553 253 627
|
||||
545 17 66 18 215 18 2810 l0 2740 -23 78 c-70 244 -241 425 -477 505 l-80 27
|
||||
-2755 2 c-2262 1 -2766 -1 -2816 -12z m1556 -1220 l0 -895 -890 0 -890 0 0
|
||||
740 c0 707 1 743 19 796 27 75 77 142 141 187 98 68 66 66 883 66 l737 1 0
|
||||
-895z m2120 -5 l0 -900 -267 0 c-148 0 -548 3 -890 7 l-623 6 0 894 0 893 890
|
||||
0 890 0 0 -900z m1912 868 c112 -52 195 -159 217 -282 7 -39 11 -301 11 -768
|
||||
l0 -708 -900 0 -900 0 0 895 0 895 758 -2 757 -3 57 -27z m-4022 -2365 c0
|
||||
-148 -3 -548 -7 -890 l-6 -623 -889 0 -888 0 0 890 0 890 895 0 895 0 0 -267z
|
||||
m1442 257 l678 0 0 -312 c0 -172 -3 -573 -7 -890 l-6 -578 -889 0 -888 0 0
|
||||
273 c0 149 3 553 7 896 l6 624 210 -6 c116 -4 515 -7 889 -7z m2808 -880 l0
|
||||
-890 -900 0 -900 0 0 393 c0 217 3 617 7 890 l6 497 894 0 893 0 0 -890z
|
||||
m-5007 -1230 l747 0 0 -233 c0 -129 -3 -531 -7 -895 l-6 -662 -712 0 c-771 0
|
||||
-776 0 -870 56 -56 32 -117 99 -152 166 l-28 53 -3 764 -2 764 142 -6 c79 -4
|
||||
479 -7 891 -7z m2114 -10 l753 0 0 -890 0 -890 -895 0 -895 0 0 708 c0 389 3
|
||||
792 7 896 l6 189 135 -7 c74 -3 474 -6 889 -6z m2893 -708 c0 -766 -1 -775
|
||||
-50 -871 -30 -60 -108 -131 -180 -165 l-65 -31 -752 -3 -753 -3 0 896 0 895
|
||||
900 0 900 0 0 -718z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
19
site.webmanifest
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff",
|
||||
"display": "standalone"
|
||||
}
|