mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-28 16:12:25 -05:00
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
This commit is contained in:
parent
635281f133
commit
026674bc2c
29 changed files with 1742 additions and 190 deletions
34
web/template/thread.tmpl
Normal file
34
web/template/thread.tmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{{ 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" .}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue