Commit 6868ca9a authored by Siong-Ui Te's avatar Siong-Ui Te

better UI

parent d7862246
......@@ -13,44 +13,16 @@ addons:
- make
- git
- gettext
# https://docs.travis-ci.com/user/build-matrix/
jobs:
include:
# for dictionary.online-dhamma.net
- env: TARGET_WEBSITE=dhamma
install:
- cd dictionary/
- make install
script:
- make make-dhamma
after_success:
- make custom_dhamma_deploy
# for dictionary.sutta.org
- env: TARGET_WEBSITE=sutta
install:
- cd dictionary/
- make install
script:
- make make-sutta
after_success:
- make custom_sutta_deploy
# dpl v2 (not working for lots of symlinks)
#deploy:
# - provider: pages:git
# repo: siongui/dictionary.sutta.org
# keep_history: false
# token: $GITHUB_TOKEN
# local_dir: website
# on:
# branch: master
# edge: true
# verbose: true
# dpl v1 (not working for lots of symlinks)
#deploy:
# - provider: pages
# repo: siongui/dictionary.sutta.org
# skip_cleanup: true
# github_token: $GITHUB_TOKEN
# local_dir: website
# on:
# branch: master
install:
- cd tipitaka/
- make install
script:
- make make-sutta
deploy:
- provider: pages
repo: siongui/tipitaka.sutta.org
skip_cleanup: true
github_token: $GITHUB_TOKEN
local_dir: tipitaka/website
on:
branch: master
......@@ -24,6 +24,21 @@ func toThai() {
}
}
func createToThaiButton() *Object {
r2t := Document.CreateElement("button")
r2t.ClassList().Add("toThai")
r2t.ClassList().Add("button")
r2t.ClassList().Add("is-small")
r2t.ClassList().Add("is-rounded")
r2t.SetInnerHTML("To Thai Script (experimental)")
r2t.AddEventListener("click", func(e Event) {
r2t.ClassList().Add("is-rounded")
toThai()
r2t.ClassList().Add("is-hidden")
})
return r2t
}
func xmlAction(t lib.Tree) {
// FIXME: show loading not working on Chromium
ShowIsLoadingXML(t.Text)
......@@ -43,17 +58,7 @@ func xmlAction(t lib.Tree) {
mainview.QuerySelector("div.content").AppendChild(fragment)
everyword.MarkEveryWord("#mainview > div.content", wordClickedHandler)
r2t := Document.CreateElement("button")
r2t.ClassList().Add("toThai")
r2t.ClassList().Add("button")
r2t.SetInnerHTML("To Thai Script (experimental)")
r2t.AddEventListener("click", func(e Event) {
r2t.SetInnerHTML("Transliterating")
toThai()
r2t.SetInnerHTML("Done!")
})
mainview.QuerySelector("div.content").Call("prepend", r2t)
mainview.QuerySelector("div.content").Call("prepend", createToThaiButton())
ToggleMobileTreeview()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment