From 681dd49c3e138942778266cc44210e47eea8b048 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 24 Apr 2020 13:59:28 -0400 Subject: html, harvests search form, minor misc - harvests add search form to db option - dark theme input background color (follows cgi search form) - html tidy html tidy --- src/doc_reform/io_out/metadata.d | 74 +++++++++++++++++++++++- src/doc_reform/io_out/xmls.d | 27 ++++----- src/doc_reform/io_out/xmls_css.d | 24 ++++++++ src/doc_reform/meta/metadoc_harvests_authors.d | 78 +++++++++++++++++++++++++- src/doc_reform/meta/metadoc_harvests_topics.d | 78 +++++++++++++++++++++++++- 5 files changed, 262 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/doc_reform/io_out/metadata.d b/src/doc_reform/io_out/metadata.d index 6c059ce..1d366b9 100644 --- a/src/doc_reform/io_out/metadata.d +++ b/src/doc_reform/io_out/metadata.d @@ -1,6 +1,39 @@ module doc_reform.io_out.metadata; template outputMetadata() { @safe void outputMetadata(T)( T doc_matters) { + @safe string inline_search_form(M)( + M doc_matters, + ) { + string o; + string _form; + if (doc_matters.opt.action.html_search_link) { + o = format(q"┃ +
+ + + +
┃", + doc_matters.conf_make_meta.conf.w_srv_cgi_action, + (doc_matters.conf_make_meta.conf.w_srv_db_sqlite.empty) + ? "" + : "\n ", + doc_matters.src.filename_base, + ); + } else { + o = ""; + } + return o; + } import std.file, std.format; @@ -32,6 +65,10 @@ string theme_dark_0 = format(q"┃ color : #888888; text-decoration : underline; } + input { + color : #FFFFFF; + background-color : #777777; + } ┃"); string theme_light_0 = format(q"┃ body { @@ -58,6 +95,10 @@ string theme_light_0 = format(q"┃ color : #003399; text-decoration : underline; } + input { + color : #000000; + background-color : #FFFFFF; + } ┃"); string theme_dark_1 = format(q"┃ h1 { @@ -179,6 +220,35 @@ string theme_light_1 = format(q"┃ font-size : 80%%; margin-left : 6em; }%s + /* flex */ + .flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 0%%; + margin-right : 2%%; + background-color : inherited; + } + .flex-menu-option { + background-color : inherited; + margin-right : 4px; + } + .flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : inherited; + } + .flex-list-item { + background-color : inherited; + margin : 4px; + } @@ -230,17 +300,17 @@ string theme_light_1 = format(q"┃ ┃"); + metadata_ ~= "
"; if (doc_matters.opt.action.html_harvest_link) { metadata_ ~= format(q"┃

[ HOME ] Metadata Harvest [ Authors ] [ Topics ]

-
┃"); } else { metadata_ ~= format(q"┃

[ HOME ] -


┃"); } + metadata_ ~= "
" ~ inline_search_form(doc_matters) ~ "

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

Title: " ~ doc_matters.conf_make_meta.meta.title_full ~ "

"; } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index ffcdcb6..b4c5e56 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -109,7 +109,7 @@ template outputXHTMLs() { ┃", - doc_matters.conf_make_meta.meta.title_full, + doc_matters.conf_make_meta.meta.title_full.replaceAll(regex("\""), """), doc_matters.conf_make_meta.meta.creator_author, _publisher, doc_matters.conf_make_meta.meta.date_published, @@ -158,7 +158,6 @@ template outputXHTMLs() { o = format(q"┃
-
┃", @@ -642,10 +640,9 @@ template outputXHTMLs() { prev, next, ); - string _pre_next = format(q"┃ + string _pre_next = format(q"┃ ┃", diff --git a/src/doc_reform/io_out/xmls_css.d b/src/doc_reform/io_out/xmls_css.d index 88af237..e882b4d 100644 --- a/src/doc_reform/io_out/xmls_css.d +++ b/src/doc_reform/io_out/xmls_css.d @@ -466,6 +466,10 @@ template spineCss() { color : #003399; text-decoration : underline; } + input { + color : #000000; + background-color : #FFFFFF; + } div { margin-left : 0; margin-right : 0; @@ -1176,6 +1180,10 @@ template spineCss() { color : #888888; text-decoration : underline; } + input { + color : #FFFFFF; + background-color : #777777; + } div { margin-left : 0; margin-right : 0; @@ -1885,6 +1893,10 @@ template spineCss() { color : #003399; text-decoration : underline; } + input { + color : #000000; + background-color : #FFFFFF; + } div { margin-left : 0; margin-right : 0; @@ -2521,6 +2533,10 @@ template spineCss() { color : #888888; text-decoration : underline; } + input { + color : #FFFFFF; + background-color : #777777; + } div { margin-left : 0; margin-right : 0; @@ -3156,6 +3172,10 @@ template spineCss() { color : #003399; text-decoration : underline; } + input { + color : #000000; + background-color : #FFFFFF; + } div { margin-left : 0; margin-right : 0; @@ -3682,6 +3702,10 @@ template spineCss() { color : #888888; text-decoration : underline; } + input { + color : #FFFFFF; + background-color : #777777; + } div { margin-left : 0; margin-right : 0; diff --git a/src/doc_reform/meta/metadoc_harvests_authors.d b/src/doc_reform/meta/metadoc_harvests_authors.d index 132c0af..5555f9d 100644 --- a/src/doc_reform/meta/metadoc_harvests_authors.d +++ b/src/doc_reform/meta/metadoc_harvests_authors.d @@ -19,6 +19,37 @@ template spineMetaDocHarvestsAuthors() { M _make_and_meta_struct, O _opt_action, ) { + @safe string inline_search_form(M)( + M _make_and_meta_truct, + ) { + string o; + string _form; + if (_opt_action.html_search_link) { + o = format(q"┃ +
+ + + + %s + + + + + + +
┃", + _make_and_meta_struct.conf.w_srv_cgi_action, + (_make_and_meta_struct.conf.w_srv_db_sqlite.empty) + ? "" + : "\n ", + ); + } else { + o = ""; + } + return o; + } string theme_dark_0 = format(q"┃ body { color : #CCCCCC; @@ -60,6 +91,10 @@ string theme_dark_0 = format(q"┃ color : #FFFFFF; background : #777777; } + input { + color : #FFFFFF; + background-color : #777777; + } ┃"); string theme_light_0 = format(q"┃ body { @@ -100,6 +135,10 @@ string theme_light_0 = format(q"┃ a.lev3:hover { background : #BBBBBB; } + input { + color : #000000; + background-color : #FFFFFF; + } ┃"); string theme_dark_1 = format(q"┃ h1 { @@ -261,6 +300,35 @@ string theme_light_1 = format(q"┃ font-size : 80%%; margin-left : 6em; }%s + /* flex */ + .flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 0%%; + margin-right : 2%%; + background-color : inherited; + } + .flex-menu-option { + background-color : inherited; + margin-right : 4px; + } + .flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : inherited; + } + .flex-list-item { + background-color : inherited; + margin : 4px; + } @@ -269,13 +337,21 @@ string theme_light_1 = format(q"┃

Metadata Harvest - Authors (output organised by language & filetype)

-

[ HOME ] [ Metadata Harvest - Topics ]

+


ABCDEFGHIJKLMNOPQRSTUVWXYZ,  ┃", _opt_action.css_theme_default ? theme_light_0 : theme_dark_0, _opt_action.css_theme_default ? theme_light_1 : theme_dark_1, + inline_search_form(_make_and_meta_struct), ) ~ "\n"; string[string] _au; string[] _auth_date_title; diff --git a/src/doc_reform/meta/metadoc_harvests_topics.d b/src/doc_reform/meta/metadoc_harvests_topics.d index aeb7cba..5332659 100644 --- a/src/doc_reform/meta/metadoc_harvests_topics.d +++ b/src/doc_reform/meta/metadoc_harvests_topics.d @@ -19,6 +19,37 @@ template spineMetaDocHarvestsTopics() { M _make_and_meta_struct, O _opt_action, ) { + @safe string inline_search_form(M)( + M _make_and_meta_truct, + ) { + string o; + string _form; + if (_opt_action.html_search_link) { + o = format(q"┃ +

+ + + +
┃", + _make_and_meta_struct.conf.w_srv_cgi_action, + (_make_and_meta_struct.conf.w_srv_db_sqlite.empty) + ? "" + : "\n ", + ); + } else { + o = ""; + } + return o; + } auto min_repeat_number = 42; string[] _document_topic_register; string[] _topic_register; @@ -103,6 +134,10 @@ string theme_dark_0 = format(q"┃ color : #FFFFFF; background : #777777; } + input { + color : #FFFFFF; + background-color : #777777; + } ┃"); string theme_light_0 = format(q"┃ body { @@ -143,6 +178,10 @@ string theme_light_0 = format(q"┃ a.lev3:hover { background : #BBBBBB; } + input { + color : #000000; + background-color : #FFFFFF; + } ┃"); string theme_dark_1 = format(q"┃ h1 { @@ -302,6 +341,35 @@ string theme_light_1 = format(q"┃ font-size : 80%%; margin-left : 6em; }%s + /* flex */ + .flex-menu-bar { + display : -webkit-flex; + display : flex; + -webkit-flex-wrap : wrap; + -webkit-align-items : center; + align-items : center; + width : 100%%; + margin-left : 0%%; + margin-right : 2%%; + background-color : inherited; + } + .flex-menu-option { + background-color : inherited; + margin-right : 4px; + } + .flex-list { + display : -webkit-flex; + display : flex; + -webkit-align-items : center; + display : block; + align-items : center; + width : 100%%; + background-color : inherited; + } + .flex-list-item { + background-color : inherited; + margin : 4px; + } @@ -310,13 +378,21 @@ string theme_light_1 = format(q"┃

Metadata Harvest - Topics (output organised by language & filetype)

-

[ HOME ] [ Metadata Harvest - Authors ]

+

ABCDEFGHIJKLMNOPQRSTUVWXYZ


┃", _opt_action.css_theme_default ? theme_light_0 : theme_dark_0, _opt_action.css_theme_default ? theme_light_1 : theme_dark_1, + inline_search_form(_make_and_meta_struct), ) ~ "\n"; char _prev_k = "_".to!char; int _kn; -- cgit v1.2.3