From dce2c390b5f42d2de9dbe3fe36137b124cd4e87f Mon Sep 17 00:00:00 2001 From: nekobit Date: Sat, 18 Jun 2022 04:33:05 +0000 Subject: [PATCH] Fix missing navigation bar on timelines FossilOrigin-Name: 1668f4d49f7f4cc7ed113317dea99ec4558b01a5c7da038ac3a187c2032f60d7 --- dist/treebird20.css | 12 +++++++++++- src/timeline.c | 23 +++++++++++------------ static/search_all.tmpl | 2 +- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/dist/treebird20.css b/dist/treebird20.css index 324d147..69bdff7 100644 --- a/dist/treebird20.css +++ b/dist/treebird20.css @@ -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; diff --git a/src/timeline.c b/src/timeline.c index 596009a..6591a57 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -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, "

%s

", + easprintf(&header, "

%s

", 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) diff --git a/static/search_all.tmpl b/static/search_all.tmpl index 8804b65..1ecc920 100644 --- a/static/search_all.tmpl +++ b/static/search_all.tmpl @@ -1,7 +1,7 @@
-