Commit 9d4b481a authored by Siong-Ui Te's avatar Siong-Ui Te

add show/hide pali type hint in modal

parent bcfb5ef5
......@@ -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
......@@ -26,8 +26,9 @@ devserver: make-local
@go run $(PRJDIR)/devserver.go
make-local: fmt dir extra js css html
make-sutta: rmsite dir extra js css htmlsutta cname-sutta
make-common: dir extra js css
make-local: fmt make-common html
make-sutta: rmsite make-common htmlsutta cname-sutta
rmsite:
@echo "\033[92mRemove $(WEBSITE_DIR)\033[0m"
rm -rf $(WEBSITE_DIR)
......
{{define "ime"}}
<!--
<div class="tanspose-table">
<div class="columns is-centered">
<div class="column is-narrow">
<table class="table is-hoverable is-bordered is-striped">
<tr><th>{{gettext "Type"}}</th><th>{{gettext "For"}}</th></tr>
<tr><td>aa</td><td>ā</td></tr>
<tr><td>ii</td><td>ī</td></tr>
<tr><td>uu</td><td>ū</td></tr>
<tr><td>"n</td><td>ṅ</td></tr>
<tr><td>.m</td><td>ṃ</td></tr>
<tr><td>~n</td><td>ñ</td></tr>
<tr><td>.t</td><td>ṭ</td></tr>
<tr><td>.d</td><td>ḍ</td></tr>
<tr><td>.n</td><td>ṇ</td></tr>
<tr><td>.l</td><td>ḷ</td></tr>
</table>
</div>
</div>
</div>
<style>
/* https://stackoverflow.com/a/16919439 */
/* https://stackoverflow.com/a/29581347 */
div.tanspose-table tr { display: block; float: left; }
div.tanspose-table th { display: block; }
div.tanspose-table td { display: block; }
</style>
-->
<!-- (Bulma) create a scrollable table by wrapping a table in a table-container element -->
<div class="table-container">
<table class="table is-bordered is-narrow">
<tbody>
<tr>
<th>{{gettext "Type"}}</th>
<td>aa</td>
<td>ii</td>
<td>uu</td>
<td>"n</td>
<td>.m</td>
<td>~n</td>
<td>.t</td>
<td>.d</td>
<td>.n</td>
<td>.l</td>
</tr>
<tr>
<th>{{gettext "For"}}</th>
<td>ā</td>
<td>ī</td>
<td>ū</td>
<td></td>
<td></td>
<td>ñ</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
{{end}}
{{define "modal"}}
<style>
#modal-input-toggle:not(:checked) ~ div.modal div.is-narrow {
display: none;
}
#modal-input-toggle:checked ~ div.modal label[for=modal-input-toggle] > span > span:first-child {
display: none;
}
#modal-input-toggle:not(:checked) ~ div.modal label[for=modal-input-toggle] > span > span:nth-child(2) {
display: none;
}
#modal-input-toggle:not(:checked) ~ div.modal div.is-narrow { display: none; }
#modal-input-toggle:checked ~ div.modal label[for=modal-input-toggle] > span > span:first-child { display: none; }
#modal-input-toggle:not(:checked) ~ div.modal label[for=modal-input-toggle] > span > span:nth-child(2) { display: none; }
#modal-hint-toggle:not(:checked) ~ div.modal div.table-container { display: none; }
#modal-hint-toggle:checked ~ div.modal label[for=modal-hint-toggle] > span > span:first-child { display: none; }
#modal-hint-toggle:not(:checked) ~ div.modal label[for=modal-hint-toggle] > span > span:nth-child(2) { display: none; }
</style>
<input id="modal-input-toggle" type="checkbox" class="is-hidden" />
<input id="modal-hint-toggle" type="checkbox" class="is-hidden" />
<div class="modal">
<div class="modal-background"></div>
......@@ -19,10 +18,12 @@
<p class="modal-card-title">
<span id="modal-title"></span>
<label for="modal-input-toggle" class="is-size-6" style="cursor: pointer;"><span class="tag is-info is-light"><span>Show</span><span>Hide</span>&nbsp;Input</span></label>
<label for="modal-hint-toggle" class="is-size-6" style="cursor: pointer;"><span class="tag is-info is-light"><span>Show</span><span>Hide</span>&nbsp;Hint</span></label>
</p>
<button class="delete" aria-label="close"></button>
</header>
<section class="modal-card-body">
{{template "ime" .}}
<!-- Content ... -->
<div class="columns">
......
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