Make DM message 'show more' button use same styling as timeline one

This commit is contained in:
Alessio 2024-05-04 15:51:36 -07:00
parent af3e496468
commit d907a6c500
3 changed files with 14 additions and 17 deletions

View File

@ -890,18 +890,16 @@ main {
******************************************************/
/**
* Timeline module
* Show more button and EOF indicator module
*/
.timeline {
.timeline__bottom {
text-align: center;
font-size: 1.2em;
padding: 1em 0;
}
.timeline__eof-label {
.show-more {
text-align: center;
font-size: 1.2em;
padding: 1em 0;
.show-more__eof-label {
color: var(--color-twitter-text-gray);
}
.timeline__show-more-button {
.show-more__button {
padding: 0em 0.8em;
display: inline-block;
border: 2px solid var(--color-twitter-blue);

View File

@ -193,12 +193,11 @@
{{end}}
{{define "conversation-top"}}
<div class="conversation-top">
<div class="show-more conversation-top">
{{if .Cursor.CursorPosition.IsEnd}}
<!-- TODO: make a reusable eof-indicator -->
<div class="eof-indicator">Beginning of conversation</div>
<label class="show-more__eof-label">Beginning of conversation</label>
{{else}}
<a class="show-more-button button"
<a class="show-more__button button"
hx-get="?cursor={{.Cursor.CursorValue}}" {{/* TODO: this might require a `cursor_to_query_params` if the same view is used for searching */}}
hx-target=".conversation-top"
hx-swap="outerHTML"

View File

@ -3,13 +3,13 @@
{{template "tweet" .}}
{{end}}
<div class="timeline__bottom">
<div class="show-more">
{{if .CursorBottom.CursorPosition.IsEnd}}
<label class="timeline__eof-label">End of feed</label>
<label class="show-more__eof-label">End of feed</label>
{{else}}
<a class="timeline__show-more-button button"
<a class="show-more__button button"
hx-get="?{{(cursor_to_query_params .CursorBottom)}}"
hx-target=".timeline__bottom"
hx-target=".show-more"
hx-swap="outerHTML"
>Show more</a>
{{end}}