diff options
-rw-r--r-- | app.js | 8 | ||||
-rw-r--r-- | background.jpg | bin | 0 -> 893910 bytes | |||
-rw-r--r-- | composer.js | 8 | ||||
-rw-r--r-- | css/style.css | 2 | ||||
-rw-r--r-- | favicon.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | gossip.js | 2 | ||||
-rw-r--r-- | identify.js | 38 | ||||
-rw-r--r-- | index.html | 2 | ||||
-rw-r--r-- | lib/misc.js | 10 | ||||
-rw-r--r-- | render.js | 20 | ||||
-rw-r--r-- | views.js | 4 |
11 files changed, 47 insertions, 47 deletions
@@ -22,7 +22,7 @@ function route (keys) { } keys().then(key => { - var search = h('input', {placeholder: 'Search', classList: 'search'}) + var search = h('input', {placeholder: 'Serĉilo', classList: 'search'}) var navbar = h('div', {classList: 'navbar'}, [ h('div', {classList: 'internal'}, [ @@ -36,9 +36,9 @@ keys().then(key => { getName(key.publicKey, keys) ]) ]), - h('li', [h('a', {href: '#'}, ['All'])]), - h('li', [h('a', {href: '#?' + key.publicKey}, ['Mentions'])]), - h('li', {classList: 'right'}, [h('a', {href: '#settings'}, ['Settings'])]), + h('li', [h('a', {href: '#'}, ['Ĉiuj'])]), + h('li', [h('a', {href: '#?' + key.publicKey}, ['Mencioj'])]), + h('li', {classList: 'right'}, [h('a', {href: '#settings'}, ['Agordoj'])]), h('form', { classList: 'search', onsubmit: function (e) { window.location.hash = '?' + search.value diff --git a/background.jpg b/background.jpg Binary files differnew file mode 100644 index 0000000..c6fdd99 --- /dev/null +++ b/background.jpg diff --git a/composer.js b/composer.js index 9c1f236..1da7d1b 100644 --- a/composer.js +++ b/composer.js @@ -8,7 +8,7 @@ function composer (keys, reply, gotName, edit) { } else if (gotName) { var textarea = h('textarea', ['[' + gotName + '](' + reply.author + ')']) } else { - var textarea = h('textarea', {placeholder: 'Write a new bog post...'}) + var textarea = h('textarea', {placeholder: 'Verki novan afiŝon... La afiŝo kiun vi verkas ĉi tie aldoniĝos al la bog-reto subskribita per via ŝlosilo. Ĉu vi jam sekure konservis ĝin ie?'}) } var publisher = h('div', [ @@ -45,7 +45,7 @@ function composer (keys, reply, gotName, edit) { messageDiv.removeChild(messageDiv.firstChild) messageDiv.appendChild(cache) } - }, ['Cancel'])) + }, ['Nuligi'])) preview.firstChild.appendChild(h('button', { onclick: function () { publish(content, keys).then(post => { @@ -75,12 +75,12 @@ function composer (keys, reply, gotName, edit) { }) }) } - }, ['Publish'])) + }, ['Afiŝi'])) }) }) } } - }, ['Preview']) + }, ['Antaŭvidi']) ]) message.appendChild(publisher) diff --git a/css/style.css b/css/style.css index 135970e..113e061 100644 --- a/css/style.css +++ b/css/style.css @@ -1,6 +1,6 @@ body { font-family: 'Source Sans Pro'; - background: #f5f5f5; + background: #f5f5f5 url('/background.jpg') fixed; color: #5a5a5a; overflow-wrap: break-word; word-wrap: break-word; diff --git a/favicon.ico b/favicon.ico Binary files differnew file mode 100644 index 0000000..d55fb4e --- /dev/null +++ b/favicon.ico @@ -42,7 +42,7 @@ function processreq (req, pubkey, connection, keys) { var src = window.location.hash.substring(1) if ((!latest) && (src == req.latest)) { latest = h('div', {id: 'latest'}) - latest.appendChild(h('div', {classList: 'message', innerHTML: marked('**Still syncing feed**. In the meantime, here are the latest five messages...') + latest.appendChild(h('div', {classList: 'message', innerHTML: marked('**Ankoraŭ sinkronigas la fluon**. Intertempe jen la lastaj kvin mesaĝoj...') })) req.feed.forEach(post => { open(post).then(msg => { diff --git a/identify.js b/identify.js index acda8c8..17e3f6c 100644 --- a/identify.js +++ b/identify.js @@ -4,7 +4,7 @@ function identify (src, profile, keys, name) { if ((src[0] == '@') && (src != keys.publicKey)) { identifyDiv.appendChild(h('p', [ - 'Please note: ' + src.substring(0, 10) + '... is not you. You are: ', + 'Atentu: ' + src.substring(0, 10) + '... ne estas vi. Vi estas: ', h('a', {href: '#' + keys.publicKey}, [keys.publicKey.substring(0, 10) + '...']) ])) } @@ -74,7 +74,7 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButton) } } - }, ['Publish']) + }, ['Afiŝi']) ]) var newPhoto = h('span', [ @@ -128,7 +128,7 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButtons) newPhoto.parentNode.removeChild(newPhoto) } - }, ['Cancel']), + }, ['Nuligi']), h('button', { onclick: function () { if (photoURL.value) { @@ -148,10 +148,10 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButton) } } - }, ['Publish']) + }, ['Afiŝi']) ]) - var descInput = h('textarea', {placeholder: 'New description'}) + var descInput = h('textarea', {placeholder: 'Nova priskribo'}) var newDescription = h('div', [ descInput, @@ -173,16 +173,16 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButton) } } - }, ['Publish']), + }, ['Afiŝi']), h('button', { onclick: function () { identifyDiv.appendChild(identifyButtons) newDescription.parentNode.removeChild(newDescription) } - }, ['Cancel']) + }, ['Nuligi']) ]) - var locInput = h('input', {placeholder: 'New location'}) + var locInput = h('input', {placeholder: 'Nova loko'}) var newLocation = h('div', [ locInput, @@ -204,16 +204,16 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButton) } } - }, ['Publish']), + }, ['Afiŝi']), h('button', { onclick: function () { identifyDiv.appendChild(identifyButtons) newLocation.parentNode.removeChild(newLocation) } - }, ['Cancel']) + }, ['Nuligi']) ]) - var nameInput = h('input', {placeholder: 'New name'}) + var nameInput = h('input', {placeholder: 'Nova nomo'}) var newName = h('div', [ nameInput, @@ -236,13 +236,13 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButton) } } - }, ['Publish']), + }, ['Afiŝi']), h('button', { onclick: function () { identifyDiv.appendChild(identifyButtons) newName.parentNode.removeChild(newName) } - }, ['Cancel']) + }, ['Nuligi']) ]) var identifyButtons = h('span') @@ -253,19 +253,19 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(newName) identifyButtons.parentNode.removeChild(identifyButtons) } - }, ['New name'])) + }, ['Nova nomo'])) identifyButtons.appendChild(h('button', { onclick: function () { identifyDiv.appendChild(newBackground) identifyButtons.parentNode.removeChild(identifyButtons) } - }, ['New background'])) + }, ['Nova fono'])) identifyButtons.appendChild(h('button', { onclick: function () { identifyDiv.appendChild(newDescription) identifyButtons.parentNode.removeChild(identifyButtons) } - }, ['New description'])) + }, ['Nova priskribo'])) } //}, ['Identify ' + src.substring(0, 10) + '... with a new name']), @@ -274,14 +274,14 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(newPhoto) identifyButtons.parentNode.removeChild(identifyButtons) } - }, ['New image'])) + }, ['Nova bildo'])) identifyButtons.appendChild(h('button', { onclick: function () { identifyDiv.appendChild(newLocation) identifyButtons.parentNode.removeChild(identifyButtons) } - }, ['New location'])) + }, ['Nova loko'])) //}, ['Identify ' + src.substring(0, 10) + '... with a new photo']), @@ -290,7 +290,7 @@ function identify (src, profile, keys, name) { identifyDiv.appendChild(identifyButton) identifyButtons.parentNode.removeChild(identifyButtons) } - }, ['Cancel'])) + }, ['Nuligi'])) /*if (src[0] == '@') { var identifyButton = h('button', { onclick: function () { @@ -1,6 +1,6 @@ <html> <head> - <title>Bogbook</title> + <title>Interskri.be</title> <meta name='viewport' content='width=device-width initial-scale=1' /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel='stylesheet' href='./css/source-sans-pro.min.css' /> diff --git a/lib/misc.js b/lib/misc.js index afc3a33..aa42f77 100644 --- a/lib/misc.js +++ b/lib/misc.js @@ -3,7 +3,7 @@ function human(seconds) { if (seconds instanceof Date) seconds = Math.round((Date.now() - seconds) / 1000); - var suffix = seconds < 0 ? 'from now' : 'ago'; + var prefix = seconds < 0 ? 'post' : 'antaŭ'; seconds = Math.abs(seconds); var times = [ @@ -15,18 +15,18 @@ function human(seconds) { seconds / 60, // minutes seconds // seconds ]; - var names = ['year', 'month', 'week', 'day', 'hour', 'minute', 'second']; + var names = ['jaro', 'monato', 'semajno', 'tago', 'horo', 'minuto', 'sekundo']; for (var i = 0; i < names.length; i++) { var time = Math.floor(times[i]); var name = names[i]; if (time > 1) - name += 's'; + name += 'j'; if (time >= 1) - return time + ' ' + name + ' ' + suffix; + return prefix + ' ' + time + ' ' + name; } - return '0 seconds ' + suffix; + return 'ĝuste nun'; } // hscrpt by Dominic Tarr https://github.com/dominictarr/hscrpt/blob/master/LICENSE @@ -7,11 +7,11 @@ function getHeader (post, keys, mini) { raw.parentNode.removeChild(raw) removeRaw.parentNode.replaceChild(getRaw, removeRaw) } - }, ['hide']) + }, ['kaŝi']) getRaw.parentNode.replaceChild(removeRaw, getRaw) head.appendChild(raw) } - }, ['raw']) + }, ['kruda']) var head = h('span', [ h('p', {classList: 'right'}, [ @@ -52,7 +52,7 @@ function render (msg, keys, preview) { msgcontents.parentNode.replaceChild(editedcontents, msgcontents) } message.firstChild.appendChild(h('div', [ - 'edited in:', + 'redaktita en:', h('a', {href: '#' + nextPost.key}, [nextPost.key.substring(0, 10) + '...']) ])) if (!messageExists) { @@ -136,7 +136,7 @@ function render (msg, keys, preview) { message.appendChild(getHeader(msg, keys)) message.firstChild.appendChild(h('span', [ - 'edited: ', + 'redaktita: ', h('a', {href: '#' + msg.edited}, [msg.edited.substring(0, 10) + '...']) ])) @@ -200,7 +200,7 @@ function render (msg, keys, preview) { } }) } - }, ['Reply'])) + }, ['Respondi'])) if (msg.author === keys.publicKey) { buttons.appendChild(h('button', { onclick: function () { @@ -214,12 +214,12 @@ function render (msg, keys, preview) { message.appendChild(buttons) } } if (msg.type == 'name') { - var mini = h('span', [' identified ', h('a', {href: '#' + msg.named }, [msg.named.substring(0, 10) + '...']), ' as ' + msg.name]) + var mini = h('span', [' identigis ', h('a', {href: '#' + msg.named }, [msg.named.substring(0, 10) + '...']), ' kiel ' + msg.name]) message.appendChild(getHeader(msg, keys, mini)) } if (msg.type == 'image') { var mini = h('span', [ - ' added an image to ', + ' aldonis bildon al ', h('a', { href: '#' + msg.imaged }, [ msg.imaged.substring(0, 10) + '...', ' ', @@ -230,7 +230,7 @@ function render (msg, keys, preview) { } if (msg.type == 'background') { var mini = h('span', [ - ' added a background to ', + ' aldonis fonon al ', h('a', { href: '#' + msg.backgrounded }, [msg.backgrounded.substring(0, 10) + '...']), ' ', h('img', {src: msg.background, classList: 'avatar'}) @@ -239,7 +239,7 @@ function render (msg, keys, preview) { } if (msg.type == 'description') { var mini = h('span', [ - ' added a description to ', + ' aldonis priskribon al ', h('a', { href: '#' + msg.descripted }, [msg.descripted.substring(0, 10) + '...']), ' ', h('div', {innerHTML: marked(msg.description)}) @@ -248,7 +248,7 @@ function render (msg, keys, preview) { } if (msg.type == 'location') { var mini = h('span', [ - ' added a location to ', + ' aldonis lokon al ', h('a', { href: '#' + msg.located }, [msg.located.substring(0, 10) + '...']), ': ', msg.loc @@ -96,13 +96,13 @@ function profilePage (src, keys) { onclick: function () { location.href = '#?' + src } - }, [name + '\'s Mentions']) + }, ['Mencioj de '+ name]) profile.appendChild(mentionsButton) var respond = h('button', { onclick: function () { scroller.insertBefore(composer(keys, msg, name), scroller.childNodes[1]) } - }, ['Reply to ' + name]) + }, ['Respondi al ' + name]) profile.appendChild(respond) profile.appendChild(h('button', { |