diff --git a/index.html b/index.html index 766ce33..b43b2f9 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ diff --git a/links/fonts.css b/links/fonts.css index aac9411..5a6d684 100644 --- a/links/fonts.css +++ b/links/fonts.css @@ -1,22 +1,15 @@ /* Input Mono */ @font-face { - font-family: 'input_mono_regular'; - src: url('../media/fonts/input_mono_regular.ttf') format('truetype'); - font-weight: normal; - font-style: normal; + font-family: 'input_mono_regular'; + src: url('../media/fonts/input_mono_regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; } @font-face { - font-family: 'input_mono_medium'; - src: url('../media/fonts/input_mono_medium.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'input_mono_thin'; - src: url('../media/fonts/input_mono_thin.ttf') format('truetype'); - font-weight: normal; - font-style: normal; + font-family: 'input_mono_medium'; + src: url('../media/fonts/input_mono_medium.ttf') format('truetype'); + font-weight: normal; + font-style: normal; } \ No newline at end of file diff --git a/media/fonts/input_mono_thin.ttf b/media/fonts/input_mono_thin.ttf deleted file mode 100644 index 9622bc3..0000000 Binary files a/media/fonts/input_mono_thin.ttf and /dev/null differ diff --git a/scripts/portal.js b/scripts/portal.js index e80c923..8219703 100644 --- a/scripts/portal.js +++ b/scripts/portal.js @@ -4,31 +4,41 @@ function Portal(sites) { this.el = document.createElement("div"); this.sites = sites; - - this.install = function() - { - document.body.appendChild(this.el); - } - - this.start = function() - { - this.install(); - this.el.innerHTML = window.location.hash && window.location.hash.length > 4 ? this.redirect() : this.directory(); - } + + // Templates - this.readme = function() + function _readme() { return `

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 diaries, wikis & portfolios.

To add yourself to the ring, submit a Pull Request.
If you found a broken link, please report it.

` } - this.buttons = function() + function _buttons() { return `

Random | Information

` } - - this.directory = function() + + function _directory(sites) { - return `\n${this.readme()}${this.buttons()}` + return ` + \n${_readme()}${_buttons()}` + } + + function _redirect(target) + { + return `

Redirecting to ${target}

+

Directory | Skip | Random | Information

` + } + + // + + this.install = function(host) + { + host.appendChild(this.el); + } + + this.start = function() + { + this.el.innerHTML = window.location.hash && window.location.hash.length > 4 ? _redirect(this.next()) : _directory(this.sites); } this.reload = function() @@ -38,44 +48,27 @@ function Portal(sites) this.navigate = function(target) { - setTimeout(() => { - window.location.href = target - },3000) - } - - this.location = function() - { - return window.location.hash.replace("#","").trim(); + setTimeout(() => { window.location.href = target; },3000) } this.locate = function() { - const hash = this.location(); + const hash = window.location.hash.replace("#","").trim(); if(hash == "random"){ return Math.floor(Math.random()*this.sites.length) } for(const id in this.sites){ - const site = this.sites[id]; - if(site.indexOf(hash) >-1){ + if(this.sites[id].indexOf(hash) >-1){ return parseInt(id) } } - return -1 + return -1; } - this.next = function(loc) + this.next = function(loc = this.locate()) { return loc == this.sites.length-1 ? this.sites[0] : this.sites[loc+1]; } - - this.redirect = function() - { - const location = this.locate(); - const target = this.next(location); - this.navigate(target) - return `

Redirecting to ${target}

-

Directory | Skip | Random | Information

` - } } diff --git a/scripts/sites.js b/scripts/sites.js index c1145a9..d811cc6 100644 --- a/scripts/sites.js +++ b/scripts/sites.js @@ -1,63 +1,66 @@ +'use strict'; + +// Don't forget the comma! No trailing slashes // protocole://url.domain.ext + const sites = [ - "https://wiki.xxiivv.com" - , "http://estevancarlos.com" - , "https://electro.pizza" - , "https://monochromatic.co" - , "https://joshavanier.github.io" - , "http://kaemura.com" - , "https://liamcooke.com" - , "https://electricgecko.de" - , "https://wichniow.ski" - , "https://hraew.autophagy.io" - , "https://evenunto.net" - , "https://anxl.faith" - , "https://xvw.github.io" - , "https://heracl.es" - , "https://felipecortez.net" - , "http://luminghao.com" - , "https://theiceshelf.com" - , "https://turelio.github.io" - , "https://spaceshipsin.space" - , "http://log.lectronice.com" - , "https://craze.co.uk" - , "https://shaneckel.com" - , "https://cblgh.org" - , "https://ellugar.co" - , "http://hur.bet" - , "http://chigby.org" - , "https://longest.voyage" - , "https://palomakop.tv" - , "https://travisshears.com" - , "https://v-os.ca" - , "http://secretinternet.club" - , "https://jmandel.xyz" - , "https://systems.ws" - , "https://jamesin.space" - , "https://nathanwentworth.co" - , "https://eswat.ca" - , "https://uonai.space" - , "http://controls.ee" - , "https://wasin.io" - , "https://inns.studio" - , "http://kokorobot.ca" - , "https://ameyama.com" - , "https://wake.st" - , "https://xarene.la" - , "https://alex.zyzhang.me" - , "http://bildwissenschaft.vortok.info" - , "https://jakofranko.github.com" - , "https://aeriform.io" - , "http://blog.lucasdidthis.com" - , "http://npisanti.com" - , "https://underscorediscovery.ca" - , "https://drisc.io" - , "https://neufv.website" - , "https://simbolo.xyz" - , "https://ricky.codes" - , "https://maxdeviant.com" - , "https://tynandebold.com" - , "http://gytis.co" - , "https://nomand.co" - ]; - // Don't forget the comma! No trailing slashes + "https://wiki.xxiivv.com" + , "http://estevancarlos.com" + , "https://electro.pizza" + , "https://monochromatic.co" + , "https://joshavanier.github.io" + , "http://kaemura.com" + , "https://liamcooke.com" + , "https://electricgecko.de" + , "https://wichniow.ski" + , "https://hraew.autophagy.io" + , "https://evenunto.net" + , "https://anxl.faith" + , "https://xvw.github.io" + , "https://heracl.es" + , "https://felipecortez.net" + , "http://luminghao.com" + , "https://theiceshelf.com" + , "https://turelio.github.io" + , "https://spaceshipsin.space" + , "http://log.lectronice.com" + , "https://craze.co.uk" + , "https://shaneckel.com" + , "https://cblgh.org" + , "https://ellugar.co" + , "http://hur.bet" + , "http://chigby.org" + , "https://longest.voyage" + , "https://palomakop.tv" + , "https://travisshears.com" + , "https://v-os.ca" + , "http://secretinternet.club" + , "https://jmandel.xyz" + , "https://systems.ws" + , "https://jamesin.space" + , "https://nathanwentworth.co" + , "https://eswat.ca" + , "https://uonai.space" + , "http://controls.ee" + , "https://wasin.io" + , "https://inns.studio" + , "http://kokorobot.ca" + , "https://ameyama.com" + , "https://wake.st" + , "https://xarene.la" + , "https://alex.zyzhang.me" + , "http://bildwissenschaft.vortok.info" + , "https://jakofranko.github.com" + , "https://aeriform.io" + , "http://blog.lucasdidthis.com" + , "http://npisanti.com" + , "https://underscorediscovery.ca" + , "https://drisc.io" + , "https://neufv.website" + , "https://simbolo.xyz" + , "https://ricky.codes" + , "https://maxdeviant.com" + , "https://tynandebold.com" + , "http://gytis.co" + , "https://nomand.co" +];