Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rename the original "door.png" as "door-closed.png" and place in /backgrounds
- Open a photo editor (such as gimp) and merge the open door over the original background, save/export as "door-open.png" and place in /backgrounds
- Make/rename the following files:
- ~~~~~~~INDEX.HTML~~~~~~~~~~~
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8"/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
- <title>sweet blood, oh, it sings to me...</title>
- <link rel="stylesheet" href="index.css"/>
- <link rel="icon" type="image/x-icon" href="https://vampireboytoy.neocities.org/deco/tumblr_c976c1f0110dff524dead5bde74dd5df_888d378a_75.gif"/>
- </head>
- <body>
- <div id="background" class="door-closed">
- <div class="popup">
- <button id="close">×</button>
- <h1>Warning:</h1>
- <p>The following website is suited for viewers <b>18 years or older.</b></p>
- <p>There will be blood.</p>
- <p>There will be gore.</p>
- <p>There will be sex.</p>
- <p>There will be bright, flashing images.</p>
- <p>There will be more enticingly grotesque oddities, which might attract those of weak constitutions into exploring the pleasures of the night.</p>
- <p>It was not built with cellular devices in mind.</p>
- <br>
- <p><b>You have been warned.</b></p>
- </div>
- </div>
- <script src="script.js"></script>
- </body>
- </html>
- ~~~~~~~~INDEX.CSS~~~~~~~~
- @font-face {
- font-family: Alagard;
- src: url(fonts/alagard.ttf);
- }
- *,
- *:before,
- *:after {
- padding: 0;
- margin: 0;
- box-sizing: border-box;
- }
- body {
- font-family: Alagard;
- color: cornsilk;
- height: 100vh;
- margin: 0;
- }
- #background {
- width: 100vw;
- height: 100vh;
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
- transition: background-image 1s ease;
- }
- /* Background state classes */
- .door-closed {
- background-image: url(backgrounds/door-closed.png);
- }
- .door-open {
- background-image: url(backgrounds/door-open.png);
- }
- .popup {
- background-color: black;
- opacity: 0.75;
- width: 30vw;
- padding: 10px 30px;
- position: absolute;
- transform: translate(-50%, -50%);
- left: 50%;
- top: 35vh;
- border-radius: 3px;
- text-align: center;
- z-index: 6;
- display: none;
- }
- .popup button {
- display: block;
- margin: 0 0 0 auto;
- background-color: transparent;
- font-size: 30px;
- color: red;
- border: none;
- outline: none;
- cursor: pointer;
- font-family: "Alagard";
- }
- .popup p {
- font-size: 16px;
- text-align: justify;
- margin: 15px 5px;
- line-height: 25px;
- }
- @media screen and (max-width: 1024px) {
- .popup {
- width: 80vw;
- top: 30vh;
- padding: 20px;
- }
- }
- ~~~~~~~~~~~~~~~SCRIPT.JS~~~~~~~~~~~~~~~
- window.addEventListener("load", function () {
- setTimeout(function () {
- document.querySelector(".popup").style.display = "block";
- }, 1000);
- });
- document.querySelector("#close").addEventListener("click", function () {
- document.querySelector(".popup").style.display = "none";
- // Trigger the door opening after 2 seconds
- setTimeout(doorOpen, 2000);
- });
- function doorOpen() {
- const background = document.getElementById("background");
- background.classList.remove("door-closed");
- background.classList.add("door-open");
- // Make the background clickable once door is open
- background.addEventListener("click", function () {
- window.location.href = "https://vampireboytoy.neocities.org/home";
- }, { once: true });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement