From 61180130e90b43f057369878d2d53605f41f8374 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 26 Jun 2023 16:30:25 -0400 Subject: html links and metadata, fixes & cosmetic work --- src/doc_reform/io_out/metadata.d | 52 ++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 18 deletions(-) (limited to 'src/doc_reform/io_out/metadata.d') diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index 2686d15..e5e1c02 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -338,8 +338,14 @@ string theme_light_1 = format(q"┃ } } if (!exists(pth_html.base ~ "/index.html")) { + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; auto f = File(pth_html.base ~"/index.html", "w"); - f.writeln(""); + f.writeln(format_html_blank_page_guide_home( + "../../css/html_scroll.css", + "https://sisudoc.org", + "../../index.html", + )); } } catch (ErrnoException ex) { // Handle error @@ -349,13 +355,15 @@ string theme_light_1 = format(q"┃ } } static auto mkup = InlineMarkup(); + import doc_reform.io_out.html_snippet; + mixin htmlSnippet; if (doc_matters.opt.action.debug_do) { writeln(doc_matters.src.filename_base); writeln("Title: ", doc_matters.conf_make_meta.meta.title_full); writeln(" Author: ", doc_matters.conf_make_meta.meta.creator_author); writeln(" Published: ", doc_matters.conf_make_meta.meta.date_published); writeln(" Copyright: ", doc_matters.conf_make_meta.meta.rights_copyright); - writeln(" License: ", doc_matters.conf_make_meta.meta.rights_license); + writeln(" License: ", special_characters_text(doc_matters.conf_make_meta.meta.rights_license)); if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { foreach (topic; doc_matters.conf_make_meta.meta.classify_topic_register_arr.sort!("toUpper(a) < toUpper(b)", SwapStrategy.unstable)) { string[] subject_tree = topic.split(mkup.sep); @@ -410,44 +418,52 @@ string theme_light_1 = format(q"┃ } metadata_ ~= "

Published: " ~ doc_matters.conf_make_meta.meta.date_published ~ "

"; if (!(doc_matters.conf_make_meta.meta.rights_copyright.empty)) { - metadata_ ~= "

Copyright: " ~ doc_matters.conf_make_meta.meta.rights_copyright ~ "

"; + metadata_ ~= "

Copyright: " ~ special_characters_text(doc_matters.conf_make_meta.meta.rights_copyright) ~ "

"; } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("WARNING no Copyright information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.rights_license.empty)) { - metadata_ ~= "

License: " ~ doc_matters.conf_make_meta.meta.rights_license ~ "

"; + metadata_ ~= "

License: " ~ special_characters_text(doc_matters.conf_make_meta.meta.rights_license) ~ "

"; } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.vox_gt2) { writeln("WARNING no License information provided in document header ", doc_matters.src.filename_base); } if (!(doc_matters.conf_make_meta.meta.notes_summary.empty)) { - metadata_ ~= "

Summary:

" ~ doc_matters.conf_make_meta.meta.notes_summary ~ "

"; + metadata_ ~= "

Summary:

" ~ special_characters_text(doc_matters.conf_make_meta.meta.notes_summary) ~ "

"; } else if (doc_matters.opt.action.debug_do) { writeln("WARNING no summary of text provided in document header ", doc_matters.src.filename_base); } metadata_ ~= "

source: " ~ doc_matters.src.filename_base ~ "

"; if (doc_matters.opt.action.html_link_markup_source) { - metadata_ ~= "

● markup source: [" - ~ " zipped pod ] " - ~ "[" - ~ " pod tree ]"; + metadata_ ~= "

●  markup source:  the pod [" + ~ " 🫛 zipped | " + ~ "" + ~ " 🫛 tree ] "; } - metadata_ ~= "

● outputs: [" - ~ " ▤ html scroll ] " - ~ "[" - ~ " ※ html seg ]" + metadata_ ~= "

●  outputs:  [ html: " + ~ " ▤ scroll  " + ~ "|" + ~ " ※ seg ]   " ~ "[" - ~ " ◆ epub ]"; + ~ " ◆ epub ]   "; if ((doc_matters.opt.action.html_link_pdf) || (doc_matters.opt.action.html_link_pdf_a4)) { + metadata_ ~= "[ pdf: " + ~ " □ a4  " + ~ "|" + ~ " □ U.S. letter ] "; + } else if (doc_matters.opt.action.html_link_pdf_a4) { metadata_ ~= "[" - ~ " □ pdf (a4) ]"; - } - if ((doc_matters.opt.action.html_link_pdf) || (doc_matters.opt.action.html_link_pdf_letter)) { + ~ " □ pdf (a4) ] "; + } else if (doc_matters.opt.action.html_link_pdf_letter) { metadata_ ~= "[" - ~ " □ pdf (U.S. letter) ]"; + ~ " □ pdf (U.S. letter) ] "; } metadata_ ~= "

"; if (doc_matters.conf_make_meta.meta.classify_topic_register_arr.length > 0) { -- cgit v1.2.3