started working on a 18+ redirect among other stuff
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Dalm 2022-04-15 17:24:56 +01:00
parent d55469631b
commit fe6122aae7
5 changed files with 73 additions and 20 deletions

40
18redirect.html Normal file
View File

@ -0,0 +1,40 @@
<!doctype html lang="en">
<head>
<Title>Hex Bomb</Title>
<link rel="stylesheet" href="mainstyles.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<style>
#textbox{
margin-left: auto;
margin-right: auto;
border-style: double solid solid double;
border-width: 4px 4px 4px 4px;
border-color: white;
display:block;
max-width: 709px;
width: 100%;
text-align: center;
}
#button{
margin-top: 30px;
background-color: black;
border: 1px white;
}
</style>
</head>
<body>
<img src="./images/18checkfinch.png" style="max-width:709px; width:100%; margin:auto; display:block;">
<div id="textbox">This site contains <b>adult content</b> not suitable for <b>people under 18 years of age!</b> <br>
<button onclick = "localStorage.setItem('adult', '1'); window.location = 'index.html';">Yes, I am over 18!</button>
</div>
</body>

View File

@ -1,11 +1,18 @@
<!doctype html>
<head><title>test</title>
<script src="https://comments.dalmationer.art/comments/embed.js"></script></head>
<script src="https://comments.dalmationer.art/comments/embed.js"></script>
<script src="./js/adultcheck.js"></script>
<style>
#commentics{
border: 2px solid black;
}</style>
</head>
<body>
bungus
@ -18,6 +25,7 @@ emb
};
</script>
</body>

View File

@ -37,15 +37,18 @@ h1{
line-height: 1em;
}
#commentics{
width: 60%;
margin-left: auto;
margin-right:auto;
border: inset 2px;
border-color: white;
margin-top: 5%;
background-color: white;
color: white;
#commentics{
width: 60%;
margin-left: auto;
margin-right:auto;
border: inset 2px;
border-color: white;
margin-top: 5%;
background-color: white;
color: white;
}
@ -53,9 +56,8 @@ h1{
@media only screen and (max-width: 800px) {
#commentics{
width: 100%;
}
#commentics{
width: 100%;
}
}

BIN
images/18checkfinch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -1,14 +1,17 @@
///in the adultcheck.js file:
///makes IsAdult equal to whatever is on the local storage
let IsAdult = localStorage.getItem("adult");
let IsAdult = localStorage.getItem('adult');
///sends you to the redirect page if it's not 1
if (IsAdult != "1") {
window.location.replace("Redirect URL");
if (IsAdult !== '1') {
window.location = "18redirect.html";
}
console.log(IsAdult)
/// on each page put: <script src="adultcheck.js"></script>
/// on redirect page: <Button onclick="localStorage.setItem("adult", "1")"; history.back();>Yes</button>
/// on each page put: <script src="adultcheck.js"></script>