mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2026-03-02 02:41:34 +00:00
Create initial language support
Create support for languages, then reformat user, home, and post pages to use it, and create en and en-us language files.
This commit is contained in:
parent
1f76e43446
commit
496d53f47e
22 changed files with 319 additions and 54 deletions
|
|
@ -57,7 +57,7 @@ class ElemJS {
|
|||
event(name, callback) {
|
||||
this.element.addEventListener(name, event => callback(event))
|
||||
}
|
||||
child(toAdd, position) {
|
||||
child(toAdd, position = undefined) {
|
||||
if (typeof(toAdd) == "object") {
|
||||
toAdd.parent = this;
|
||||
if (typeof(position) == "number" && position >= 0) {
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class NextPage extends FreezeWidth {
|
|||
fetch() {
|
||||
if (this.fetching) return
|
||||
this.fetching = true
|
||||
this.freeze("Loading...")
|
||||
this.freeze(this.element.getAttribute("data-loading-text"))
|
||||
const type = this.element.getAttribute("data-type")
|
||||
|
||||
return fetch(`/fragment/user/${this.element.getAttribute("data-username")}/${this.nextPageNumber}?type=${type}`).then(res => res.text()).then(text => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue