on master help sign in
Minor cleanup
commit4490dffda63caacb8393590966053caaf72c8b44 authorDevine Lu Linvega <aliceffekt@gmail.com> dateThu 17 May 2018, 11:36 (8 years ago) parent518528e
2 files changed+13−5
index.html+6−4 scripts/portal.js → portal.js+7−1
index.html+6−4
@@ -3,10 +3,7 @@
33<head>
44 <meta charset="utf-8">
55 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6− <script src="scripts/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"/>
6+ <script src="portal.js"></script>
107 <title>Webring</title>
118</head>
129<body>
@@ -19,5 +16,10 @@
1916 var portal = new Portal(sites);
2017 portal.start();
2118 </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>
2224</body>
2325</html>
scripts/portal.js → portal.jsrenamed+7−1
@@ -22,10 +22,16 @@ function Portal(sites)
2222 var site = this.sites[id]
2323 html += `${id}) <a href='${site}'>${site}</a>\n`
2424 }
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>`
2626
2727 return html
2828 }
29+
30+ this.reload = function()
31+ {
32+ console.log("!!")
33+ setTimeout(()=>{ window.location.reload() },500)
34+ }
2935
3036 this.location = function()
3137 {