mirror of
https://github.com/ilyakooo0/webring.git
synced 2024-11-22 13:35:24 +03:00
Minor cleanup
This commit is contained in:
parent
518528ea14
commit
4490dffda6
10
index.html
10
index.html
@ -3,10 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script src="scripts/portal.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="links/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="links/fonts.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="links/main.css"/>
|
||||
<script src="portal.js"></script>
|
||||
<title>Webring</title>
|
||||
</head>
|
||||
<body>
|
||||
@ -19,5 +16,10 @@
|
||||
var portal = new Portal(sites);
|
||||
portal.start();
|
||||
</script>
|
||||
<style>
|
||||
body { background:#eee; padding:30px; }
|
||||
body a { color:#000; display: inline-block; padding:0px 5px; line-height: 20px}
|
||||
body a:hover { color:#eee; background:#000; text-decoration: none; }
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -22,11 +22,17 @@ function Portal(sites)
|
||||
var site = this.sites[id]
|
||||
html += `${id}) <a href='${site}'>${site}</a>\n`
|
||||
}
|
||||
html += `\n<a href='#random' onClick="window.location.reload()">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
|
||||
html += `\n<a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
|
||||
|
||||
return html
|
||||
}
|
||||
|
||||
this.reload = function()
|
||||
{
|
||||
console.log("!!")
|
||||
setTimeout(()=>{ window.location.reload() },500)
|
||||
}
|
||||
|
||||
this.location = function()
|
||||
{
|
||||
return window.location.hash.replace("#","").trim();
|
Loading…
Reference in New Issue
Block a user