Skip to content

Commit

Permalink
Add cookie popup (for when its needed)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicianessuwu committed Apr 30, 2024
1 parent f31c0fe commit bc21aaf
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 1 deletion.
Binary file added assets/textures/cobblestone_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/dark_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/textures/water.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@
</div>
</div>
</main>
<div id="popup" style="display: none;">
<div id="popup-background"></div>
<div id="agree-popup">
<p class="title">Cookie preferences</p>
<p>
To use this feature, please allow this webpage to collect cookies. This allows the website to save
preferences. We do not share information to any company.<br><br>Do you want to enable cookies on this
page?<br>
<button onclick="document.getElementById('popup').innerHTML = '';">Yes</button>
<button onclick="window.location.href = 'https://google.com/'">No, take me back</button>
</p>
</div>
</div>
<footer>
<div>
<a href="?">Legal</a>
Expand All @@ -99,4 +112,5 @@
<script src="scripts/index.js"></script>
<script src="scripts/motd_randomiser.js"></script>
</body>

</html>
47 changes: 46 additions & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ main img {
margin-right: 0px;
margin-bottom: 5px;
}

.flexbox .container:last-child {
margin-left: 0px;
margin-top: 5px;
Expand Down Expand Up @@ -264,4 +264,49 @@ main img {

.heading {
color: #30ff30;
}

#popup-background {
background-image: linear-gradient(#000000a0 0%, #000000a0 100%), url(assets/textures/water.png);
image-rendering: pixelated;
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
background-size: 64px;
position: fixed;
top: 0px;
left: 0px;
width: 100vw;
height: 100vh;
backdrop-filter: blur(4px);
}

#agree-popup {
background-image: url(assets/textures/stone.png);
image-rendering: pixelated;
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
background-size: 64px;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 500px;
box-shadow: inset 0 0 10px #000000;
margin-top: 10px;
}

#agree-popup .title {
background-image: url(assets/textures/window_title.png);
image-rendering: pixelated;
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
background-size: 64px;
padding: 4px;
box-shadow: inset 0 0 10px #000000;
font-size: 18px;
}

#agree-popup p {
margin: 0px;
padding: 20px;
}

0 comments on commit bc21aaf

Please sign in to comment.