mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-23 04:15:38 +00:00
Implemented square profile pictures
- Added preference "Square profile pictures"
This commit is contained in:
parent
111927a21c
commit
bc337027ca
|
@ -75,6 +75,9 @@ genPrefs:
|
||||||
hideReplies(checkbox, false):
|
hideReplies(checkbox, false):
|
||||||
"Hide tweet replies"
|
"Hide tweet replies"
|
||||||
|
|
||||||
|
squareProfileImages(checkbox, false):
|
||||||
|
"Square profile pictures"
|
||||||
|
|
||||||
Media:
|
Media:
|
||||||
mp4Playback(checkbox, true):
|
mp4Playback(checkbox, true):
|
||||||
"Enable mp4 video playback (only for gifs)"
|
"Enable mp4 video playback (only for gifs)"
|
||||||
|
@ -108,6 +111,7 @@ genPrefs:
|
||||||
"Instagram -> Bibliogram"
|
"Instagram -> Bibliogram"
|
||||||
placeholder: "Bibliogram hostname"
|
placeholder: "Bibliogram hostname"
|
||||||
|
|
||||||
|
|
||||||
iterator allPrefs*(): Pref =
|
iterator allPrefs*(): Pref =
|
||||||
for k, v in prefList:
|
for k, v in prefList:
|
||||||
for pref in v:
|
for pref in v:
|
||||||
|
|
|
@ -97,7 +97,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar-round {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,12 @@ proc renderHeader(tweet: Tweet; retweet: string; prefs: Prefs): VNode =
|
||||||
var size = "_bigger"
|
var size = "_bigger"
|
||||||
if not prefs.autoplayGifs and tweet.profile.userPic.endsWith("gif"):
|
if not prefs.autoplayGifs and tweet.profile.userPic.endsWith("gif"):
|
||||||
size = "_400x400"
|
size = "_400x400"
|
||||||
genImg(tweet.profile.getUserPic(size), class="avatar")
|
|
||||||
|
let avatarClass =
|
||||||
|
if prefs.squareProfileImages: "avatar"
|
||||||
|
else: "avatar avatar-round"
|
||||||
|
|
||||||
|
genImg(tweet.profile.getUserPic(size), class=avatarClass)
|
||||||
|
|
||||||
tdiv(class="tweet-name-row"):
|
tdiv(class="tweet-name-row"):
|
||||||
tdiv(class="fullname-and-username"):
|
tdiv(class="fullname-and-username"):
|
||||||
|
|
Loading…
Reference in a new issue