Timeline-style design for a topic's posts (#512)
* feat: basic timeline-style styling for posts in a topic * fix: mobile-style for timeline-style styling * feat: slight white opaque ring around timeline items removed glowing OP ring * fix: playing nice with core's necro-post styling * fix: increase padding between posts by 20px * fix: restrict timeline styling to top-level only * fix: added back padding between posts on mobile * refactor: genericise necro-post into timeline-event class, fixed vertical alignment issues with timeline-badge icons * fix: use hourglass-half icon instead of clock-o * fix: adjust centering of text, dashed border on necro-post * feat: add topic event template * feat: add a little marker at the last post to signify end of timeline * fix: updated dashed border on necro-post * refactor: updated mobile styling of timeline effect * feat: styling changes for user obj in timeline events * feat: proper handling for no uid * fix: override generics introduced by coremain
parent
9645fa3206
commit
538b84086b
@ -1,4 +1,9 @@
|
||||
.topic .necro-post {
|
||||
border-bottom: 1px solid @post-border-color;
|
||||
padding-bottom: @post-padding;
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
font-size: 1.5em;
|
||||
|
||||
.timeline-text {
|
||||
margin-left: 32px;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<li component="topic/event" class="timeline-event" data-topic-event-id="{id}">
|
||||
<div class="timeline-badge">
|
||||
<i class="fa {{{ if icon }}}{icon}{{{ else }}}fa-circle{{{ end }}}"></i>
|
||||
</div>
|
||||
<span class="timeline-text">{text} </span>
|
||||
|
||||
{{{ if user }}}
|
||||
{{{ if !./user.system }}}<span><a href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(user, "xs", true)} {./user.username}</a></span> {{{ end }}}
|
||||
{{{ if ./user.system }}}<span class="timeline-text">[[global:system-user]]</span> {{{ end }}}
|
||||
{{{ else }}}
|
||||
<span class="timeline-text">[[global:unknown-user]]</span>
|
||||
{{{ end }}}
|
||||
|
||||
<span class="timeago timeline-text" title="{timestampISO}"></span>
|
||||
</li>
|
@ -1,3 +1,3 @@
|
||||
<li component="topic/necro-post" class="necro-post">
|
||||
<span>{text}</span>
|
||||
<li component="topic/necro-post" class="necro-post timeline-event">
|
||||
<span class="timeline-text">{text}</span>
|
||||
</li>
|
Loading…
Reference in New Issue