NSFW content in spoiler

This commit is contained in:
localhost_frssoft 2023-11-05 17:46:14 +03:00
parent e99b6aa5f2
commit 306b0fe3b3
2 changed files with 5 additions and 0 deletions

1
README
View File

@ -12,6 +12,7 @@ Changes (localhost_custom fork):
- visible edited post time
- visible quoted post (status in status)
- hide boosts in spoiler
- hide NSFW content and attachments in spoiler
- some micro visual changes
- some others changes no matter

View File

@ -105,6 +105,7 @@
<div class="status-content">
{{if .Sensitive}}[NSFW]<br/>{{end}}
{{- if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}<br/>{{end -}}
{{if .Sensitive}}<details>{{end}}
{{- StatusContentFilter .Content .Emojis .Mentions | Raw -}}
{{if .Pleroma.Quote}}
<details>
@ -112,6 +113,7 @@
{{template "status" (WithContext .Pleroma.Quote $.Ctx)}}
</details>
{{end}}
{{if .Sensitive}}</details>{{end}}
</div>
{{end}}
{{$st_id := .ID}}
@ -132,6 +134,7 @@
</div>
{{end}}
{{if .MediaAttachments}}
{{if .Sensitive}}<details><summary>NSFW attachments</summary>{{end}}
<div class="status-media-container">
{{range .MediaAttachments}}
@ -185,6 +188,7 @@
{{end}}
{{end}}
</div>
{{if .Sensitive}}</details>{{end}}
{{end}}
{{if .Poll}}
<form class="poll-form" action="/vote/{{.Poll.ID}}" method="POST" target="_self">