on master help sign in
Improved styles
d924975Devine Lu Linvega
index.html+4−2
@@ -54,13 +54,15 @@
54 </script>
54 </script>
55 <style>
55 <style>
56 body { background:#fff; padding:0px; margin:0px; }
56 body { background:#fff; padding:0px; margin:0px; }
57− body pre { background: #000;height: calc(100vh - 60px);width: calc(100vw - 60px);margin: 15px;color: #555;padding: 15px; }
57+ body pre { background: #000;height: calc(100vh - 60px);width: calc(100vw - 60px);margin: 15px;color: #555;padding: 15px;font-family: 'Courier New',courier;font-size:12px; position: relative; }
58 body pre a { color:#fff; display: inline-block; padding:0px 5px; line-height: 20px}
58 body pre a { color:#fff; display: inline-block; padding:0px 5px; line-height: 20px}
59 body pre a:hover { color:#eee; background:#000; text-decoration: none; }
59 body pre a:hover { color:#eee; background:#000; text-decoration: none; }
60+ body pre #icon { display: block;width: 20px;height: 20px;background-image: url(icon.white.svg);background-size: 20px;background-repeat: no-repeat;position: absolute;bottom: 10px;right:10px;background-position: center;padding:0px }
60 body pre p { display:block; padding:0px 5px}
61 body pre p { display:block; padding:0px 5px}
62+ body pre p b { font-weight: normal; color:#ccc; }
61 body pre list { display:block; columns:3; }
63 body pre list { display:block; columns:3; }
62 body pre list ln { display:block; padding-left:5px}
64 body pre list ln { display:block; padding-left:5px}
63− body pre list ln a:visited { color:#555;}
65+ body pre list ln a:visited { color:#ccc;}
64 </style>
66 </style>
65</body>
67</body>
66</html>
68</html>
portal.js+2−6
@@ -22,7 +22,7 @@ function Portal(sites)
22 var site = this.sites[id]
22 var site = this.sites[id]
23 html += `<ln>${id}) <a href='${site}'>${site.split("//")[1]}</a></ln>`
23 html += `<ln>${id}) <a href='${site}'>${site.split("//")[1]}</a></ln>`
24 }
24 }
25− return `<list>${html}</list>\n<a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a></ln>`
25+ return `<list>${html}</list>\n<a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a> <a id='icon' href='#random' onClick="portal.reload('random')"></a></ln>`
26 }
26 }
27
27
28 this.reload = function()
28 this.reload = function()
@@ -69,10 +69,6 @@ function Portal(sites)
69 var location = this.locate();
69 var location = this.locate();
70 var target = this.next(location);
70 var target = this.next(location);
71 this.navigate(target)
71 this.navigate(target)
72−
73− var html = ""
74−
75− html = `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}"><a href='' onClick="window.location.reload()">Directory</a> | <a href='#${target}' onClick="portal.reload('random')">Skip</a> | <a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a>`
72+ return `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}"><a href='' onClick="window.location.reload()">Directory</a> | <a href='#${target}' onClick="portal.reload('random')">Skip</a> | <a href='#random' onClick="portal.reload('random')">Random</a> | <a href='https://github.com/XXIIVV/webring'>Information</a> <a id='icon' href='#random' onClick="portal.reload('random')"></a>`
76− return html
77 }
73 }
78}
74}