Fix inconsistent display of timeline warnings

This commit is contained in:
Zed 2019-06-29 00:41:09 +02:00
parent 6150f52342
commit ee1d6f7cf0
2 changed files with 17 additions and 21 deletions

View File

@ -57,10 +57,6 @@ a:hover {
display: flex; display: flex;
} }
.timeline-tweet {
border-bottom: 1px solid #3e3e35;
}
.status-body { .status-body {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
@ -592,14 +588,18 @@ nav {
font-weight: bold; font-weight: bold;
} }
.timeline-protected { .timeline-tweet {
border-bottom: 1px solid #3e3e35;
}
.timeline-footer, .timeline-header {
max-width: 550px; max-width: 550px;
margin: 0 auto; margin: 0 auto;
padding: 6px 0px; padding: 6px 0px;
} }
.timeline-protected-header { .timeline-none, .timeline-protected {
color: #d0564c; color: #ff6c60;
font-size: 21px; font-size: 21px;
font-weight: 600; font-weight: 600;
} }

View File

@ -53,13 +53,6 @@
#proc renderTimeline*(timeline: Timeline; profile: Profile; beginning: bool): string = #proc renderTimeline*(timeline: Timeline; profile: Profile; beginning: bool): string =
#var retweets: Tweets #var retweets: Tweets
<div id="tweets"> <div id="tweets">
#if profile.protected:
<div class="timeline-protected">
<h2 class="timeline-protected-header">This account's Tweets are protected.</h2>
<p class="timeline-protected-explanation">Only confirmed followers have access to @${profile.username}'s Tweets.</p>
</div>
#end if
#
#if not beginning: #if not beginning:
<div class="show-more status-el"> <div class="show-more status-el">
<a href="/${profile.username}">Load newest tweets</a> <a href="/${profile.username}">Load newest tweets</a>
@ -77,15 +70,18 @@
<div class="show-more"> <div class="show-more">
<a href="/${profile.username}?after=${timeline.minId}">Load older tweets</a> <a href="/${profile.username}?after=${timeline.minId}">Load older tweets</a>
</div> </div>
#else: #elif timeline.tweets.len > 0:
<div class="timeline-protected"> <div class="timeline-footer">
<h2 class="timeline-end" style="text-align: center;">No more tweets.</h2> <h2 class="timeline-end" style="text-align: center;">No more tweets.</h2>
</div> </div>
#else:
<div class="timeline-header">
#if profile.protected:
<h2 class="timeline-protected">This account's tweets are protected.</h2>
<p>Only confirmed followers have access to @${profile.username}'s tweets.</p>
#else:
<h2 class="timeline-none" style="text-align: center;">No tweets found.</h2>
#end if #end if
#
#if timeline.tweets.len == 0:
<div class="timeline-protected">
<h2 class="timeline-protected-header" style="text-align: center;">No tweets found.</h2>
</div> </div>
#end if #end if
</div> </div>