aboutsummaryrefslogtreecommitdiff
path: root/startpage/index.html
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-14 20:26:28 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-14 20:26:28 +0530
commit189b7f4a00d988ba8e0ddd37379f23c10ffe0866 (patch)
tree6038b128770733c55de9087ee1ca1824871667f3 /startpage/index.html
parenta342fe534dac82c879c6431b2769b07b5d6fa51f (diff)
now the startpage background is random
Diffstat (limited to 'startpage/index.html')
-rw-r--r--startpage/index.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/startpage/index.html b/startpage/index.html
index 0cd1492a..14dbdbcf 100644
--- a/startpage/index.html
+++ b/startpage/index.html
@@ -6,6 +6,12 @@
<title>Welcome, Vidhu Kant!</title>
</head>
<body>
+ <style id="randomBG"></style>
+ <script>
+ var images = ['bg1.png', 'bg2.png', 'bg3.png', 'bg4.jpg', 'bg5.jpg', 'bg6.png'];
+ var BG = "backgrounds/" + images[Math.floor(Math.random() * images.length)]
+ document.getElementById("randomBG").innerHTML = "body { background-image: url('" + BG + "'); }";
+ </script>
<div class="content">
<h1 class="center" id="title">
Welcome, Vidhu Kant!