Fix missing navigation bar on timelines

FossilOrigin-Name: 1668f4d49f7f4cc7ed113317dea99ec4558b01a5c7da038ac3a187c2032f60d7
This commit is contained in:
nekobit 2022-06-18 04:33:05 +00:00
parent a74c7d626b
commit dce2c390b5
3 changed files with 23 additions and 14 deletions

12
dist/treebird20.css vendored
View file

@ -1415,7 +1415,7 @@ p}
.simple-page h1
{
padding-left: 12px;
padding-bottom: 6px;
padding-bottom: 7px;
border-bottom: 1px solid #cacaca;
}
@ -1430,6 +1430,16 @@ p}
padding-left: 15px;
}
.simple-page-header
{
padding: 0;
}
.simple-page-header h1
{
margin-bottom: 0;
}
.simple-page p
{
margin: 14px;

View file

@ -62,17 +62,16 @@ void content_timeline(struct session* ssn,
// Create post box
if (show_post_box)
{
post_box = construct_post_box(NULL, "", NULL);
if (statuses)
{
// If not set, set it
start_id = keystr(ssn->post.start_id) ? keystr(ssn->post.start_id) : statuses[0].id;
navigation_box = construct_navigation_box(start_id,
statuses[0].id,
statuses[statuses_len-1].id,
NULL);
}
if (statuses)
{
// If not set, set it
start_id = keystr(ssn->post.start_id) ? keystr(ssn->post.start_id) : statuses[0].id;
navigation_box = construct_navigation_box(start_id,
statuses[0].id,
statuses[statuses_len-1].id,
NULL);
}
// Create timeline options/menubar
@ -87,7 +86,7 @@ void content_timeline(struct session* ssn,
// Display a header bar, usually customized for specific pages
if (header_text)
{
easprintf(&header, "<div class=\"simple-page\"><h1>%s</h1></div>",
easprintf(&header, "<div class=\"simple-page simple-page-header\"><h1>%s</h1></div>",
header_text);
}
@ -166,7 +165,7 @@ void tl_direct(struct session* ssn, mastodont_t* api)
mastodont_timeline_direct(api, &args, &storage, &statuses, &statuses_len);
content_timeline(ssn, api, &storage, statuses, statuses_len, BASE_CAT_DIRECT, NULL, 0);
content_timeline(ssn, api, &storage, statuses, statuses_len, BASE_CAT_DIRECT, "Direct", 0);
}
void tl_public(struct session* ssn, mastodont_t* api, int local, enum base_category cat)

View file

@ -1,7 +1,7 @@
<table class="tabs ui-table">
<tr>
<td>
<label
<label TODO
<a href="{{%s:prefix}}/search/statuses?q={{%s:query}}"><input class="tab-btn btn {{%s:statuses_active}}" type="button" value="{{%s:statuses}}"></a>
</td>
<td>