From 015a31a14f5de5a1c7aa3dc71175eb0c2fe58b30 Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Thu, 17 Jun 2021 22:30:49 +0100 Subject: shorter patch names, updated README.md, new Makefile --- i18n_views/about.html | 15 ++ i18n_views/account.html | 62 ++++++++ i18n_views/chatter.html | 66 ++++++++ i18n_views/combos.html | 13 ++ i18n_views/funzone.html | 16 ++ i18n_views/header.html | 83 ++++++++++ i18n_views/hfcs.html | 73 +++++++++ i18n_views/honk.html | 146 +++++++++++++++++ i18n_views/honkers.html | 62 ++++++++ i18n_views/honkform.html | 49 ++++++ i18n_views/honkfrags.html | 11 ++ i18n_views/honkpage.html | 45 ++++++ i18n_views/honkpage.js | 390 ++++++++++++++++++++++++++++++++++++++++++++++ i18n_views/local.css | 8 + i18n_views/login.html | 12 ++ i18n_views/msg.html | 7 + i18n_views/onts.html | 16 ++ i18n_views/pleroma.css | 7 + i18n_views/style.css | 334 +++++++++++++++++++++++++++++++++++++++ i18n_views/xzone.html | 17 ++ 20 files changed, 1432 insertions(+) create mode 100644 i18n_views/about.html create mode 100644 i18n_views/account.html create mode 100644 i18n_views/chatter.html create mode 100644 i18n_views/combos.html create mode 100644 i18n_views/funzone.html create mode 100644 i18n_views/header.html create mode 100644 i18n_views/hfcs.html create mode 100644 i18n_views/honk.html create mode 100644 i18n_views/honkers.html create mode 100644 i18n_views/honkform.html create mode 100644 i18n_views/honkfrags.html create mode 100644 i18n_views/honkpage.html create mode 100644 i18n_views/honkpage.js create mode 100644 i18n_views/local.css create mode 100644 i18n_views/login.html create mode 100644 i18n_views/msg.html create mode 100644 i18n_views/onts.html create mode 100644 i18n_views/pleroma.css create mode 100644 i18n_views/style.css create mode 100644 i18n_views/xzone.html (limited to 'i18n_views') diff --git a/i18n_views/about.html b/i18n_views/about.html new file mode 100644 index 0000000..962e7c3 --- /dev/null +++ b/i18n_views/about.html @@ -0,0 +1,15 @@ +{{ template "header.html" . }} +
+
+{{ .AboutMsg }}
+

+ + +
{{ .i18n.Version }}:{{ .HonkVersion }} +
{{ .i18n.Memory }}:{{ printf "%.02f" .Sensors.Memory }}MB +
{{ .i18n.Uptime }}:{{ printf "%.02f" .Sensors.Uptime }}s +
{{ .i18n.Cputime }}:{{ printf "%.02f" .Sensors.CPU }}s +
+

+

+
diff --git a/i18n_views/account.html b/i18n_views/account.html new file mode 100644 index 0000000..2d5a3f3 --- /dev/null +++ b/i18n_views/account.html @@ -0,0 +1,62 @@ +{{ template "header.html" . }} +
+
+

{{ .i18n.Account }} - {{ .i18n.Logout }} +

{{ .i18n.Username }}: {{ .User.Name }} +

+
+ +

{{ .i18n.Aboutme }}: +

+ +

+ + +

+ + +

+ + +

+ + +

+ + +

+ + +

+

+
+
+
+
+ +

{{ .i18n.ChangePwd }} +

- {{ .i18n.OldPwd }} +

- {{ .i18n.NewPwd }} +

+

+
+
diff --git a/i18n_views/chatter.html b/i18n_views/chatter.html new file mode 100644 index 0000000..0173224 --- /dev/null +++ b/i18n_views/chatter.html @@ -0,0 +1,66 @@ +{{ template "header.html" . }} +
+
+

+

+

{{ .i18n.NewChatter }}

+ +


+ +


+ +

+ +

+ +
+{{ $chonkcsrf := .ChonkCSRF }} +{{ range .Chatter }} +
+

+chatter: {{ .Target }} +{{ $target := .Target }} +{{ range .Chonks }} +

+

+{{ .Date.Local.Format "15:04" }} {{ .Handle }}: +{{ .HTML }} +{{ range .Donks }} +{{ if .Local }} +{{ if eq .Media "text/plain" }} +

{{ .i18n.Attachment }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else if eq .Media "application/pdf" }} +

{{ .i18n.Attachment }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +

{{ .Desc }} +{{ end }} +{{ else }} +{{ if .XID }} +

{{ .i18n.ExtAttachment }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +{{ if eq .Media "video/mp4" }} +

+{{ else }} +

{{ .Desc }} +{{ end }} +{{ end }} +{{ end }} +{{ end }} +

+{{ end }} +
+ + +


+ +

+ +

+
+{{ end }} +
diff --git a/i18n_views/combos.html b/i18n_views/combos.html new file mode 100644 index 0000000..9cd227d --- /dev/null +++ b/i18n_views/combos.html @@ -0,0 +1,13 @@ +{{ template "header.html" . }} +
+
+

{{ .i18n.Combos }} +

+{{ range .Combos }} +
+
+

{{ . }} +

+
+{{ end }} +
diff --git a/i18n_views/funzone.html b/i18n_views/funzone.html new file mode 100644 index 0000000..d5e69e3 --- /dev/null +++ b/i18n_views/funzone.html @@ -0,0 +1,16 @@ +{{ template "header.html" . }} +
+
+

{{ .i18n.FunZoneGreet }} +

    +{{ range .Emus }} +
  • :{{ . }}: +{{ end }} +
+
    +{{ range .Memes }} +
  • meme: {{ . }} +{{ end }} +
+
+
diff --git a/i18n_views/header.html b/i18n_views/header.html new file mode 100644 index 0000000..4f3373e --- /dev/null +++ b/i18n_views/header.html @@ -0,0 +1,83 @@ + + + + +honk + +{{ if .LocalStyleParam }} + +{{ end }} + + + + + + + + +
+{{ if .UserInfo }} +
+menu {{ .UserInfo.Username }} + +
+

+{{ else }} +{{ .i18n.Home }} +{{ .i18n.Tags }} +{{ .i18n.Events }} +{{ .i18n.About }} +{{ if .ShowRSS }} +rss +{{ end }} +{{ .i18n.Login }} +
+ + +
+ +
+{{ end }} +
diff --git a/i18n_views/hfcs.html b/i18n_views/hfcs.html new file mode 100644 index 0000000..75b6f4f --- /dev/null +++ b/i18n_views/hfcs.html @@ -0,0 +1,73 @@ +{{ template "header.html" . }} +
+
+

+{{ .i18n.Hfcs }} +

+ +
+

{{ .i18n.NewFilter }}

+


+ +


+ +


+

{{ .i18n.Matches }}

+


+ +

+


+ +

+


+ +


+

action

+

+ + + + +


+ +


+ +


+

{{ .i18n.Expiration }}

+


+ +


+

+

+
+{{ $i18n := .i18n }} +{{ $csrf := .FilterCSRF }} +{{ range .Filters }} +
+

{{ $i18n.FilterName }}: {{ .Name }} +{{ with .Notes }}

{{ $i18n.Notes }}: {{ . }}{{ end }} +

Date: {{ .Date.Format "2006-01-02" }} +{{ with .Actor }}

{{ $i18n.Who }}: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }} +{{ if .IsAnnounce }}

Announce: {{ .AnnounceOf }}{{ end }} +{{ with .Text }}

Text: {{ . }}{{ end }} +

{{ $i18n.Action }}: {{ range .Actions }} {{ . }} {{ end }} +{{ with .Rewrite }}

{{ $i18n.Rewrite }}: {{ . }}{{ end }} +{{ with .Replace }}

{{ $i18n.Replace }}: {{ . }}{{ end }} +{{ if not .Expiration.IsZero }}

{{ $i18n.Expiration }}: {{ .Expiration.Format "2006-01-02 03:04" }}{{ end }} +

+ + + + +
+

+

+{{ end }} +
diff --git a/i18n_views/honk.html b/i18n_views/honk.html new file mode 100644 index 0000000..52f63a7 --- /dev/null +++ b/i18n_views/honk.html @@ -0,0 +1,146 @@ +
+{{ $bonkcsrf := .BonkCSRF }} +{{ $IsPreview := .IsPreview }} +{{ $maplink := .MapLink }} +{{ $omitimages := .OmitImages }} +{{ $i18n := .i18n }} +{{ $lang := .Lang }} +{{ with .Honk }} +
+{{ if $bonkcsrf }} + +{{ else }} + +{{ end }} + +{{ if $bonkcsrf }} {{ end }} +{{ if .Oonker }} +{{ if $bonkcsrf }} + +{{ else }} + +{{ end }} + +{{ if $bonkcsrf }} {{ end }} +{{ end }} +

+{{ if $bonkcsrf }} +{{ .Username }} +{{ else }} +{{ .Username }} +{{ end }} +{{ .What }} {{ .Date.Local.Format "02 Jan 2006 15:04 -0700" }} +{{ if .Oonker }} +
+ +{{ if $bonkcsrf }} +{{ $i18n.Original }}: {{ .Oondle }} +{{ else }} +{{ $i18n.Original }}: {{ .Oondle }} +{{ end }} + +{{ else }} +{{ if .RID }} +
+ +{{ $i18n.InReplyTo }}: {{ .RID }} + +{{ end }} +{{ end }} +
+{{ if $bonkcsrf }} + {{ $i18n.Convoy }}: {{ .Convoy }} +{{ else }} + {{ $i18n.Convoy }}: {{ .Convoy }} + +{{ end }} +

+

+

+{{ .HTPrecis }}

+

{{ .HTPrecis }} +

{{ .HTML }} +{{ with .Time }} +

{{ $i18n.Time }}: {{ .StartTime.Local.Format "03:04PM EDT Mon Jan 02"}} +{{ if .Duration }}
{{ $i18n.Duration }}: {{ .Duration }}{{ end }} +{{ end }} +{{ with .Place }} +

{{ $i18n.Location }}: {{ with .Url }}{{ end }}{{ .Name }}{{ if .Url }}{{ end }}{{ if or .Latitude .Longitude }} {{ .Latitude }} {{ .Longitude }}{{ end }} +{{ end }} +{{ range .Donks }} +{{ if .Local }} +{{ if eq .Media "text/plain" }} +

{{ $i18n.Attachment }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else if eq .Media "application/pdf" }} +

{{ $i18n.Attachment }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +{{ if $omitimages }} +

{{ $i18n.Image }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +

{{ .Desc }} +{{ end }} +{{ end }} +{{ else }} +{{ if .External }} +

{{ $i18n.ExtAttachment }}: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }} +{{ if eq .Media "video/mp4" }} +

+{{ else }} +

{{ .Desc }} +{{ end }} +{{ end }} +{{ end }} +{{ end }} +

+{{ end }} +{{ if and $bonkcsrf (not $IsPreview) }} +

+

+{{ $i18n.Actions }} +
+

+{{ if .Honk.Public }} +{{ if .Honk.IsBonked }} + +{{ else }} + +{{ end }} +{{ else }} + +{{ end }} + + + +

+ +
+

+{{ end }} +

diff --git a/i18n_views/honkers.html b/i18n_views/honkers.html new file mode 100644 index 0000000..5b9ecf4 --- /dev/null +++ b/i18n_views/honkers.html @@ -0,0 +1,62 @@ +{{ template "header.html" . }} +
+{{ $i18n := .i18n }} +
+

+

+

{{ $i18n.AddNewHonker }}

+ +


+ +


+ +


+ +

+


+ +

+

+
+{{ $honkercsrf := .HonkerCSRF }} +
+ +

+

+{{ range .Honkers }} +
+
+avatar +

{{ .Name }} +

+

+

+

url: {{ .XID }} +

{{ $i18n.Flavor }}: {{ .Flavor }} +

+ + +

{{ $i18n.Name }}: +


+ +

{{ $i18n.Combos }}: +

+ + + + +

+
+

+

+{{ end }} +
diff --git a/i18n_views/honkform.html b/i18n_views/honkform.html new file mode 100644 index 0000000..ce17fca --- /dev/null +++ b/i18n_views/honkform.html @@ -0,0 +1,49 @@ +

+ +

+ + + +

{{ .i18n.MakeNoise }}

+

+

+{{ .i18n.MoreOptions }} +

+ + +


+ +{{ with .SavedPlace }} +

+

+


+


+

+ +

+{{ else }} +

+

+{{ end }} +

+

+


+ +


+ +

+
+

+ +

+ + + +

diff --git a/i18n_views/honkfrags.html b/i18n_views/honkfrags.html new file mode 100644 index 0000000..5ccc2da --- /dev/null +++ b/i18n_views/honkfrags.html @@ -0,0 +1,11 @@ +
{{ .TopHID }}
+{{ $BonkCSRF := .HonkCSRF }} +{{ $MapLink := .MapLink }} +{{ $Badonk := .User.Options.Reaction }} +{{ $OmitImages := .User.Options.OmitImages }} +

{{ .ServerMessage }}

+
+{{ range .Honks }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "Badonk" $Badonk "OmitImages" $OmitImages }} +{{ end }} +
diff --git a/i18n_views/honkpage.html b/i18n_views/honkpage.html new file mode 100644 index 0000000..0ae42ef --- /dev/null +++ b/i18n_views/honkpage.html @@ -0,0 +1,45 @@ +{{ template "header.html" . }} +
+
+
+{{ if .Name }} +

{{ .Name }} rss +

{{ .WhatAbout }} +{{ end }} +

{{ .ServerMessage }} +

+{{ if .HonkCSRF }} +{{ template "honkform.html" . }} + + +{{ end }} +
+{{ if and .HonkCSRF (not .IsPreview) }} +
+

+ +

+{{ if eq .ServerMessage .i18n.MoarHonks }} {{ end }} +{{ end }} +
+
+{{ $BonkCSRF := .HonkCSRF }} +{{ $IsPreview := .IsPreview }} +{{ $MapLink := .MapLink }} +{{ $Badonk := .User.Options.Reaction }} +{{ $i18n := .i18n }} +{{ $OmitImages := .User.Options.OmitImages }} +{{ range .Honks }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages "i18n" $i18n }} +{{ end }} +
+
+
diff --git a/i18n_views/honkpage.js b/i18n_views/honkpage.js new file mode 100644 index 0000000..351cde4 --- /dev/null +++ b/i18n_views/honkpage.js @@ -0,0 +1,390 @@ +function getCookie(name){ + if(document.cookie.length == 0) + return null; + + var regSepCookie = new RegExp('(; )', 'g'); + var cookies = document.cookie.split(regSepCookie); + + for(var i = 0; i < cookies.length; i++){ + var regInfo = new RegExp('=', 'g'); + var infos = cookies[i].split(regInfo); + if(infos[0] == name){ + return unescape(infos[1]); + } + } + return null; +} + + +function encode(hash) { + var s = [] + for (var key in hash) { + var val = hash[key] + s.push(escape(key) + "=" + escape(val)) + } + return s.join("&") +} +function post(url, data) { + var x = new XMLHttpRequest() + x.open("POST", url) + x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") + x.send(data) +} +function get(url, whendone) { + var x = new XMLHttpRequest() + x.open("GET", url) + x.responseType = "document" + x.onload = function() { whendone(x) } + x.send() +} +function bonk(el, xid) { + el.innerHTML = i18n_bonked + el.disabled = true + post("/bonk", encode({"js": "2", "CSRF": csrftoken, "xid": xid})) + return false +} +function unbonk(el, xid) { + el.innerHTML = i18n_unbonked + el.disabled = true + post("/zonkit", encode({"CSRF": csrftoken, "wherefore": "unbonk", "what": xid})) +} +function muteit(el, convoy) { + el.innerHTML = i18n_muted + el.disabled = true + post("/zonkit", encode({"CSRF": csrftoken, "wherefore": "zonvoy", "what": convoy})) + var els = document.querySelectorAll('article.honk') + for (var i = 0; i < els.length; i++) { + var e = els[i] + if (e.getAttribute("data-convoy") == convoy) { + e.remove() + } + } +} +function zonkit(el, xid) { + el.innerHTML = i18n_zonked + el.disabled = true + post("/zonkit", encode({"CSRF": csrftoken, "wherefore": "zonk", "what": xid})) + var p = el + while (p && p.tagName != "ARTICLE") { + p = p.parentElement + } + if (p) { + p.remove() + } +} +function flogit(el, how, xid) { + var s = how + if (honklang == 'en') { + if (s[s.length-1] != "e") { s += "e" } + s += "d" + if (s == "untaged") s = i18n_untagged + if (s == "reacted") s = i18n_badonked + } else { + if (s == "deack") s = i18n_deack + if (s == "ack") s = i18n_ack + if (s == "unsave") s = i18n_unsave + if (s == "save") s = i18n_save + if (s == "untag") s = i18n_untagged + if (s == "react") s = i18n_badonked + } + + el.innerHTML = s + el.disabled = true + post("/zonkit", encode({"CSRF": csrftoken, "wherefore": how, "what": xid})) +} + +var lehonkform = document.getElementById("honkform") +var lehonkbutton = document.getElementById("honkingtime") + +function oldestnewest(btn) { + var els = document.getElementsByClassName("glow") + if (els.length) { + els[els.length-1].scrollIntoView() + } +} +function removeglow() { + var els = document.getElementsByClassName("glow") + while (els.length) { + els[0].classList.remove("glow") + } +} + +function fillinhonks(xhr, glowit) { + var doc = xhr.responseXML + var stash = curpagestate.name + ":" + curpagestate.arg + tophid[stash] = doc.children[0].children[1].children[0].innerText + var srvmsg = doc.children[0].children[1].children[1] + var honks = doc.children[0].children[1].children[2].children + + var srvel = document.getElementById("srvmsg") + while (srvel.children[0]) { + srvel.children[0].remove() + } + srvel.prepend(srvmsg) + + var frontload = true + if (curpagestate.name == "convoy") { + frontload = false + } + + var honksonpage = document.getElementById("honksonpage") + var holder = honksonpage.children[0] + var lenhonks = honks.length + for (var i = honks.length; i > 0; i--) { + var h = honks[i-1] + if (glowit) + h.classList.add("glow") + if (frontload) { + holder.prepend(h) + } else { + holder.append(h) + } + + } + relinklinks() + return lenhonks +} +function hydrargs() { + var name = curpagestate.name + var arg = curpagestate.arg + var args = { "page" : name } + if (name == "convoy") { + args["c"] = arg + } else if (name == "combo") { + args["c"] = arg + } else if (name == "honker") { + args["xid"] = arg + } + return args +} +function refreshupdate(msg) { + var el = document.querySelector("#refreshbox p span") + if (el) { + el.innerHTML = msg + } +} +function refreshhonks(btn) { + removeglow() + btn.innerHTML = i18n_refreshing + btn.disabled = true + var args = hydrargs() + var stash = curpagestate.name + ":" + curpagestate.arg + args["tophid"] = tophid[stash] + get("/hydra?" + encode(args), function(xhr) { + var lenhonks = fillinhonks(xhr, true) + btn.innerHTML = i18n_refreshing + btn.disabled = false + refreshupdate(" " + lenhonks + " new") + }) +} +function statechanger(evt) { + var data = evt.state + if (!data) { + return + } + switchtopage(data.name, data.arg) +} +function switchtopage(name, arg) { + var stash = curpagestate.name + ":" + curpagestate.arg + var honksonpage = document.getElementById("honksonpage") + var holder = honksonpage.children[0] + holder.remove() + var srvel = document.getElementById("srvmsg") + var msg = srvel.children[0] + if (msg) { + msg.remove() + servermsgs[stash] = msg + } + showelement("refreshbox") + + honksforpage[stash] = holder + + curpagestate.name = name + curpagestate.arg = arg + // get the holder for the target page + var stash = name + ":" + arg + holder = honksforpage[stash] + if (holder) { + honksonpage.prepend(holder) + msg = servermsgs[stash] + if (msg) { + srvel.prepend(msg) + } + } else { + // or create one and fill it + honksonpage.prepend(document.createElement("div")) + var args = hydrargs() + get("/hydra?" + encode(args), function(xhr) { fillinhonks(xhr, false) }) + } + refreshupdate("") +} +function newpagestate(name, arg) { + return { "name": name, "arg": arg } +} +function pageswitcher(name, arg) { + return function(evt) { + var topmenu = document.getElementById("topmenu") + topmenu.open = false + if (name == curpagestate.name && arg == curpagestate.arg) { + return false + } + switchtopage(name, arg) + var url = evt.srcElement.href + if (!url) { + url = evt.srcElement.parentElement.href + } + history.pushState(newpagestate(name, arg), "some title", url) + window.scrollTo(0, 0) + return false + } +} +function relinklinks() { + var els = document.getElementsByClassName("convoylink") + while (els.length) { + els[0].onclick = pageswitcher("convoy", els[0].text) + els[0].classList.remove("convoylink") + } + els = document.getElementsByClassName("combolink") + while (els.length) { + els[0].onclick = pageswitcher("combo", els[0].text) + els[0].classList.remove("combolink") + } + els = document.getElementsByClassName("honkerlink") + while (els.length) { + var el = els[0] + var xid = el.getAttribute("data-xid") + el.onclick = pageswitcher("honker", xid) + el.classList.remove("honkerlink") + } +} +(function() { + var el = document.getElementById("homelink") + el.onclick = pageswitcher("home", "") + el = document.getElementById("atmelink") + el.onclick = pageswitcher("atme", "") + el = document.getElementById("firstlink") + el.onclick = pageswitcher("first", "") + el = document.getElementById("savedlink") + el.onclick = pageswitcher("saved", "") + el = document.getElementById("longagolink") + el.onclick = pageswitcher("longago", "") + relinklinks() + window.onpopstate = statechanger + history.replaceState(curpagestate, "some title", "") +})(); +(function() { + hideelement("donkdescriptor") +})(); +function showhonkform(elem, rid, hname) { + var form = lehonkform + form.style = "display: block" + if (elem) { + form.remove() + elem.parentElement.parentElement.parentElement.insertAdjacentElement('beforebegin', form) + } else { + hideelement(lehonkbutton) + elem = document.getElementById("honkformhost") + elem.insertAdjacentElement('afterend', form) + } + var ridinput = document.getElementById("ridinput") + if (rid) { + ridinput.value = rid + honknoise.value = hname + " " + } else { + ridinput.value = "" + honknoise.value = "" + } + var updateinput = document.getElementById("updatexidinput") + updateinput.value = "" + document.getElementById("honknoise").focus() + return false +} +function cancelhonking() { + hideelement(lehonkform) + showelement(lehonkbutton) +} +function showelement(el) { + if (typeof(el) == "string") + el = document.getElementById(el) + if (!el) return + el.style.display = "block" +} +function hideelement(el) { + if (typeof(el) == "string") + el = document.getElementById(el) + if (!el) return + el.style.display = "none" +} +function updatedonker() { + var el = document.getElementById("donker") + el.children[1].textContent = el.children[0].value.slice(-20) + var el = document.getElementById("donkdescriptor") + el.style.display = "" + var el = document.getElementById("saveddonkxid") + el.value = "" +} +var checkinprec = 100.0 +var gpsoptions = { + enableHighAccuracy: false, + timeout: 1000, + maximumAge: 0 +}; +function fillcheckin() { + if (navigator.geolocation) { + navigator.geolocation.getCurrentPosition(function(pos) { + showelement("placedescriptor") + var el = document.getElementById("placelatinput") + el.value = Math.round(pos.coords.latitude * checkinprec) / checkinprec + el = document.getElementById("placelonginput") + el.value = Math.round(pos.coords.longitude * checkinprec) / checkinprec + checkinprec = 10000.0 + gpsoptions.enableHighAccuracy = true + gpsoptions.timeout = 2000 + }, function(err) { + showelement("placedescriptor") + el = document.getElementById("placenameinput") + el.value = err.message + }, gpsoptions) + } +} + +window.getCookie = function(name) { + var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)')); + if (match) return match[2]; +} + +var honklang = getCookie('lang') +switch(honklang) { + case "fr": + var i18n_deack = "marqué non lu" + var i18n_ack = "marqué lu" + var i18n_unsave = "oublié" + var i18n_save = "sauvegardé" + + var i18n_bonked = "reposté" + var i18n_unbonked = "départagé" + var i18n_muted = "mis en sourdine" + var i18n_badonked = "réagi" + var i18n_zonked = "supprimé" + var i18n_untagged = "débalisé" + var i18n_refreshing = "rafraîchissement" + break; + + default: + var i18n_deack = "deacked" + var i18n_ack = "ack" + var i18n_unsave = "unsave" + var i18n_save = "save" + + var i18n_bonked = "bonked" + var i18n_unbonked = "unbonked" + var i18n_muted = "muted" + var i18n_badonked = "badonked" + var i18n_untagged = "untagged" + var i18n_zonked = "zonked" + var i18n_refreshing = "refreshing" + +} + +//console.log("i18n_bonked: "+ i18n_bonked + "\n"+ "cookie: "+ getCookie("lang")) + diff --git a/i18n_views/local.css b/i18n_views/local.css new file mode 100644 index 0000000..680d300 --- /dev/null +++ b/i18n_views/local.css @@ -0,0 +1,8 @@ +#altnavbar{ + margin-left:17%; + position:fixed; + background:var(--bg-page); + opacity:0.7; + top:0; + padding:5px +} diff --git a/i18n_views/login.html b/i18n_views/login.html new file mode 100644 index 0000000..e5ea195 --- /dev/null +++ b/i18n_views/login.html @@ -0,0 +1,12 @@ +{{ template "header.html" . }} +
+
+{{ .LoginMsg }} +
+

- + {{ .i18n.Username }} +

- {{ .i18n.Pwd }} +

+

+
+
diff --git a/i18n_views/msg.html b/i18n_views/msg.html new file mode 100644 index 0000000..b729caa --- /dev/null +++ b/i18n_views/msg.html @@ -0,0 +1,7 @@ +{{ template "header.html" . }} +
+
+

+{{ .ServerMessage }} +

+
diff --git a/i18n_views/onts.html b/i18n_views/onts.html new file mode 100644 index 0000000..4a208c8 --- /dev/null +++ b/i18n_views/onts.html @@ -0,0 +1,16 @@ +{{ template "header.html" . }} +
+
+

{{ .i18n.Onts }} +{{ $letter := 0 }} +

    +{{ range .Onts }} +{{ if not (eq $letter (index .Name 0)) }} +{{ $letter = (index .Name 0) }} +
  • +{{ end }} +#{{ .Name }} ({{ .Count }}) +{{ end }} +

+
+
diff --git a/i18n_views/pleroma.css b/i18n_views/pleroma.css new file mode 100644 index 0000000..b25439a --- /dev/null +++ b/i18n_views/pleroma.css @@ -0,0 +1,7 @@ +html { + --bg-page: #1b2735; + --bg-dark: #121a24; + --fg: #b9b9ba; + --hl: #d8a070; + --fg-subtle: rgba(185, 185, 186, 0.5); +} diff --git a/i18n_views/style.css b/i18n_views/style.css new file mode 100644 index 0000000..b1da23d --- /dev/null +++ b/i18n_views/style.css @@ -0,0 +1,334 @@ +html { + --bg-page: #306; + --bg-dark: #002; + --fg: #dcf; + --hl: #dcf; + --fg-subtle: #a9c; + --fg-limited: #a79; +} + +body { + background: var(--bg-page); + color: var(--fg); + font-size: 1em; + word-wrap: break-word; + font-family: sans-serif, "Noto Color Emoji"; + line-height: 1.2; + overscroll-behavior-y: contain; +} +pre, code { + white-space: pre-wrap; +} +blockquote { + margin-left: 0em; + padding-left: 0.5em; + border-left: 1px solid var(--fg-subtle); +} +blockquote cite { + margin-left: 2em; +} +table { + display: block; + max-width: 100%; + overflow-x: auto; +} +a { + color: var(--fg); +} +form, input, textarea { + font-family: monospace, "Noto Color Emoji"; +} +p { + margin-top: 1em; + margin-bottom: 1em; +} +input { + background: var(--bg-page); + color: var(--fg); + font-size: 1.0em; + line-height: 1.2em; + padding: 0.4em; +} +#honkform input { + font-size: 0.8em; +} +body > header { + margin: 1em auto; + font-size: 1.5em; +} +body > header span { + margin-left: 2em; +} +body > header p { + padding: 1em; +} +header > details { + background: var(--bg-page); + padding: 1em 1em 1em 1em; + position: fixed; + top: 0; + left: 0; + display: inline; + max-height: calc(100% - 1em); + overflow: auto; + opacity: 0.7; + overscroll-behavior: contain; +} +header > details[open] { + padding: 1em 1em 0em 1em; + background: var(--bg-dark); + border: 1px solid var(--hl); + margin-bottom: 1em; + opacity: 1.0; +} +header > details summary span { + display: none; +} +header > details[open] summary span { + display: inline; +} +header > details li { + margin: 1em 0em 1em 0em; +} +details summary { + display: inline; +} +@supports (-moz-appearance:none) { + details summary { + display: list-item; + } +} +main { + max-width: 1200px; + margin: auto; + font-size: 1.5em; +} +hr { + border-color: var(--hl); +} +.info { + background: var(--bg-dark); + border: 1px solid var(--hl); + margin-bottom: 1em; + padding: 0em 1em 0em 1em; +} +.info div { + margin-top: 1em; + margin-bottom: 1em; +} +label { + font-size: 0.8em; +} +label.button, button, select { + font-size: 16px; + font-family: monospace; + color: var(--fg); + background: var(--bg-page); + border: 1px solid var(--hl); + padding: 0.5em; + white-space: nowrap; +} +.buttonarray { + margin-top: -2.0em; +} +.buttonarray button, .buttonarray > span { + margin-top: 2.0em; + display: inline-block; +} +button a { + text-decoration: none; +} +form { + margin-top: 1em; +} +textarea { + padding: 0.5em; + font-size: 1em; + background: var(--bg-page); + color: var(--fg); + width: 600px; + height: 4em; + margin-bottom: 0.5em; + box-sizing: border-box; + max-width: 100%; +} +textarea#honknoise { + height: 10em; +} +input[type="checkbox"] { + position: fixed; + top: -9999px; +} +input[type="checkbox"] + span:after { + content: "no"; +} +input[type="checkbox"]:checked + span:after { + content: "yes"; +} +input[type="checkbox"]:focus + span:after { + outline: 1px solid var(--fg); +} +input[type=file] { + display: none; +} + +.glow { + /* box-shadow: 0px 0px 16px var(--hl);*/ + box-shadow: 0px 0px 16px black; +} + +.honk { + margin: auto; + background: var(--bg-dark); + border: 1px solid var(--hl); + border-radius: 1em; + margin-bottom: 1em; + padding-left: 1em; + padding-right: 1em; + padding-top: 0; + overflow: hidden; +} + +.chat { + border-bottom: 0.5px solid var(--fg-subtle); + padding-left: 1em; +} +.chat p { + margin-top: 0.2em; + margin-bottom: 0.2em; +} +.chattarget { + border-bottom: 1px solid var(--fg-subtle); +} +.chatstamp { + margin-left: -1em; +} + +.honk #honkform { + padding: 1em; + border: 1px solid var(--fg); + } +.honk a { + color: var(--fg); + } +.honk header { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 0.8em; + line-height: 1.1; + margin-top: 1em; + height: 64px; + } + +.honk header .clip a { + color: var(--fg-subtle); + } +.honk header img { + float: left; + margin-right: 1em; + width: 64px; + height: 64px; + } +.honk header p { + margin-top: 0px; + } +.honk .actions button { + margin-left: 4em; + margin-top: 2em; + } +.honk .noise { + line-height: 1.4; + } + +.honk .noise code .kw { font-weight: bold; } +.honk .noise code .bi { font-weight: bold; } +.honk .noise code .st { color: var(--fg-subtle); } +.honk .noise code .nm { color: #ba88ff; } +.honk .noise code .op { color: #ba88ff; } +.honk .noise code .tp { font-weight: bold; } +.honk .noise code .cm { color: var(--fg-subtle); font-style: italic; } +.honk .noise code .al { color: #aaffbb; } +.honk .noise code .dl { color: #ffaabb; } + +.honk details.actions summary { + color: var(--fg-subtle); +} +.subtle .noise { + color: var(--fg-subtle); + font-size: 0.8em; +} +.subtle .noise a { + color: var(--fg-subtle); +} +.limited { + border: 1px solid var(--fg-limited); + color: var(--fg-limited); +} +.limited .glow { + box-shadow: 0px 0px 16px var(--fg-limited); +} +.limited .noise { + color: var(--fg-limited); + } +.limited .noise a { + color: var(--fg-limited); + } +.limited details.actions summary { + color: var(--fg-limited); + } +details.noise[open] summary { + display: none; +} +h1, h2 { + font-size: 1.2em; +} +h3, h4 { + font-size: 1.1em; +} + +img:not(.emu) { + background: var(--bg-page); +} +img, video { + max-width: 100%; + max-height: 600px; +} +.noise img:not(.emu) { + display: block; +} +img.emu { + width: 2em; + height: 2em; + vertical-align: middle; + margin: -2px; + object-fit: contain; +} +@media screen and (max-width: 740px) { + body { + font-size: 12px; + } + .honk header { + height: 52px; + } + .honk header img { + width: 48px; + height: 48px; + } + details summary { + outline: none; + } +} +@media print { + #topmenu, #topspacer, #infobox, #refreshbox, .actions { + display: none; + } + + html { + --bg-page: white; + --bg-dark: white; + --fg: black; + --fg-subtle: black; + --fg-limited: #a79; + } +} diff --git a/i18n_views/xzone.html b/i18n_views/xzone.html new file mode 100644 index 0000000..e2ab0d7 --- /dev/null +++ b/i18n_views/xzone.html @@ -0,0 +1,17 @@ +{{ template "header.html" . }} +
+
+
+ +

{{ .i18n.Import }} +

- xid +

+

+
+{{ $i18n := .i18n }} +{{ range .Honkers }} +
+

{{ $i18n.Honks }} {{ $i18n.HonksFrom }} {{ .Handle }} +

+{{ end }} +
-- cgit v1.2.3-70-g09d2