index.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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>Flow - UNBLINK</title>
  8. <meta name="description" content="When everything appears to be flowing,
  9. You tear pages from the book and watch
  10. As they flutter to fall in the water.
  11. When everything falls apart around you
  12. You tear at your hair and think
  13. As life remains as it was when,
  14. Everything is flowing.">
  15. <meta name="author" content="[CP]">
  16. <link href="https://unbl.ink/an-old-hope.min.css" rel="stylesheet">
  17. <link href="https://unbl.ink/style.css" rel="stylesheet">
  18. <link rel="apple-touch-icon" href="https://unbl.ink/apple-touch-icon.png">
  19. <link rel="icon" href="https://unbl.ink/favicon.ico">
  20. <meta name="generator" content="Hugo 0.109.0">
  21. <link rel="alternate" type="application/atom+xml" href="https://unbl.ink/index.xml" title="UNBLINK">
  22. <script>
  23. function setTheme() {
  24. const time = new Date();
  25. const prev = localStorage.getItem('date');
  26. const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
  27. const now = time.getTime();
  28. let sunrise;
  29. let sunset;
  30. function setBodyClass() {
  31. if (now > sunrise && now < sunset) return;
  32. document.body.classList.add('dark');
  33. }
  34. if (date !== prev) {
  35. fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
  36. .then(res => res.json())
  37. .then(data => {
  38. sunrise = data.sunrise.split(':').map(Number);
  39. sunset = data.sunset.split(':').map(Number);
  40. })
  41. .catch(() => {
  42. sunrise = [7, 0];
  43. sunset = [19, 0];
  44. })
  45. .finally(() => {
  46. sunrise = time.setHours(sunrise[0], sunrise[1], 0);
  47. sunset = time.setHours(sunset[0], sunset[1], 0);
  48. setBodyClass();
  49. localStorage.setItem('sunrise', sunrise);
  50. localStorage.setItem('sunset', sunset);
  51. });
  52. localStorage.setItem('date', date);
  53. } else {
  54. sunrise = Number(localStorage.getItem('sunrise'));
  55. sunset = Number(localStorage.getItem('sunset'));
  56. setBodyClass();
  57. }
  58. }
  59. </script>
  60. </head>
  61. <body class="single">
  62. <script>
  63. setTheme();
  64. </script>
  65. <header class="header">
  66. <nav class="nav">
  67. <p class="logo"><a href="https://unbl.ink/">UNBLINK</a></p>
  68. <ul class="menu">
  69. <li>
  70. <a href="/">Home</a>
  71. </li>
  72. <li>
  73. <a href="/post/">Archives</a>
  74. </li>
  75. <li>
  76. <a href="/categories/">Categories</a>
  77. </li>
  78. </ul>
  79. </nav>
  80. </header>
  81. <main class="main">
  82. <article class="post-single">
  83. <header class="post-header">
  84. <h1 class="post-title">Flow</h1>
  85. <div class="post-meta">[CP] · November 24, 2019</div>
  86. </header>
  87. <div class="post-content">
  88. <p class="verse">
  89. When everything appears to be flowing,<br />
  90. You tear pages from the book and watch<br />
  91. As they flutter to fall in the water.<br />
  92. <br />
  93. When everything falls apart around you<br />
  94. You tear at your hair and think<br />
  95. As life remains as it was when,<br />
  96. <br />
  97. Everything is flowing.<br />
  98. </p>
  99. </div>
  100. </article>
  101. </main>
  102. <footer class="footer">
  103. <span>&copy; 2023 <a href="https://unbl.ink/">UNBLINK</a></span>
  104. <span>&middot;</span>
  105. <span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
  106. <span>&middot;</span>
  107. <span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
  108. </footer>
  109. <script src="https://unbl.ink/highlight.min.js"></script>
  110. <script>
  111. hljs.initHighlightingOnLoad();
  112. </script>
  113. </body>
  114. </html>