Added some more styling
This commit is contained in:
parent
13f1642d56
commit
5d52b799bb
@ -1,4 +1,17 @@
|
||||
span.letter {
|
||||
body {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
body input {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
body button {
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
body span.letter {
|
||||
font-family: 'Ubuntu', sans-serif;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
@ -8,28 +21,28 @@ span.letter {
|
||||
color: white;
|
||||
}
|
||||
|
||||
span.letter.red {
|
||||
body span.letter.red {
|
||||
background: #ed3746;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#ed3746), to(#ed1a2d));
|
||||
background: linear-gradient(to bottom, #ed3746 0%, #ed1a2d 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ed3746', endColorstr='#ed1a2d',GradientType=0 );
|
||||
}
|
||||
|
||||
span.letter.orange {
|
||||
body span.letter.orange {
|
||||
background: #d6b855;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#d6b855), to(#d6a400));
|
||||
background: linear-gradient(to bottom, #d6b855 0%, #d6a400 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d6b855', endColorstr='#d6a400',GradientType=0 );
|
||||
}
|
||||
|
||||
span.letter.blue {
|
||||
body span.letter.blue {
|
||||
background: #4094dc;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#4094dc), to(#0466c7));
|
||||
background: linear-gradient(to bottom, #4094dc 0%, #0466c7 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4094dc', endColorstr='#0466c7',GradientType=0 );
|
||||
}
|
||||
|
||||
span.letter.grey {
|
||||
body span.letter.grey {
|
||||
background: #838383;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#838383), to(#545454));
|
||||
background: linear-gradient(to bottom, #838383 0%, #545454 100%);
|
||||
|
@ -1,6 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AASI,IATA,CASA,IAAI,AAAA,OAAO,CAAC;EACR,WAAW,EAAE,oBAAoB;EACjC,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,YAAY;EACrB,UAAU,EAAE,MAAM;EAClB,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,KAAK;CA6Bf;;AA7CL,AAiBQ,IAjBJ,CASA,IAAI,AAAA,OAAO,AAQN,IAAI,CAAC;EACF,UAAU,EAAE,OAAO;EACnB,UAAU,EAAE,mDAAoD;EAChE,UAAU,EAAE,sDAAsD;EAClE,UAAU,EAAE,oDAAoD;EAChE,MAAM,EAAE,2GAA2G;CACtH;;AAvBT,AAwBQ,IAxBJ,CASA,IAAI,AAAA,OAAO,AAeN,OAAO,CAAC;EACL,UAAU,EAAE,OAAO;EACnB,UAAU,EAAE,mDAAoD;EAChE,UAAU,EAAE,sDAAsD;EAClE,UAAU,EAAE,oDAAoD;EAChE,MAAM,EAAE,2GAA2G;CACtH;;AA9BT,AA+BQ,IA/BJ,CASA,IAAI,AAAA,OAAO,AAsBN,KAAK,CAAC;EACH,UAAU,EAAE,OAAO;EACnB,UAAU,EAAE,mDAAoD;EAChE,UAAU,EAAE,sDAAsD;EAClE,UAAU,EAAE,oDAAoD;EAChE,MAAM,EAAE,2GAA2G;CACtH;;AArCT,AAsCQ,IAtCJ,CASA,IAAI,AAAA,OAAO,AA6BN,KAAK,CAAC;EACH,UAAU,EAAE,OAAO;EACnB,UAAU,EAAE,mDAAoD;EAChE,UAAU,EAAE,sDAAsD;EAClE,UAAU,EAAE,oDAAoD;EAChE,MAAM,EAAE,2GAA2G;CACtH",
|
||||
"sources": [
|
||||
"index.scss"
|
||||
],
|
||||
|
@ -1,4 +1,13 @@
|
||||
span.letter {
|
||||
body {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
text-align: center;
|
||||
input {
|
||||
height: 20px;
|
||||
}
|
||||
button {
|
||||
height: 28px;
|
||||
}
|
||||
span.letter {
|
||||
font-family: 'Ubuntu', sans-serif;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
@ -34,4 +43,5 @@ span.letter {
|
||||
background: linear-gradient(to bottom, #838383 0%,#545454 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#838383', endColorstr='#545454',GradientType=0 );
|
||||
}
|
||||
}
|
||||
}
|
10
index.html
10
index.html
@ -9,7 +9,7 @@
|
||||
<title>Lingo</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<div class="formContainer box">
|
||||
<form id="submitForm">
|
||||
<input type="text" id="wordInput" autocomplete="off" placeholder="Submit word">
|
||||
<button type="submit">Versturen</button>
|
||||
@ -18,11 +18,13 @@
|
||||
<form id="guessForm" style="display: none;">
|
||||
<input type="text" id="wordInput" autocomplete="off" placeholder="Guess word">
|
||||
<button type="submit">Versturen</button>
|
||||
</form>
|
||||
<button id="restart">Opnieuw beginnen</button>
|
||||
<button id="giveUp">Opgeven</button>
|
||||
</form>
|
||||
|
||||
<button id="restart" style="display: none;">Opnieuw beginnen</button>
|
||||
</div>
|
||||
|
||||
<div class="contentContainer box">
|
||||
<span id="letterCount"></span><br>
|
||||
<span id="word"></span><br>
|
||||
|
||||
@ -31,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<span id="result"></span>
|
||||
|
||||
</div>
|
||||
<script src="./js/index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -49,7 +49,7 @@ function checkWord(guessArray, wordArray) {
|
||||
submitForm.addEventListener('submit', function(event) {
|
||||
event.preventDefault();
|
||||
word = submitForm.children[0].value;
|
||||
if (word.split('').length > 0) {
|
||||
if (word.split('').length > 1) {
|
||||
word = word.toUpperCase();
|
||||
wordArray = word.split('');
|
||||
resultElement.innerHTML = '';
|
||||
@ -113,6 +113,7 @@ guessForm.addEventListener('submit', function(event) {
|
||||
audio.allCorrect.play();
|
||||
resultElement.innerHTML = "JP: Gefeliciteerd, u heeft gewonnen";
|
||||
guessForm.style.display = 'none';
|
||||
document.getElementById('restart').style.display = 'inline-block';
|
||||
}
|
||||
}
|
||||
showLetter();
|
||||
@ -123,10 +124,12 @@ guessForm.addEventListener('submit', function(event) {
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('giveUp').addEventListener('click', function () {
|
||||
document.getElementById('giveUp').addEventListener('click', function (event) {
|
||||
event.preventDefault();
|
||||
audio.giveUp.play();
|
||||
});
|
||||
|
||||
document.getElementById('restart').addEventListener('click', function () {
|
||||
document.getElementById('restart').addEventListener('click', function (event) {
|
||||
event.preventDefault();
|
||||
location.reload();
|
||||
});
|
Loading…
Reference in New Issue
Block a user