index.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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>Condition - UNBLINK</title>
  8. <meta name="description" content="Some say the human condition is
  9. Our contract with death.
  10. But I&#39;ve watched my dog
  11. Fear death and recoil in disgust.
  12. No, our curse is
  13. Being in the present
  14. While living for a future
  15. We believe
  16. May inevitably come.">
  17. <meta name="author" content="[Colin Powell]">
  18. <link href="https://unbl.ink/an-old-hope.min.css" rel="stylesheet">
  19. <link href="https://unbl.ink/style.css" rel="stylesheet">
  20. <link rel="apple-touch-icon" href="https://unbl.ink/apple-touch-icon.png">
  21. <link rel="icon" href="https://unbl.ink/favicon.ico">
  22. <meta name="generator" content="Hugo 0.109.0">
  23. <link rel="alternate" type="application/atom+xml" href="https://unbl.ink/index.xml" title="UNBLINK">
  24. <script>
  25. function setTheme() {
  26. const time = new Date();
  27. const prev = localStorage.getItem('date');
  28. const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
  29. const now = time.getTime();
  30. let sunrise;
  31. let sunset;
  32. function setBodyClass() {
  33. if (now > sunrise && now < sunset) return;
  34. document.body.classList.add('dark');
  35. }
  36. if (date !== prev) {
  37. fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
  38. .then(res => res.json())
  39. .then(data => {
  40. sunrise = data.sunrise.split(':').map(Number);
  41. sunset = data.sunset.split(':').map(Number);
  42. })
  43. .catch(() => {
  44. sunrise = [7, 0];
  45. sunset = [19, 0];
  46. })
  47. .finally(() => {
  48. sunrise = time.setHours(sunrise[0], sunrise[1], 0);
  49. sunset = time.setHours(sunset[0], sunset[1], 0);
  50. setBodyClass();
  51. localStorage.setItem('sunrise', sunrise);
  52. localStorage.setItem('sunset', sunset);
  53. });
  54. localStorage.setItem('date', date);
  55. } else {
  56. sunrise = Number(localStorage.getItem('sunrise'));
  57. sunset = Number(localStorage.getItem('sunset'));
  58. setBodyClass();
  59. }
  60. }
  61. </script>
  62. </head>
  63. <body class="single">
  64. <script>
  65. setTheme();
  66. </script>
  67. <header class="header">
  68. <nav class="nav">
  69. <p class="logo"><a href="https://unbl.ink/">UNBLINK</a></p>
  70. <ul class="menu">
  71. <li>
  72. <a href="/">Home</a>
  73. </li>
  74. <li>
  75. <a href="/post/">Archives</a>
  76. </li>
  77. <li>
  78. <a href="/categories/">Categories</a>
  79. </li>
  80. </ul>
  81. </nav>
  82. </header>
  83. <main class="main">
  84. <article class="post-single">
  85. <header class="post-header">
  86. <h1 class="post-title">Condition</h1>
  87. <div class="post-meta">[Colin Powell] · March 6, 2022</div>
  88. </header>
  89. <div class="post-content">
  90. <div class="verse">
  91. Some say the human condition is<br />
  92. Our contract with death.<br />
  93. But I've watched my dog<br />
  94. Fear death and recoil in disgust.<br />
  95. <br />
  96. No, our curse is<br />
  97. Being in the present<br />
  98. While living for a future<br />
  99. We believe<br />
  100. May inevitably come.<br />
  101. </div>
  102. </div>
  103. </article>
  104. </main>
  105. <footer class="footer">
  106. <span>&copy; 2023 <a href="https://unbl.ink/">UNBLINK</a></span>
  107. <span>&middot;</span>
  108. <span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
  109. <span>&middot;</span>
  110. <span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
  111. </footer>
  112. <script src="https://unbl.ink/highlight.min.js"></script>
  113. <script>
  114. hljs.initHighlightingOnLoad();
  115. </script>
  116. </body>
  117. </html>