Advertisement
silbrigthemes

Countdown (Page #3) – Dark Version

Jan 29th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.13 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4.  
  5. COUNTDOWN
  6.  
  7. Page #3 by @silbrigthemes
  8.  
  9. A simple countdown page for a project release.
  10.  
  11. Please do not use as a base code.
  12. Please do not distribute as your own.
  13. Please do not edit or remove the credit.
  14. Please do not edit beyond recognition.
  15.  
  16. Helpful annotations have been made to this code.
  17.  
  18. Have fun!
  19.  
  20. -->
  21. <head>
  22.  
  23. <link href="https://fonts.googleapis.com/css?family=Quicksand:300,400,500,700" rel="stylesheet">
  24. <!-- without this the custom font will not work -->
  25.  
  26. <!-- This script is necessary to make the page responsive -->
  27. <meta name="viewport" content="width=device-width, initial-scale=1">
  28.  
  29. <style type="text/css">
  30. body{
  31. margin:0;
  32. background-image:url("https://images.unsplash.com/photo-1448301858776-07f780e9c9da?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=14a643b3ca93e580bf8f1f7f051ae431&auto=format&fit=crop&w=1650&q=80");
  33. /* change your background image here */
  34. background-repeat:no-repeat;
  35. background-attachment:fixed;
  36. background-size:cover;
  37. font-family:"Quicksand", Verdana; /* change your font here; Verdana is a fall-back system font */
  38. overflow:hidden;
  39. }
  40.  
  41. #container{
  42. width:60vw; /* vw = viewport width */
  43. height:100vh; /* vh = viewport height */
  44. margin-left:20vw;
  45. background:linear-gradient(to bottom, rgba(60,68,68,0.8), rgba(215,216,218,0.8));
  46. /* linear-gradient (direction, rgba(value red, value green, value blue, opacity), rgba()) */
  47. /* the following lines should be kept as they make sure the content is centered nicely */
  48. display:flex;
  49. align-items:center;
  50. justify-content:center;
  51. flex-direction:column;
  52.  
  53. }
  54.  
  55. #top{
  56.  
  57. }
  58.  
  59. #top img{
  60. width:100px; /* change image width here */
  61. height:100px; /* change image height here */
  62. border-radius:50%; /* border-radius: 50%; creates a nice round shape */
  63. border:2px solid #d7d8da; /* change border width and color here */
  64.  
  65. }
  66.  
  67. #middle{
  68. text-align:center;
  69. }
  70.  
  71. #middle h1{
  72. font-size:4em; /* 4em = 4 * 16px = 64px */
  73. font-weight:700;/* 700 = bold */
  74. text-transform:uppercase; /* can also be set to "normal" or "lowercase" */
  75. color:#D7D8DA; /* change heading 1 color here */
  76. text-shadow:2px 2px 1px #262727; /* offset to top, offset to left, blur, shadow color */
  77. }
  78.  
  79. #middle h2{
  80. font-size:2em; /* 2em = 2 * 16px = 32px */
  81. font-weight:500; /* 500 = medium */
  82. color:#D7D8DA; /* change heading 2 color here */
  83. text-shadow:1.5px 1.5px 1px #262727; /* offset to top, offset to left, blur, shadow color */
  84. }
  85.  
  86. #middle hr{
  87. width:50%; /* width of the line in the middle */
  88. border:4px solid #262727; /* line width, line style, line color */
  89. }
  90.  
  91. #bottom{
  92. text-align:center;
  93. }
  94.  
  95. #bottom p{
  96. font-size:1.5em; /* 1.5em = 1.5 * 16px = 24px */
  97. font-weight:300; /* 300 = light */
  98. color:#262727; /* text color */
  99. text-shadow:0.5px 0.5px 0.5px #D7D8DA; /* offset to top, offset to left, blur, shadow color */
  100. }
  101.  
  102.  
  103. #bottom_nav mark{
  104. background-color:#D7D8DA; /* mark background color */
  105. color:#262727; /* mark text color */
  106. font-weight:700; /* 700 = bold */
  107. font-size:1em; /* 1em = 16px */
  108. padding:0.5em; /* 0.5em = 8px */
  109. border-radius:5px;
  110. transition:0.5s;
  111. -moz-transition:0.5s;
  112. -o-transition:0.5s;
  113. -webkit-transition:0.5s;
  114. }
  115.  
  116. #bottom_nav mark:hover{
  117. background-color:#262727; /* mark background color on hover */
  118. color:#D7D8DA; /* mark text color on hover */
  119. transition:0.5s;
  120. -moz-transition:0.5s;
  121. -o-transition:0.5s;
  122. -webkit-transition:0.5s;
  123.  
  124. }
  125.  
  126. #bottom_nav a{
  127. text-decoration:none;
  128. font-size:1em;
  129. padding-left:15px;
  130. }
  131. </style>
  132. </head>
  133. <body>
  134. <div id="container">
  135. <div id="top">
  136. <img src="https://images.unsplash.com/photo-1448301858776-07f780e9c9da?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=14a643b3ca93e580bf8f1f7f051ae431&auto=format&fit=crop&w=1650&q=80" alt="architecture">
  137. <!-- you can change the round image here -->
  138. </div>
  139. <div id="middle">
  140. <h1>Coming Soon</h1> <!-- change to what you like -->
  141. <h2>New Project</h2> <!-- change to what you like -->
  142. <hr>
  143. <h2 id="demo">
  144. <!-- this NEEDS to be empty or else the countdown code will NOT work -->
  145. </h2>
  146. </div>
  147. <div id="bottom">
  148. <p>Stay tuned!</p> <!-- change to what you like -->
  149.  
  150. <div id="bottom_nav">
  151. <a href="/"><mark>Home</mark></a>
  152. <a href="/ask"><mark>Ask</mark></a>
  153. <a href="/archive"><mark>Past</mark></a>
  154. <a href="https://silbrigthemes.tumblr.com/"><mark>Credit</mark></a>
  155. </div>
  156.  
  157. </div>
  158. </div>
  159.  
  160. <!-- COUNTDOWN CODE, DO NOT REMOVE !!! -->
  161. <script>
  162. // Set the date we're counting down to
  163. var countDownDate = new Date("Mar 1, 2019 13:50:00").getTime();
  164.  
  165. // Update the count down every 1 second
  166. var x = setInterval(function() {
  167.  
  168. // Get todays date and time
  169. var now = new Date().getTime();
  170.  
  171. // Find the distance between now an the count down date
  172. var distance = countDownDate - now;
  173.  
  174. // Time calculations for days, hours, minutes and seconds
  175. var days = Math.floor(distance / (1000 * 60 * 60 * 24));
  176. var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
  177. var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
  178. var seconds = Math.floor((distance % (1000 * 60)) / 1000);
  179.  
  180. // Display the result in an element with id="demo"
  181. document.getElementById("demo").innerHTML = days + "d " + hours + "h "
  182. + minutes + "m " + seconds + "s ";
  183.  
  184. // If the count down is finished, write some text
  185. if (distance < 0) {
  186. clearInterval(x);
  187. document.getElementById("demo").innerHTML = "FINISHED";
  188. }
  189. }, 1000);
  190. </script>
  191.  
  192. </body>
  193. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement