index.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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>Writing - UNBLINK</title>
  8. <meta name="description" content="Writing is a technology.
  9. Writing improves information density.
  10. Writing creates a moral hazard of intention.
  11. Writing remembers what we forget.
  12. Writing destroys relationships.
  13. Writing cannot replace thought.
  14. Writing is not often true.">
  15. <meta name="author" content="[Colin Powell]">
  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">Writing</h1>
  85. <div class="post-meta">[Colin Powell] · December 11, 2019</div>
  86. </header>
  87. <div class="post-content"><p>Writing is a technology.</p>
  88. <p>Writing improves information density.</p>
  89. <p>Writing creates a moral hazard of intention.</p>
  90. <p>Writing remembers what we forget.</p>
  91. <p>Writing destroys relationships.</p>
  92. <p>Writing cannot replace thought.</p>
  93. <p>Writing is not often true.</p>
  94. </div>
  95. </article>
  96. </main>
  97. <footer class="footer">
  98. <span>&copy; 2023 <a href="https://unbl.ink/">UNBLINK</a></span>
  99. <span>&middot;</span>
  100. <span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
  101. <span>&middot;</span>
  102. <span>Theme️ <a href="https://github.com/nanxiaobei/hugo-paper" rel="noopener" target="_blank">Paper</a></span>
  103. </footer>
  104. <script src="https://unbl.ink/highlight.min.js"></script>
  105. <script>
  106. hljs.initHighlightingOnLoad();
  107. </script>
  108. </body>
  109. </html>