added support popup

This commit is contained in:
gocivici 2022-09-07 17:05:49 +03:00
parent 1dfae4df09
commit 7233912abd
3 changed files with 63 additions and 7 deletions

View File

@ -13,6 +13,7 @@
<div class="subnav"> <div class="subnav">
<div class="topnav-left"> <div class="topnav-left">
<a class="wideInfo" href="#info"><i class="fa fa-question"></i></a> <a class="wideInfo" href="#info"><i class="fa fa-question"></i></a>
<a class="wideInfo" href="#support"><i class="fa fa-heart"></i></a>
</div> </div>
<img class="title" width="300" src="title.png" alt="horrordle"> <img class="title" width="300" src="title.png" alt="horrordle">
@ -21,6 +22,7 @@
<a href="#contact">Contact</a> --> <a href="#contact">Contact</a> -->
<div class="topnav-right"> <div class="topnav-right">
<a class="mobileInfo" href="#info"><i class="fa fa-question"></i></a> <a class="mobileInfo" href="#info"><i class="fa fa-question"></i></a>
<a class="mobileInfo" href="#support"><i class="fa fa-heart"></i></a>
<a href="#stats"><i class="fas fa-chart-bar"></i></a> <a href="#stats"><i class="fas fa-chart-bar"></i></a>
<a href="#archive"><i class="fas fa-history"></i></a> <a href="#archive"><i class="fas fa-history"></i></a>
</div> </div>
@ -57,16 +59,26 @@
<div class="popup"> <div class="popup">
<h2>Stats</h2> <h2>Stats</h2>
<a class="close" href="#">&times;</a> <a class="close" href="#">&times;</a>
streak:
<div id="streakNumber" class="content"> <div id="streakNumber" class="content">
your stats your stats
</div> </div>
</div> </div>
</div> </div>
<div id="support" class="overlay">
<div class="popup">
<h2>Support</h2>
<a class="close" href="#">&times;</a>
pls support
</div>
</div>
</div>
<div id="archive" class="overlay"> <div id="archive" class="overlay">
<div class="popup"> <div class="popup">
<h2>Archive</h2> <h2>October 2022 Archive</h2>
<a class="close" href="#">&times;</a> <a class="close" href="#">&times;</a>
<div class="archive"> <div class="archive">
<div class="calendar"> <div class="calendar">
@ -154,8 +166,15 @@
<div id="thirdGuess"></div> <div id="thirdGuess"></div>
</div> </div>
<script src="main.js"></script> <script src="main.js"></script>
<footer class="footer">
<p>Designed with ❤️ by <a href="https://ko-fi.com/Gorkem">Görkem</a></p>
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png" /></a><br />
</footer>
</body> </body>
</html> </html>

10
main.js
View File

@ -1,7 +1,7 @@
// //
window.onload = deathOftheDay; window.onload = deathOftheDay;
var playedBefore = false; var playedBefore = false;
var sameDay = false;
for (var i = 0; i < localStorage.length; i++){ for (var i = 0; i < localStorage.length; i++){
console.log(localStorage.key(i)); console.log(localStorage.key(i));
} }
@ -11,7 +11,7 @@ for (var i = 0; i < localStorage.length; i++){
var movies = ["a nightmare on elm street","Friday the 13th","Final Destination","Scream 2","The Cabin in the Woods","American Psycho","It Follows","Candyman","Child's Play","The Texas Chain Saw Massacre","Alien","Halloween"]; var movies = ["a nightmare on elm street","Friday the 13th","Final Destination","Scream 2","The Cabin in the Woods","American Psycho","It Follows","Candyman","Child's Play","The Texas Chain Saw Massacre","Alien","Halloween"];
var pix = []; var pix = [];
autocomplete(document.getElementById("guess"), movies); autocomplete(document.getElementById("guess"), movies);
var gameBeginning = new Date('July 29, 2022 00:00:00'); var gameBeginning = new Date('September 6, 2022 00:00:00');
// gameBeginning = new Date(gameBeginning.getTime() + 0 * 60 * 1000); // gameBeginning = new Date(gameBeginning.getTime() + 0 * 60 * 1000);
console.log(gameBeginning.getTimezoneOffset()); console.log(gameBeginning.getTimezoneOffset());
var present_date = new Date(); var present_date = new Date();
@ -67,7 +67,7 @@ var points = "⬛⬛⬛"
feedback.textContent = "🩸 " + (3-guessNo) + " guesses remaining"; feedback.textContent = "🩸 " + (3-guessNo) + " guesses remaining";
if(!localStorage.getItem('streak')){localStorage.setItem('streak',0)} if(!localStorage.getItem('streak')){localStorage.setItem('streak',0)}
checkingGuess();
@ -81,7 +81,7 @@ function clearGuess() {
localStorage.removeItem('result'); localStorage.removeItem('result');
} }
function checkingGuess() { function checkingGuess() {
localStorage.setItem('day', dayCount);
streakNumber.textContent = localStorage.getItem('streak'); streakNumber.textContent = localStorage.getItem('streak');
if (localStorage.getItem('day')==dayCount) { if (localStorage.getItem('day')==dayCount) {
@ -101,8 +101,10 @@ streakNumber.textContent = localStorage.getItem('streak');
secondGuess.textContent = "❌" + localStorage.getItem('secondGuess'); secondGuess.textContent = "❌" + localStorage.getItem('secondGuess');
}else { }else {
clearGuess(); clearGuess();
localStorage.setItem('day', dayCount);
} }
} }
checkingGuess();
console.log(dayCount); console.log(dayCount);

View File

@ -70,7 +70,22 @@ align-items: center;
overflow: auto; overflow: auto;
} }
.footer{
font-family: 'Arial', sans-serif;
font-size: 12px;
position: absolute;
bottom: 10px;
left: 0;
right: 0;
width: 100%;
text-align: center;
margin: auto;
color: #ECECEC;
/* position: absolute; */
}
a {
color: white;
}
body { body {
margin: 0px; margin: 0px;
@ -238,6 +253,10 @@ input[type=button] {
float: right; float: right;
} }
.fa-heart{
color:red;
}
@media only screen and (max-width: 1200px) { @media only screen and (max-width: 1200px) {
.subnav{ .subnav{
@ -276,6 +295,8 @@ input[type=button] {
} }
.calendar { .calendar {
position: relative; position: relative;
resize: horizontal;
width: 400px; width: 400px;
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
@ -349,7 +370,16 @@ font-style:normal;
@media only screen and (max-width: 460px) {
.calendar {
max-width: 300px;
min-width: 300px;
}
.calendar__date {
padding: 10px;
grid-gap: 15px;
}
}
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
@ -399,3 +429,8 @@ input[type=button] {
} }
} }
@media only screen and (min-width: 600px) and (max-width: 1500px) {
.popup{
width: 450px;
}
}