gotosocial/web/template/thread.tmpl
f0x52 026674bc2c
Thread views on the web (#207)
* Webviews for status threads

* fix up templates

* add ForkAwesome and gotosocial-styling into repo

* clean up gotosocial-styling, old styling

* update CONTRIBUTING with new css building, and nodemon recommendation

* update Dockerfile with new css bundling

* those weren't supposed to make it in

* upgrade gotosocial-styling deps

* update authorize template with main wrapper

* update css pipeline

* abstract status from thread to avoid copy-pasting

* basic CW implementation

* fix PR review suggestions

* fix no-image-desc icon alignment

* remove template loading println

* remove println

* remove changes to testmodels

* reset changes to testmodels
2021-09-13 14:45:33 +02:00

34 lines
No EOL
774 B
Cheetah

{{ template "header.tmpl" .}}
<main>
<div class="thread">
{{range .context.Ancestors}}
<div class="toot">
{{ template "status.tmpl" .}}
</div>
{{end}}
<div class="toot expanded">
{{ template "status.tmpl" .status}}
</div>
{{range .context.Descendants}}
<div class="toot">
{{ template "status.tmpl" .}}
</div>
{{end}}
</div>
</main>
<script>
Array.from(document.getElementsByClassName("spoiler-label")).forEach((label) => {
let checkbox = document.getElementById(label.htmlFor);
function update() {
if(checkbox.checked) {
label.innerHTML = "Show more";
} else {
label.innerHTML = "Show less";
}
}
update();
label.addEventListener("click", () => {setTimeout(update, 1)});
});
</script>
{{ template "footer.tmpl" .}}