aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/404.html50
-rw-r--r--docs/index.html50
-rw-r--r--docs/posts/2021-03-05/my-first-post/index.html50
-rw-r--r--docs/posts/2021-03-30/phperkaigi-2021/index.html50
-rw-r--r--docs/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes/index.html50
-rw-r--r--docs/posts/2021-10-02/python-unbound-local-error/index.html50
-rw-r--r--docs/posts/2021-10-02/ruby-detect-running-implementation/index.html50
-rw-r--r--docs/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html50
-rw-r--r--docs/posts/2021-10-02/rust-where-are-primitive-types-from/index.html50
-rw-r--r--docs/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html50
-rw-r--r--docs/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html50
-rw-r--r--docs/posts/2022-04-09/phperkaigi-2022-tokens/index.html50
-rw-r--r--docs/posts/index.html50
-rw-r--r--docs/style.css15
-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
26 files changed, 0 insertions, 1265 deletions
diff --git a/docs/404.html b/docs/404.html
index 73e5ea2..46e9059 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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/index.html b/docs/index.html
index ca82242..270f4e9 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/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 home">
- <script>
- setTheme();
- </script>
<header class="header">
<nav class="nav">
<h1 class="logo"><a href="https://blog.nsfisis.dev">REPL: Rest-Eat-Program Loop</a></h1>
diff --git a/docs/posts/2021-03-05/my-first-post/index.html b/docs/posts/2021-03-05/my-first-post/index.html
index 5e12685..cf3561e 100644
--- a/docs/posts/2021-03-05/my-first-post/index.html
+++ b/docs/posts/2021-03-05/my-first-post/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-03-30/phperkaigi-2021/index.html b/docs/posts/2021-03-30/phperkaigi-2021/index.html
index e870cad..c629e2a 100644
--- a/docs/posts/2021-03-30/phperkaigi-2021/index.html
+++ b/docs/posts/2021-03-30/phperkaigi-2021/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes/index.html b/docs/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes/index.html
index d2967fd..16a98d7 100644
--- a/docs/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes/index.html
+++ b/docs/posts/2021-10-02/cpp-you-can-use-keywords-in-attributes/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/python-unbound-local-error/index.html b/docs/posts/2021-10-02/python-unbound-local-error/index.html
index 4012f0e..ac4b665 100644
--- a/docs/posts/2021-10-02/python-unbound-local-error/index.html
+++ b/docs/posts/2021-10-02/python-unbound-local-error/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/ruby-detect-running-implementation/index.html b/docs/posts/2021-10-02/ruby-detect-running-implementation/index.html
index b2d700c..da00e65 100644
--- a/docs/posts/2021-10-02/ruby-detect-running-implementation/index.html
+++ b/docs/posts/2021-10-02/ruby-detect-running-implementation/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html b/docs/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html
index c485f68..9aef489 100644
--- a/docs/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html
+++ b/docs/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/rust-where-are-primitive-types-from/index.html b/docs/posts/2021-10-02/rust-where-are-primitive-types-from/index.html
index ea601b3..7353b95 100644
--- a/docs/posts/2021-10-02/rust-where-are-primitive-types-from/index.html
+++ b/docs/posts/2021-10-02/rust-where-are-primitive-types-from/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html b/docs/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html
index 31def7a..e9ce285 100644
--- a/docs/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html
+++ b/docs/posts/2021-10-02/vim-difference-between-autocmd-bufwrite-and-bufwritepre/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html b/docs/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html
index f74d2a3..06869fa 100644
--- a/docs/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html
+++ b/docs/posts/2021-10-02/vim-swap-order-of-selected-lines/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/2022-04-09/phperkaigi-2022-tokens/index.html b/docs/posts/2022-04-09/phperkaigi-2022-tokens/index.html
index 34bd83f..e4f670a 100644
--- a/docs/posts/2022-04-09/phperkaigi-2022-tokens/index.html
+++ b/docs/posts/2022-04-09/phperkaigi-2022-tokens/index.html
@@ -19,58 +19,8 @@
<meta name="generator" content="Hugo 0.88.1" />
-
- <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="single">
- <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/posts/index.html b/docs/posts/index.html
index 76d2d97..0afa867 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -20,58 +20,8 @@
<link rel="alternate" type="application/rss+xml" href="https://blog.nsfisis.dev/posts/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/style.css b/docs/style.css
index f482aa5..99796c2 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -28,24 +28,9 @@
--code-bg: #f5f5f5;
--border: #eee;
}
-.dark {
- --theme: #1d1e20;
- --entry: #2e2e33;
- --primary: rgba(255, 255, 255, 0.84);
- --secondary: rgba(255, 255, 255, 0.56);
- --tertiary: rgba(255, 255, 255, 0.16);
- --content: rgba(255, 255, 255, 0.64);
-
- --hljs-bg: #2e2e33;
- --code-bg: #37383e;
- --border: #5b5d67;
-}
.list {
background: var(--code-bg);
}
-.dark.list {
- background: var(--theme);
-}
/* Reset
-------------------------------------------------- */
*,
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>