From b76128f82b8d33c5efad13a46502ee5f341184c9 Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 25 Nov 2023 01:51:42 +1100 Subject: [PATCH] Hide "About" section for instances that don't have it filled out https://twipped.social/about --- routes/about.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/about.cpp b/routes/about.cpp index 354281b..013ed2c 100644 --- a/routes/about.cpp +++ b/routes/about.cpp @@ -37,10 +37,10 @@ void about_route(const httplib::Request& req, httplib::Response& res) { }), }), - Element("details", {{"class", "about_page-about"}, {"open", ""}}, { + !extended_description.str.empty() ? Element("details", {{"class", "about_page-about"}, {"open", ""}}, { Element("summary", {"About"}), preprocess_html(req, server, {}, std::move(extended_description)), - }), + }) : Node(""), Element("details", {{"class", "about_page-rules"}}, { Element("summary", {"Rules"}),