on master help sign in
Minor cleanup
4490dffDevine Lu Linvega
index.html+6−4
@@ -3,10 +3,7 @@
3<head>
3<head>
4 <meta charset="utf-8">
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6− <script src="scripts/portal.js"></script>
6+ <script src="portal.js"></script>
7− <link rel="stylesheet" type="text/css" href="links/reset.css"/>
8− <link rel="stylesheet" type="text/css" href="links/fonts.css"/>
9− <link rel="stylesheet" type="text/css" href="links/main.css"/>
10 <title>Webring</title>
7 <title>Webring</title>
11</head>
8</head>
12<body>
9<body>
@@ -19,5 +16,10 @@
19 var portal = new Portal(sites);
16 var portal = new Portal(sites);
20 portal.start();
17 portal.start();
21 </script>
18 </script>
19+ <style>
20+ body { background:#eee; padding:30px; }
21+ body a { color:#000; display: inline-block; padding:0px 5px; line-height: 20px}
22+ body a:hover { color:#eee; background:#000; text-decoration: none; }
23+ </style>
22</body>
24</body>
23</html>
25</html>
scripts/portal.js → portal.jsrenamed+7−1
@@ -22,10 +22,16 @@ function Portal(sites)
22 var site = this.sites[id]
22 var site = this.sites[id]
23 html += `${id}) <a href='${site}'>${site}</a>\n`
23 html += `${id}) <a href='${site}'>${site}</a>\n`
24 }
24 }
25− html += `\n<a href='#random' onClick="window.location.reload()">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
25+ html += `\n<a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
26
26
27 return html
27 return html
28 }
28 }
29+
30+ this.reload = function()
31+ {
32+ console.log("!!")
33+ setTimeout(()=>{ window.location.reload() },500)
34+ }
29
35
30 this.location = function()
36 this.location = function()
31 {
37 {