Advertisement
Guest User

Untitled

a guest
May 16th, 2025
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. Rename the original "door.png" as "door-closed.png" and place in /backgrounds
  2. 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
  3. Make/rename the following files:
  4.  
  5.  
  6.  
  7. ~~~~~~~INDEX.HTML~~~~~~~~~~~
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. <head>
  11. <meta charset="UTF-8"/>
  12. <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  13. <title>sweet blood, oh, it sings to me...</title>
  14. <link rel="stylesheet" href="index.css"/>
  15. <link rel="icon" type="image/x-icon" href="https://vampireboytoy.neocities.org/deco/tumblr_c976c1f0110dff524dead5bde74dd5df_888d378a_75.gif"/>
  16. </head>
  17.  
  18. <body>
  19.  
  20. <div id="background" class="door-closed">
  21. <div class="popup">
  22. <button id="close">&times;</button>
  23. <h1>Warning:</h1>
  24. <p>The following website is suited for viewers <b>18 years or older.</b></p>
  25. <p>There will be blood.</p>
  26. <p>There will be gore.</p>
  27. <p>There will be sex.</p>
  28. <p>There will be bright, flashing images.</p>
  29. <p>There will be more enticingly grotesque oddities, which might attract those of weak constitutions into exploring the pleasures of the night.</p>
  30. <p>It was not built with cellular devices in mind.</p>
  31. <br>
  32. <p><b>You have been warned.</b></p>
  33. </div>
  34. </div>
  35.  
  36. <script src="script.js"></script>
  37. </body>
  38. </html>
  39.  
  40.  
  41.  
  42.  
  43.  
  44. ~~~~~~~~INDEX.CSS~~~~~~~~
  45. @font-face {
  46. font-family: Alagard;
  47. src: url(fonts/alagard.ttf);
  48. }
  49.  
  50. *,
  51. *:before,
  52. *:after {
  53. padding: 0;
  54. margin: 0;
  55. box-sizing: border-box;
  56. }
  57.  
  58. body {
  59. font-family: Alagard;
  60. color: cornsilk;
  61. height: 100vh;
  62. margin: 0;
  63. }
  64.  
  65. #background {
  66. width: 100vw;
  67. height: 100vh;
  68. background-size: cover;
  69. background-position: center;
  70. background-repeat: no-repeat;
  71. transition: background-image 1s ease;
  72. }
  73.  
  74. /* Background state classes */
  75. .door-closed {
  76. background-image: url(backgrounds/door-closed.png);
  77. }
  78.  
  79. .door-open {
  80. background-image: url(backgrounds/door-open.png);
  81. }
  82.  
  83. .popup {
  84. background-color: black;
  85. opacity: 0.75;
  86. width: 30vw;
  87. padding: 10px 30px;
  88. position: absolute;
  89. transform: translate(-50%, -50%);
  90. left: 50%;
  91. top: 35vh;
  92. border-radius: 3px;
  93. text-align: center;
  94. z-index: 6;
  95. display: none;
  96. }
  97.  
  98. .popup button {
  99. display: block;
  100. margin: 0 0 0 auto;
  101. background-color: transparent;
  102. font-size: 30px;
  103. color: red;
  104. border: none;
  105. outline: none;
  106. cursor: pointer;
  107. font-family: "Alagard";
  108. }
  109.  
  110. .popup p {
  111. font-size: 16px;
  112. text-align: justify;
  113. margin: 15px 5px;
  114. line-height: 25px;
  115. }
  116.  
  117. @media screen and (max-width: 1024px) {
  118. .popup {
  119. width: 80vw;
  120. top: 30vh;
  121. padding: 20px;
  122. }
  123. }
  124.  
  125.  
  126.  
  127.  
  128.  
  129. ~~~~~~~~~~~~~~~SCRIPT.JS~~~~~~~~~~~~~~~
  130. window.addEventListener("load", function () {
  131. setTimeout(function () {
  132. document.querySelector(".popup").style.display = "block";
  133. }, 1000);
  134. });
  135.  
  136. document.querySelector("#close").addEventListener("click", function () {
  137. document.querySelector(".popup").style.display = "none";
  138.  
  139. // Trigger the door opening after 2 seconds
  140. setTimeout(doorOpen, 2000);
  141. });
  142.  
  143. function doorOpen() {
  144. const background = document.getElementById("background");
  145. background.classList.remove("door-closed");
  146. background.classList.add("door-open");
  147.  
  148. // Make the background clickable once door is open
  149. background.addEventListener("click", function () {
  150. window.location.href = "https://vampireboytoy.neocities.org/home";
  151. }, { once: true });
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement