aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-12 17:16:57 +0000
committerr <r@freesoftwareextremist.com>2020-01-12 17:16:57 +0000
commit3c6653a77b8951672ea169d175db154495a981fe (patch)
tree54f27eba5c3dbedcbca5744764eb0d1c1e36ac1b /templates
parent8607f16212c9537751030c717dbfb3454e66ca23 (diff)
downloadbloat-3c6653a77b8951672ea169d175db154495a981fe.tar.gz
bloat-3c6653a77b8951672ea169d175db154495a981fe.zip
Add dark mode
Diffstat (limited to 'templates')
-rw-r--r--templates/header.tmpl2
-rw-r--r--templates/notification.tmpl6
-rw-r--r--templates/postform.tmpl2
-rw-r--r--templates/settings.tmpl4
-rw-r--r--templates/status.tmpl26
-rw-r--r--templates/user.tmpl2
6 files changed, 23 insertions, 19 deletions
diff --git a/templates/header.tmpl b/templates/header.tmpl
index d511590..10afe8a 100644
--- a/templates/header.tmpl
+++ b/templates/header.tmpl
@@ -12,4 +12,4 @@
<script src="/static/fluoride.js"></script>
{{end}}
</head>
-<body>
+<body {{if .DarkMode}}class="dark"{{end}}>
diff --git a/templates/notification.tmpl b/templates/notification.tmpl
index d68382f..79d6d90 100644
--- a/templates/notification.tmpl
+++ b/templates/notification.tmpl
@@ -14,7 +14,7 @@
<div>
<div class="notification-info-text">
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
- <img class="icon" src="/static/icons/user-plus.png" alt="followed" />
+ <img class="icon" src="{{GetIcon "user-plus" .DarkMode}}" alt="followed" />
<span> followed you </span>
</div>
<div class="notification-follow-uname">
@@ -36,7 +36,7 @@
<div>
<div class="notification-info-text">
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
- <img class="icon" src="/static/icons/retweeted.png" alt="retweeted" />
+ <img class="icon" src="{{GetIcon "retweeted" .DarkMode}}" alt="retweeted" />
<span> retweeted your post </span>
</div>
{{template "status" .Status}}
@@ -53,7 +53,7 @@
<div>
<div class="notification-info-text">
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
- <img class="icon" src="/static/icons/liked.png" alt="liked" />
+ <img class="icon" src="{{GetIcon "liked" .DarkMode}}" alt="liked" />
<span> liked your post </span>
</div>
{{template "status" .Status}}
diff --git a/templates/postform.tmpl b/templates/postform.tmpl
index 4e2d4a4..ff70eaf 100644
--- a/templates/postform.tmpl
+++ b/templates/postform.tmpl
@@ -6,7 +6,7 @@
<label for="post-content" class="post-form-title"> New post </label>
{{end}}
<a class="post-form-emoji-link" href="/emojis" target="_blank" title="emoji reference">
- <img class="icon post-emoji" src="/static/icons/smile-o.png" alt="emojis" />
+ <img class="icon post-emoji" src="{{GetIcon "smile-o" .DarkMode}}" alt="emojis" />
</a>
<div class="post-form-content-container">
<textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{if .ReplyContext}}{{.ReplyContext.ReplyContent}}{{end}}</textarea>
diff --git a/templates/settings.tmpl b/templates/settings.tmpl
index d15c47b..06e2a9a 100644
--- a/templates/settings.tmpl
+++ b/templates/settings.tmpl
@@ -28,6 +28,10 @@
<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>
+ <div class="settings-form-field">
+ <input id="dark-mode" name="dark_mode" type="checkbox" value="true" {{if .Settings.DarkMode}}checked{{end}}>
+ <label for="dark-mode"> Use dark theme </label>
+ </div>
<button type="submit"> Save </button>
</form>
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 9c9d55d..91d666d 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -5,7 +5,7 @@
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
</a>
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
- <img class="icon" src="/static/icons/retweeted.png" alt="retweeted" />
+ <img class="icon" src="{{GetIcon "retweeted" .DarkMode}}" alt="retweeted" />
retweeted
</div>
{{template "status" .Reblog}}
@@ -28,17 +28,17 @@
</a>
<a class="status-visibility">
{{if eq .Visibility "public"}}
- <img class="icon" src="/static/icons/globe.png" alt="Public" title="Public" />
+ <img class="icon" src="{{GetIcon "globe" .DarkMode}}" alt="Public" title="Public" />
{{else if eq .Visibility "unlisted"}}
- <img class="icon" src="/static/icons/unlock-alt.png" alt="Unlisted" title="Unlisted" />
+ <img class="icon" src="{{GetIcon "unlock-alt" .DarkMode}}" alt="Unlisted" title="Unlisted" />
{{else if eq .Visibility "private"}}
- <img class="icon" src="/static/icons/lock.png" alt="Private" title="Private" />
+ <img class="icon" src="{{GetIcon "lock" .DarkMode}}" alt="Private" title="Private" />
{{else if eq .Visibility "direct"}}
- <img class="icon" src="/static/icons/envelope.png" alt="Direct" title="Direct" />
+ <img class="icon" src="{{GetIcon "envelope" .DarkMode}}" alt="Direct" title="Direct" />
{{end}}
</a>
<a class="remote-link" href="{{.URL}}" target="_blank" title="source">
- <img class="icon" src="/static/icons/link.png" alt="source" />
+ <img class="icon" src="{{GetIcon "link" .DarkMode}}" alt="source" />
</a>
</div>
{{end}}
@@ -46,7 +46,7 @@
{{if .InReplyToID}}
<div class="status-reply-to">
<a class="status-reply-to-link" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}">
- <img class="icon" src="/static/icons/mail-forward.png" alt="reply to" /> reply to {{.Pleroma.InReplyToAccountAcct}}
+ <img class="icon" src="{{GetIcon "mail-forward" .DarkMode}}" alt="reply to" /> reply to {{.Pleroma.InReplyToAccountAcct}}
</a>
</div>
{{if index .ReplyMap .ID}} <span class="status-reply-info-divider"> - </span> {{end}}
@@ -93,7 +93,7 @@
<div class="status-action-container">
<div class="status-action">
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
- <img class="icon" src="/static/icons/reply.png" alt="reply" />
+ <img class="icon" src="{{GetIcon "reply" .DarkMode}}" alt="reply" />
</a>
<a class="status-reply-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if .ThreadInNewTab}}target="_blank"{{end}}>
{{DisplayInteractionCount .RepliesCount}}
@@ -102,18 +102,18 @@
<div class="status-action">
{{if or (eq .Visibility "private") (eq .Visibility "direct")}}
<a class="status-retweet" title="this status cannot be retweeted">
- <img class="icon" src="/static/icons/retweet.png" alt="retweet" />
+ <img class="icon" src="{{GetIcon "retweet" .DarkMode}}" alt="retweet" />
</a>
{{else}}
{{if .Reblogged}}
<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">
+ <input type="image" src="{{GetIcon "retweeted" .DarkMode}}" alt="undo retweet" class="icon" title="undo retweet">
</form>
{{else}}
<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">
+ <input type="image" src="{{GetIcon "retweet" .DarkMode}}" alt="retweet" class="icon" title="retweet">
</form>
{{end}}
{{end}}
@@ -125,12 +125,12 @@
{{if .Favourited}}
<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">
+ <input type="image" src="{{GetIcon "liked" .DarkMode}}" alt="unlike" class="icon" title="unlike">
</form>
{{else}}
<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">
+ <input type="image" src="{{GetIcon "star-o" .DarkMode}}" alt="like" class="icon" title="like">
</form>
{{end}}
<a class="status-like-count" href="/likedby/{{.ID}}" title="click to see the the list">
diff --git a/templates/user.tmpl b/templates/user.tmpl
index 53de635..60536bb 100644
--- a/templates/user.tmpl
+++ b/templates/user.tmpl
@@ -14,7 +14,7 @@
<span class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </span>
<span class="status-uname"> {{.User.Acct}} </span>
<a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile">
- <img class="icon" src="/static/icons/link.png" alt="link" />
+ <img class="icon" src="{{GetIcon "link" .DarkMode}}" alt="link" />
</a>
</div>
<div>