summaryrefslogtreecommitdiff
path: root/web/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'web/index.html')
-rw-r--r--web/index.html18
1 files changed, 17 insertions, 1 deletions
diff --git a/web/index.html b/web/index.html
index 53fbf3c..484bbfb 100644
--- a/web/index.html
+++ b/web/index.html
@@ -7,8 +7,24 @@
<meta name="base-path" content="/claudomator">
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="data:,">
+ <script>
+ (function() {
+ var I = 5 * 60 * 1000;
+ function b() { return Math.floor(Date.now() / I); }
+ function u(n) { return "url('https://picsum.photos/1920/1080?random=" + n + "')"; }
+ function apply(n) { document.body.style.setProperty('--bg-url', u(n)); }
+ function schedule() {
+ setTimeout(function() { apply(b()); new Image().src = u(b() + 1); schedule(); }, I - (Date.now() % I));
+ }
+ document.addEventListener('DOMContentLoaded', function() {
+ apply(b());
+ new Image().src = u(b() + 1);
+ schedule();
+ });
+ })();
+ </script>
</head>
-<body>
+<body class="bg-body">
<header>
<h1>Claudomator</h1>
<div class="header-actions">