@@ -1,6 +1,6 @@
11function Portal(sites)
22{
3− this.el = document.createElement("pre");
3+ this.el = document.createElement("div");
44 this.sites = sites;
55
66 this.install = function()
@@ -13,6 +13,16 @@ function Portal(sites)
1313 this.install();
1414 this.el.innerHTML = window.location.hash && window.location.hash.length > 4 ? this.redirect() : this.directory();
1515 }
16+
17+ this.readme = function()
18+ {
19+ return `<p class='readme'>This webring is an attempt to inspire artists & developers to build their own website and share traffic among each other. The ring welcomes personalized websites such as <b>diaries, wikis & portfolios</b> — To add yourself to the ring, submit a <a href='https://github.com/XXIIVV/webring/edit/master/index.html' target='_blank'>Pull Request</a>.</p>`
20+ }
21+
22+ this.buttons = function()
23+ {
24+ return `<p class='buttons'><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></p>`
25+ }
1626
1727 this.directory = function()
1828 {
@@ -22,7 +32,7 @@ function Portal(sites)
2232 var site = this.sites[id]
2333 html += `<ln>${id}) <a href='${site}'>${site.split("//")[1]}</a></ln>`
2434 }
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>`
35+ return `<list>${html}</list>\n${this.readme()}${this.buttons()}`
2636 }
2737
2838 this.reload = function()
@@ -69,6 +79,7 @@ function Portal(sites)
6979 var location = this.locate();
7080 var target = this.next(location);
7181 this.navigate(target)
72− return `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}"><a href='#' onClick="portal.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>`
82+ return `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}">
83+ <p class='buttons'><a href='#' onClick="portal.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></p>`
7384 }
7485}