Add fluoride mode

This commit is contained in:
r 2020-01-08 18:16:06 +00:00
parent ca711e62ec
commit a8dbbec988
11 changed files with 243 additions and 32 deletions

View file

@ -8,5 +8,8 @@
{{if .CustomCSS}}
<link rel="stylesheet" href="{{.CustomCSS}}">
{{end}}
{{if .FluorideMode}}
<script src="/static/fluoride.js"></script>
{{end}}
</head>
<body>

View file

@ -24,6 +24,10 @@
<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>
<div class="settings-form-field">
<input id="fluoride-mode" name="fluoride_mode" type="checkbox" value="true" {{if .Settings.FluorideMode}}checked{{end}}>
<label for="fluoride-mode"> Enable Fluoride Mode </label>
</div>
<button type="submit"> Save </button>
</form>

View file

@ -11,7 +11,7 @@
{{template "status" .Reblog}}
{{else}}
{{block "status" .}}
<div class="status-container">
<div class="status-container status-{{.ID}}" data-id="{{.ID}}">
{{if not .HideAccountInfo}}
<div class="status-profile-img-container">
<a class="img-link" href="/user/{{.Account.ID}}">
@ -90,8 +90,8 @@
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
<img class="icon" src="/static/icons/reply.png" alt="reply" />
</a>
<a class="status-action-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}>
<span> {{DisplayInteractionCount .RepliesCount}} </span>
<a class="status-reply-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}>
{{DisplayInteractionCount .RepliesCount}}
</a>
</div>
<div class="status-action">
@ -101,35 +101,35 @@
</a>
{{else}}
{{if .Reblogged}}
<form class="status-retweet" action="/unretweet/{{.ID}}" method="post">
<form class="status-retweet" data-action="unretweet" action="/unretweet/{{.ID}}" method="post">
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
<input type="image" src="/static/icons/retweeted.png" alt="undo retweet" class="icon" title="undo retweet">
</form>
{{else}}
<form class="status-retweet" action="/retweet/{{.ID}}" method="post">
<form class="status-retweet" data-action="retweet" action="/retweet/{{.ID}}" method="post">
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
<input type="image" src="/static/icons/retweet.png" alt="retweet" class="icon" title="retweet">
</form>
{{end}}
{{end}}
<a class="status-action-count" href="/retweetedby/{{.ID}}" title="click to see the the list">
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
<a class="status-retweet-count" href="/retweetedby/{{.ID}}" title="click to see the the list">
{{DisplayInteractionCount .ReblogsCount}}
</a>
</div>
<div class="status-action">
{{if .Favourited}}
<form class="status-like" action="/unlike/{{.ID}}" method="post">
<form class="status-like" data-action="unlike" action="/unlike/{{.ID}}" method="post">
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
<input type="image" src="/static/icons/liked.png" alt="unlike" class="icon" title="unlike">
</form>
{{else}}
<form class="status-like" action="/like/{{.ID}}" method="post">
<form class="status-like" data-action="like" action="/like/{{.ID}}" method="post">
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}" />
<input type="image" src="/static/icons/star-o.png" alt="like" class="icon" title="like">
</form>
{{end}}
<a class="status-action-count" href="/likedby/{{.ID}}" title="click to see the the list">
<span> {{DisplayInteractionCount .FavouritesCount}} </span>
<a class="status-like-count" href="/likedby/{{.ID}}" title="click to see the the list">
{{DisplayInteractionCount .FavouritesCount}}
</a>
</div>
<div class="status-action">