aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-31 11:00:21 +0000
committerr <r@freesoftwareextremist.com>2019-12-31 11:24:39 +0000
commit1aff0569bfecf427d097a1601d9c5ac449c65d49 (patch)
treed1d923b663709c751628ef362eb19bd3a82ac148 /templates
parent9e556721c507f5cfbafa32afbfa80b70c6f0eca1 (diff)
downloadbloat-1aff0569bfecf427d097a1601d9c5ac449c65d49.tar.gz
bloat-1aff0569bfecf427d097a1601d9c5ac449c65d49.zip
Add option to mask nsfw attachments
Diffstat (limited to 'templates')
-rw-r--r--templates/settings.tmpl4
-rw-r--r--templates/status.tmpl4
2 files changed, 6 insertions, 2 deletions
diff --git a/templates/settings.tmpl b/templates/settings.tmpl
index df04cb1..c4a1012 100644
--- a/templates/settings.tmpl
+++ b/templates/settings.tmpl
@@ -20,6 +20,10 @@
<input id="thread-tab" name="thread_in_new_tab" type="checkbox" value="true" {{if .Settings.ThreadInNewTab}}checked{{end}}>
<label for="thread-tab"> Open threads in new tab from timeline </label>
</div>
+ <div class="settings-form-field">
+ <input id="mask-nsfw" name="mask_nsfw" type="checkbox" value="true" {{if .Settings.MaskNSFW}}checked{{end}}>
+ <label for="mask-nsfw"> Mask NSFW Attachments </label>
+ </div>
<button type="submit"> Save </button>
</form>
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 4c94062..2013f47 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -61,7 +61,7 @@
{{if eq .Type "image"}}
<a class="img-link" href="{{.URL}}" target="_blank">
<img class="status-image" src="{{.URL}}" alt="status-image" />
- {{if $.Sensitive}}
+ {{if (and $.MaskNSFW $.Sensitive)}}
<div class="status-nsfw-overlay"></div>
{{end}}
</a>
@@ -76,7 +76,7 @@
<source src="{{.URL}}">
<p> Your browser doesn't support HTML5 video </p>
</video>
- {{if $.Sensitive}}
+ {{if (and $.MaskNSFW $.Sensitive)}}
<div class="status-nsfw-overlay"></div>
{{end}}
</div>