on 93804e6 help sign in
README.md+1−1
since splitsnapshots
unifiedsplit
@@ -1,6 +1,6 @@
1# Webring
1# Webring
2
2
3−This [webring](https://wiki.xxiivv.com/webring) is an attempt to inspire artists & developers to create and maintain their own website and share traffic among each other. The webring's aim is to share hand-crafted websites such as **diaries, wikis & portfolios**, single pagers with nothing but outgoing links to social platforms will be rejected. To add yourself to the ring, submit an [edit](https://github.com/XXIIVV/webring/edit/master/scripts/sites.js) to this repository.
3+This [webring](https://wiki.xxiivv.com/webring) is an attempt to inspire artists & developers to create and maintain their own website and share traffic among each other. The webring's aim is to share personal websites such as *diaries, wikis & portfolios*. To add yourself to the ring, submit an [edit](https://github.com/XXIIVV/webring/edit/master/scripts/sites.js) to this repository.
4
4
5## Join the webring
5## Join the webring
6
6
index.html−1
@@ -12,7 +12,6 @@
12<body>
12<body>
13 <script>
13 <script>
14 const portal = new Portal(sites);
14 const portal = new Portal(sites);
15− portal.install(document.body);
16 portal.start();
15 portal.start();
17 </script>
16 </script>
18</body>
17</body>
links/fonts.css+15−8
@@ -1,15 +1,22 @@
1/* Input Mono */
1/* Input Mono */
2
2
3@font-face {
3@font-face {
4− font-family: 'input_mono_regular';
4+ font-family: 'input_mono_regular';
5− src: url('../media/fonts/input_mono_regular.ttf') format('truetype');
5+ src: url('../media/fonts/input_mono_regular.ttf') format('truetype');
6− font-weight: normal;
6+ font-weight: normal;
7− font-style: normal;
7+ font-style: normal;
8}
8}
9
9
10@font-face {
10@font-face {
11− font-family: 'input_mono_medium';
11+ font-family: 'input_mono_medium';
12− src: url('../media/fonts/input_mono_medium.ttf') format('truetype');
12+ src: url('../media/fonts/input_mono_medium.ttf') format('truetype');
13− font-weight: normal;
13+ font-weight: normal;
14+ font-style: normal;
15+}
16+
17+@font-face {
18+ font-family: 'input_mono_thin';
19+ src: url('../media/fonts/input_mono_thin.ttf') format('truetype');
20+ font-weight: normal;
14− font-style: normal;
21+ font-style: normal;
15}
22}
links/main.css+2−2
@@ -15,5 +15,5 @@ body div ul li a:visited { color:#999; text-decoration: none;}
15body div ul li a:hover { background:#ccc; color:#000; text-decoration: none; border-radius: 2px }
15body div ul li a:hover { background:#ccc; color:#000; text-decoration: none; border-radius: 2px }
16
16
17@media (max-width: 950px){
17@media (max-width: 950px){
18− body div ul { columns: 2 }
18+ body div list { columns: 2 }
19−}
19+}
media/fonts/input_mono_thin.ttfnew file

Binary file not shown.

scripts/portal.js+60−42
@@ -1,63 +1,81 @@
1−'use strict'
1+'use strict';
2
2
3−function Portal (sites) {
3+function Portal(sites)
4+{
4− this.el = document.createElement('div')
5+ this.el = document.createElement("div");
5− this.sites = sites
6+ this.sites = sites;
6−
7+
7− // Templates
8+ this.install = function()
8−
9+ {
9− function _readme () {
10+ document.body.appendChild(this.el);
10− 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>.</p><p>To add yourself to the ring, submit a <a href='https://github.com/XXIIVV/webring/edit/master/scripts/sites.js' target='_blank'>Pull Request</a>.<br />If you found a broken link, please <a href='https://github.com/XXIIVV/webring/issues/new' target='_blank'>report it</a>.</p>`
11 }
11 }
12−
12+
13− function _buttons () {
13+ this.start = function()
14− 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>`
14+ {
15+ this.install();
16+ this.el.innerHTML = window.location.hash && window.location.hash.length > 4 ? this.redirect() : this.directory();
15 }
17 }
16
18
17− function _directory (sites) {
19+ this.readme = function()
18− return `
20+ {
19− <ul>${sites.reduce((acc, val, id) => { return `${acc}<li>${id}) <a href='${val}'>${val.split('//')[1]}</a></li>` }, '')}</ul>\n${_readme()}${_buttons()}`
21+ 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>.</p><p>To add yourself to the ring, submit a <a href='https://github.com/XXIIVV/webring/edit/master/index.html' target='_blank'>Pull Request</a>.<br />If you found a broken link, please <a href='https://github.com/XXIIVV/webring/issues/new' target='_blank'>report it</a>.</p>`
20 }
22 }
21
23
22− function _redirect (target) {
24+ this.buttons = function()
23− return `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}">
25+ {
24− <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>`
26+ 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 }
27 }
26−
28+
27− //
28−
29− this.install = function (host) {
29+ this.directory = function()
30− host.appendChild(this.el)
30+ {
31+ return `<ul>${this.sites.reduce((acc,val,id) => { return `${acc}<li>${id}) <a href='${val}'>${val.split("//")[1]}</a></li>`},"")}</ul>\n${this.readme()}${this.buttons()}`
31 }
32 }
32
33
33− this.start = function () {
34+ this.reload = function()
34− this.el.innerHTML = window.location.hash && window.location.hash.length > 4 ? _redirect(this.next()) : _directory(this.sites)
35+ {
36+ setTimeout(()=>{ window.location.reload() },500)
35 }
37 }
36
38
37− this.reload = function () {
39+ this.navigate = function(target)
40+ {
41+ setTimeout(() => {
38− setTimeout(() => { window.location.reload() }, 500)
42+ window.location.href = target
43+ },3000)
39 }
44 }
40−
45+
41− this.navigate = function (target) {
46+ this.location = function()
42− setTimeout(() => { window.location.href = target }, 3000)
47+ {
48+ return window.location.hash.replace("#","").trim();
43 }
49 }
44−
50+
45− this.locate = function () {
51+ this.locate = function()
52+ {
46− const hash = window.location.hash.replace('#', '').trim()
53+ const hash = this.location();
47−
54+
48− if (hash == 'random') {
55+ if(hash == "random"){
49− return Math.floor(Math.random() * this.sites.length)
56+ return Math.floor(Math.random()*this.sites.length)
50 }
57 }
51−
58+
52− for (const id in this.sites) {
59+ for(const id in this.sites){
60+ const site = this.sites[id];
53− if (this.sites[id].indexOf(hash) > -1) {
61+ if(site.indexOf(hash) >-1){
54 return parseInt(id)
62 return parseInt(id)
55 }
63 }
56 }
64 }
57 return -1
65 return -1
58 }
66 }
59−
67+
60− this.next = function (loc = this.locate()) {
68+ this.next = function(loc)
69+ {
61− return loc == this.sites.length - 1 ? this.sites[0] : this.sites[loc + 1]
70+ return loc == this.sites.length-1 ? this.sites[0] : this.sites[loc+1];
71+ }
72+
73+ this.redirect = function()
74+ {
75+ const location = this.locate();
76+ const target = this.next(location);
77+ this.navigate(target)
78+ return `<p>Redirecting to <b>${target}</b></p><meta http-equiv="refresh" content="3; url=${target}">
79+ <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>`
62 }
80 }
63}
81}
scripts/sites.js+61−68
@@ -1,70 +1,63 @@
1−'use strict';
2−
3−// Don't forget the comma! No trailing slashes
4// protocole://url.domain.ext
1// protocole://url.domain.ext
5−
6const sites = [
2const sites = [
7− "https://wiki.xxiivv.com"
3+ "https://wiki.xxiivv.com"
8− , "http://estevancarlos.com"
4+ , "http://estevancarlos.com"
9− , "https://electro.pizza"
5+ , "https://electro.pizza"
10− , "https://monochromatic.co"
6+ , "https://monochromatic.co"
11− , "https://joshavanier.github.io"
7+ , "https://joshavanier.github.io"
12− , "http://kaemura.com"
8+ , "http://kaemura.com"
13− , "https://liamcooke.com"
9+ , "https://liamcooke.com"
14− , "https://electricgecko.de"
10+ , "https://electricgecko.de"
15− , "https://wichniow.ski"
11+ , "https://wichniow.ski"
16− , "https://hraew.autophagy.io"
12+ , "https://hraew.autophagy.io"
17− , "https://evenunto.net"
13+ , "https://evenunto.net"
18− , "https://anxl.faith"
14+ , "https://anxl.faith"
19− , "https://xvw.github.io"
15+ , "https://xvw.github.io"
20− , "https://heracl.es"
16+ , "https://heracl.es"
21− , "https://felipecortez.net"
17+ , "https://felipecortez.net"
22− , "http://luminghao.com"
18+ , "http://luminghao.com"
23− , "https://theiceshelf.com"
19+ , "https://theiceshelf.com"
24− , "https://turelio.github.io"
20+ , "https://turelio.github.io"
25− , "https://spaceshipsin.space"
21+ , "https://spaceshipsin.space"
26− , "http://log.lectronice.com"
22+ , "http://log.lectronice.com"
27− , "https://craze.co.uk"
23+ , "https://craze.co.uk"
28− , "https://shaneckel.com"
24+ , "https://shaneckel.com"
29− , "https://cblgh.org"
25+ , "https://cblgh.org"
30− , "https://ellugar.co"
26+ , "https://ellugar.co"
31− , "http://hur.bet"
27+ , "http://hur.bet"
32− , "http://chigby.org"
28+ , "http://chigby.org"
33− , "https://longest.voyage"
29+ , "https://longest.voyage"
34− , "https://palomakop.tv"
30+ , "https://palomakop.tv"
35− , "https://travisshears.com"
31+ , "https://travisshears.com"
36− , "https://v-os.ca"
32+ , "https://v-os.ca"
37− , "http://secretinternet.club"
33+ , "http://secretinternet.club"
38− , "https://jmandel.xyz"
34+ , "https://jmandel.xyz"
39− , "https://systems.ws"
35+ , "https://systems.ws"
40− , "https://jamesin.space"
36+ , "https://jamesin.space"
41− , "https://nathanwentworth.co"
37+ , "https://nathanwentworth.co"
42− , "https://eswat.ca"
38+ , "https://eswat.ca"
43− , "https://uonai.space"
39+ , "https://uonai.space"
44− , "http://controls.ee"
40+ , "http://controls.ee"
45− , "https://wasin.io"
41+ , "https://wasin.io"
46− , "https://inns.studio"
42+ , "https://inns.studio"
47− , "http://kokorobot.ca"
43+ , "http://kokorobot.ca"
48− , "https://ameyama.com"
44+ , "https://ameyama.com"
49− , "https://wake.st"
45+ , "https://wake.st"
50− , "https://xarene.la"
46+ , "https://xarene.la"
51− , "https://alex.zyzhang.me"
47+ , "https://alex.zyzhang.me"
52− , "http://bildwissenschaft.vortok.info"
48+ , "http://bildwissenschaft.vortok.info"
53− , "https://jakofranko.github.com"
49+ , "https://jakofranko.github.com"
54− , "https://aeriform.io"
50+ , "https://aeriform.io"
55− , "http://blog.lucasdidthis.com"
51+ , "http://blog.lucasdidthis.com"
56− , "http://npisanti.com"
52+ , "http://npisanti.com"
57− , "https://underscorediscovery.ca"
53+ , "https://underscorediscovery.ca"
58− , "https://drisc.io"
54+ , "https://drisc.io"
59− , "https://neufv.website"
55+ , "https://neufv.website"
60− , "https://simbolo.xyz"
56+ , "https://simbolo.xyz"
61− , "https://ricky.codes"
57+ , "https://ricky.codes"
62− , "https://maxdeviant.com"
58+ , "https://maxdeviant.com"
63− , "https://tynandebold.com"
59+ , "https://tynandebold.com"
64− , "http://gytis.co"
60+ , "http://gytis.co"
65− , "https://nomand.co"
61+ , "https://nomand.co"
66− , "http://memoriata.com"
67− , "https://mmm.s-ol.nu"
68− , "https://chad.is"
69− , "https://smidgeo.com/bots"
70−];
62+ ];
63+ // Don't forget the comma! No trailing slashes