aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/tags
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2022-04-19 19:41:01 +0900
committernsfisis <nsfisis@gmail.com>2022-04-19 19:41:01 +0900
commit6e2a31185145d4690dbf897b56a682113ce62d8f (patch)
tree9ce7d72b30c1cfbc722167cdbbfdb5e3ada0cb1c /docs/tags
parent5a8024a827b6dbb103712865261c9a5ebc2908f9 (diff)
downloadnsfisis.github.io-6e2a31185145d4690dbf897b56a682113ce62d8f.tar.gz
nsfisis.github.io-6e2a31185145d4690dbf897b56a682113ce62d8f.tar.zst
nsfisis.github.io-6e2a31185145d4690dbf897b56a682113ce62d8f.zip
regenerate
Diffstat (limited to 'docs/tags')
-rw-r--r--docs/tags/conference/index.html50
-rw-r--r--docs/tags/cpp/index.html50
-rw-r--r--docs/tags/cpp17/index.html50
-rw-r--r--docs/tags/index.html50
-rw-r--r--docs/tags/php/index.html50
-rw-r--r--docs/tags/phperkaigi/index.html50
-rw-r--r--docs/tags/python/index.html50
-rw-r--r--docs/tags/python3/index.html50
-rw-r--r--docs/tags/ruby/index.html50
-rw-r--r--docs/tags/ruby3/index.html50
-rw-r--r--docs/tags/rust/index.html50
-rw-r--r--docs/tags/vim/index.html50
12 files changed, 0 insertions, 600 deletions
diff --git a/docs/tags/conference/index.html b/docs/tags/conference/index.html
index 3617fb2..ff8b2c6 100644
--- a/docs/tags/conference/index.html
+++ b/docs/tags/conference/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/conference/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/cpp/index.html b/docs/tags/cpp/index.html
index 4e05aa9..b52cb1e 100644
--- a/docs/tags/cpp/index.html
+++ b/docs/tags/cpp/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/cpp/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/cpp17/index.html b/docs/tags/cpp17/index.html
index 7ca3772..d044aa4 100644
--- a/docs/tags/cpp17/index.html
+++ b/docs/tags/cpp17/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/cpp17/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/index.html b/docs/tags/index.html
index bb38c76..03e8603 100644
--- a/docs/tags/index.html
+++ b/docs/tags/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/php/index.html b/docs/tags/php/index.html
index 758af3f..2417812 100644
--- a/docs/tags/php/index.html
+++ b/docs/tags/php/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/php/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/phperkaigi/index.html b/docs/tags/phperkaigi/index.html
index e280942..6ee411e 100644
--- a/docs/tags/phperkaigi/index.html
+++ b/docs/tags/phperkaigi/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/phperkaigi/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/python/index.html b/docs/tags/python/index.html
index a6e3247..cb85f78 100644
--- a/docs/tags/python/index.html
+++ b/docs/tags/python/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/python/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/python3/index.html b/docs/tags/python3/index.html
index 4a80104..4995388 100644
--- a/docs/tags/python3/index.html
+++ b/docs/tags/python3/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/python3/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/ruby/index.html b/docs/tags/ruby/index.html
index c826b1e..6da6fda 100644
--- a/docs/tags/ruby/index.html
+++ b/docs/tags/ruby/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/ruby/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/ruby3/index.html b/docs/tags/ruby3/index.html
index 2aa6afd..185fc7a 100644
--- a/docs/tags/ruby3/index.html
+++ b/docs/tags/ruby3/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/ruby3/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/rust/index.html b/docs/tags/rust/index.html
index 20897e6..a1c5ecc 100644
--- a/docs/tags/rust/index.html
+++ b/docs/tags/rust/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/rust/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>
diff --git a/docs/tags/vim/index.html b/docs/tags/vim/index.html
index 35805f3..9485509 100644
--- a/docs/tags/vim/index.html
+++ b/docs/tags/vim/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/tags/vim/index.xml" title="REPL: Rest-Eat-Program Loop" />
-
- <script>
- function setTheme() {
- if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
- document.body.classList.add('dark');
- return;
- }
-
- const time = new Date();
- const prev = localStorage.getItem('date');
- const date = String(time.getMonth() + 1) + '.' + String(time.getDate());
-
- const now = time.getTime();
- let sunrise;
- let sunset;
-
- function setBodyClass() {
- if (now > sunrise && now < sunset) return;
- document.body.classList.add('dark');
- }
-
- if (date !== prev) {
- fetch('https://api.ipgeolocation.io/astronomy?apiKey=5ed37d85103e4defa5df4c5298ed5215')
- .then((res) => res.json())
- .then((data) => {
- sunrise = data.sunrise.split(':').map(Number);
- sunset = data.sunset.split(':').map(Number);
- })
- .catch(() => {
- sunrise = [7, 0];
- sunset = [19, 0];
- })
- .finally(() => {
- sunrise = time.setHours(sunrise[0], sunrise[1], 0);
- sunset = time.setHours(sunset[0], sunset[1], 0);
- setBodyClass();
- localStorage.setItem('sunrise', sunrise);
- localStorage.setItem('sunset', sunset);
- });
- localStorage.setItem('date', date);
- } else {
- sunrise = Number(localStorage.getItem('sunrise'));
- sunset = Number(localStorage.getItem('sunset'));
- setBodyClass();
- }
- }
- </script>
</head>
<body class="list">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<p class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></p>