From 03fb7fe165e8416d5e056f842068427648ac2674 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 13 Nov 2024 18:20:27 -0400 Subject: [PATCH] Basic HTML layout improvements Signed-off-by: Juan Cruz Viotti --- src/enterprise/enterprise_explorer.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/enterprise/enterprise_explorer.h b/src/enterprise/enterprise_explorer.h index cf6247c..076c3a8 100644 --- a/src/enterprise/enterprise_explorer.h +++ b/src/enterprise/enterprise_explorer.h @@ -45,12 +45,26 @@ explorer_start(const sourcemeta::hydra::http::ServerRequest &request, html << ""; html << ""; + + html << ""; + + html << "
"; return html; } static auto explorer_end(std::ostringstream &html, sourcemeta::hydra::http::ServerResponse &response, const sourcemeta::hydra::http::Status code) -> void { + html << "
"; html << ""; html << ""; @@ -126,10 +140,8 @@ auto explore_index(const std::string &title, const std::string &description, sourcemeta::hydra::http::ServerResponse &response) -> void { std::ostringstream html{ explorer_start(request, server_base_url, title, description)}; - html << "
"; file_manager(html, sourcemeta::registry::path_join(schema_base_directory, request.path())); - html << "
"; explorer_end(html, response, sourcemeta::hydra::http::Status::OK); } @@ -140,9 +152,7 @@ auto explore_not_found(const std::string &server_base_url, std::ostringstream html{ explorer_start(request, server_base_url, "Not Found", "What you are looking for is not here")}; - html << "
"; html << "Not Found"; - html << "
"; explorer_end(html, response, sourcemeta::hydra::http::Status::NOT_FOUND); }