index.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <title>Thunder - UNBLINK</title>
  8. <meta name="description" content="The thunder rolls, and the lightnng strikes. Under a blanket of clouds, cropped tight to the ground, but not so tight to be fog, the thunder rolls. Gray permeates the sky and the thunder rolls. Scattered rain showers ruin a wedding celebration and the thunder rolls.
  9. Above the clouds the thunder rolls. The sun shines, and the rain is nothing but what we can imagine.">
  10. <meta name="author" content="[CP]">
  11. <link href="https://unbl.ink/an-old-hope.min.css" rel="stylesheet">
  12. <link href="https://unbl.ink/style.css" rel="stylesheet">
  13. <link rel="apple-touch-icon" href="https://unbl.ink/apple-touch-icon.png">
  14. <link rel="icon" href="https://unbl.ink/favicon.ico">
  15. <meta name="generator" content="Hugo 0.109.0">
  16. <link rel="alternate" type="application/atom+xml" href="https://unbl.ink/index.xml" title="UNBLINK">
  17. <script>
  18. function setTheme() {
  19. const time = new Date();
  20. const prev = localStorage.getItem('date');
  21. const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
  22. const now = time.getTime();
  23. let sunrise;
  24. let sunset;
  25. function setBodyClass() {
  26. if (now > sunrise && now < sunset) return;
  27. document.body.classList.add('dark');
  28. }
  29. if (date !== prev) {
  30. fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
  31. .then(res => res.json())
  32. .then(data => {
  33. sunrise = data.sunrise.split(':').map(Number);
  34. sunset = data.sunset.split(':').map(Number);
  35. })
  36. .catch(() => {
  37. sunrise = [7, 0];
  38. sunset = [19, 0];
  39. })
  40. .finally(() => {
  41. sunrise = time.setHours(sunrise[0], sunrise[1], 0);
  42. sunset = time.setHours(sunset[0], sunset[1], 0);
  43. setBodyClass();
  44. localStorage.setItem('sunrise', sunrise);
  45. localStorage.setItem('sunset', sunset);
  46. });
  47. localStorage.setItem('date', date);
  48. } else {
  49. sunrise = Number(localStorage.getItem('sunrise'));
  50. sunset = Number(localStorage.getItem('sunset'));
  51. setBodyClass();
  52. }
  53. }
  54. </script>
  55. </head>
  56. <body class="single">
  57. <script>
  58. setTheme();
  59. </script>
  60. <header class="header">
  61. <nav class="nav">
  62. <p class="logo"><a href="https://unbl.ink/">UNBLINK</a></p>
  63. <ul class="menu">
  64. <li>
  65. <a href="/">Home</a>
  66. </li>
  67. <li>
  68. <a href="/post/">Archives</a>
  69. </li>
  70. <li>
  71. <a href="/categories/">Categories</a>
  72. </li>
  73. </ul>
  74. </nav>
  75. </header>
  76. <main class="main">
  77. <article class="post-single">
  78. <header class="post-header">
  79. <h1 class="post-title">Thunder</h1>
  80. <div class="post-meta">[CP] · November 10, 2018</div>
  81. </header>
  82. <div class="post-content"><p>The thunder rolls, and the lightnng strikes. Under a blanket of clouds, cropped
  83. tight to the ground, but not so tight to be fog, the thunder rolls. Gray
  84. permeates the sky and the thunder rolls. Scattered rain showers ruin a wedding
  85. celebration and the thunder rolls.</p>
  86. <p>Above the clouds the thunder rolls. The sun shines, and the rain is nothing but
  87. what we can imagine.</p>
  88. </div>
  89. </article>
  90. </main>
  91. <footer class="footer">
  92. <span>&copy; 2023 <a href="https://unbl.ink/">UNBLINK</a></span>
  93. <span>&middot;</span>
  94. <span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
  95. <span>&middot;</span>
  96. <span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
  97. </footer>
  98. <script src="https://unbl.ink/highlight.min.js"></script>
  99. <script>
  100. hljs.initHighlightingOnLoad();
  101. </script>
  102. </body>
  103. </html>