mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-23 07:15:37 +00:00
Thread lines cleanup
This commit is contained in:
parent
0155607ed3
commit
684489ee21
|
@ -29,7 +29,7 @@ is on implementing missing features.
|
||||||
- Twitter "Cards" (link previews)
|
- Twitter "Cards" (link previews)
|
||||||
- Nitter link previews
|
- Nitter link previews
|
||||||
- Search (+ hashtag search)
|
- Search (+ hashtag search)
|
||||||
- Emoji support
|
- Emoji support (WIP, needs font)
|
||||||
- Twitter polls
|
- Twitter polls
|
||||||
- Server configuration
|
- Server configuration
|
||||||
- Simple account system with feed (excludes retweets)
|
- Simple account system with feed (excludes retweets)
|
||||||
|
|
|
@ -117,9 +117,10 @@
|
||||||
</div>
|
</div>
|
||||||
#end proc
|
#end proc
|
||||||
#
|
#
|
||||||
#proc renderTweet*(tweet: Tweet; class=""): string =
|
#proc renderTweet*(tweet: Tweet; class=""; last=false): string =
|
||||||
#if class.len > 0:
|
#var divClass = if last: "thread-last " & class else: class
|
||||||
<div class="${class}">
|
#if divClass.len > 0:
|
||||||
|
<div class="${divClass}">
|
||||||
#end if
|
#end if
|
||||||
<div class="status-el">
|
<div class="status-el">
|
||||||
<div class="status-body">
|
<div class="status-body">
|
||||||
|
@ -139,7 +140,7 @@
|
||||||
${renderStats(tweet)}
|
${renderStats(tweet)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#if class.len > 0:
|
#if divClass.len > 0:
|
||||||
</div>
|
</div>
|
||||||
#end if
|
#end if
|
||||||
#end proc
|
#end proc
|
||||||
|
|
|
@ -113,15 +113,14 @@
|
||||||
#end for
|
#end for
|
||||||
</div>
|
</div>
|
||||||
#end if
|
#end if
|
||||||
#let afterClass = if conversation.after.len > 0: "thread" else: ""
|
|
||||||
<div class="main-tweet">
|
<div class="main-tweet">
|
||||||
|
#let afterClass = if conversation.after.len > 0: "thread" else: ""
|
||||||
${renderTweet(conversation.tweet, class=afterClass)}
|
${renderTweet(conversation.tweet, class=afterClass)}
|
||||||
</div>
|
</div>
|
||||||
#if conversation.after.len > 0:
|
#if conversation.after.len > 0:
|
||||||
<div class="after-tweet">
|
<div class="after-tweet">
|
||||||
#for i, tweet in conversation.after:
|
#for i, tweet in conversation.after:
|
||||||
#let class = if i == conversation.after.high: "thread-last" else: ""
|
${renderTweet(tweet, last=(i == conversation.after.high))}
|
||||||
${renderTweet(tweet, class=class)}
|
|
||||||
#end for
|
#end for
|
||||||
</div>
|
</div>
|
||||||
#end if
|
#end if
|
||||||
|
@ -131,8 +130,7 @@
|
||||||
#for thread in conversation.replies:
|
#for thread in conversation.replies:
|
||||||
<div class="reply thread">
|
<div class="reply thread">
|
||||||
#for i, tweet in thread:
|
#for i, tweet in thread:
|
||||||
#let class = if i == thread.high: "thread-last" else: ""
|
${renderTweet(tweet, last=(i == thread.high))}
|
||||||
${renderTweet(tweet, class=class)}
|
|
||||||
#end for
|
#end for
|
||||||
</div>
|
</div>
|
||||||
#end for
|
#end for
|
||||||
|
|
Loading…
Reference in a new issue