replace div to a
This commit is contained in:
parent
51e53b2e61
commit
36727a2d54
@ -17,11 +17,11 @@
|
|||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<div class="card-container">
|
<div class="card-container">
|
||||||
<div class="card blur" id="tetris-card">
|
<a class="card blur" id="tetris-card" href="https://games.penggames.systems">
|
||||||
<img src="imgs/tetris.png" alt="Penguin on the web" class="card-image" draggable="false">
|
<img src="imgs/tetris.png" alt="Penguin on the web" class="card-image" draggable="false">
|
||||||
<h2>Tetris on the web.</h2>
|
<h2>Tetris on the web.</h2>
|
||||||
<p>The best Tetris you've ever seen.</p>
|
<p>The best Tetris you've ever seen.</p>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer class="blur">
|
<footer class="blur">
|
||||||
|
@ -17,16 +17,16 @@
|
|||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
<div class="card-container">
|
<div class="card-container">
|
||||||
<div class="card blur" id="vps-card">
|
<a class="card blur" id="vps-card" href="vps.html">
|
||||||
<img src="imgs/penguin.png" alt="Penguin on the web" class="card-image" draggable="false">
|
<img src="imgs/penguin.png" alt="Penguin on the web" class="card-image" draggable="false">
|
||||||
<h2>The penguin on the web...</h2>
|
<h2>The penguin on the web.</h2>
|
||||||
<p>My Virtual private server ( vps )</p>
|
<p>My Virtual private server ( vps )</p>
|
||||||
</div>
|
</a>
|
||||||
<div class="card blur" id="games-card">
|
<a class="card blur" id="games-card" href="games.html">
|
||||||
<img src ="imgs/games.png" alt="The wonderful games" class="card-image" draggable="false">
|
<img src ="imgs/games.png" alt="The wonderful games" class="card-image" draggable="false">
|
||||||
<h2>Games</h2>
|
<h2>Games.</h2>
|
||||||
<p>My wonderful games.</p>
|
<p>My wonderful games.</p>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<footer class="blur">
|
<footer class="blur">
|
||||||
|
@ -1,27 +1 @@
|
|||||||
const body = document.querySelector("body");
|
const body = document.querySelector("body");
|
||||||
const vpsCard = document.getElementById("vps-card");
|
|
||||||
const gamesCard = document.getElementById("games-card");
|
|
||||||
|
|
||||||
body.addEventListener('scroll', () =>
|
|
||||||
{
|
|
||||||
const scrollTop = window.scrollY;
|
|
||||||
const scrollHeight = document.documentElement.scrollHeight;
|
|
||||||
const clientHeight = document.documentElement.clientHeight;
|
|
||||||
|
|
||||||
if (scrollTop + clientHeight >= scrollHeight) {
|
|
||||||
console.log("Reached the bottom of the page");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
vpsCard.addEventListener('click', () =>
|
|
||||||
{
|
|
||||||
window.location.href = "/vps.html";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
gamesCard.addEventListener('click', () =>
|
|
||||||
{
|
|
||||||
window.location.href = "/games.html";
|
|
||||||
}
|
|
||||||
);
|
|
Loading…
x
Reference in New Issue
Block a user