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 --- org/out_harvest_metadata.org | 96 +++++++++++++++++++++++++++++++++++++++++++- org/out_metadata.org | 85 +++++++++++++++++++++++++++++++++++++-- org/out_xmls.org | 27 ++++++------- org/out_xmls_css.org | 8 ++++ 4 files changed, 195 insertions(+), 21 deletions(-) (limited to 'org') diff --git a/org/out_harvest_metadata.org b/org/out_harvest_metadata.org index bcd4472..b9d7296 100644 --- a/org/out_harvest_metadata.org +++ b/org/out_harvest_metadata.org @@ -136,6 +136,7 @@ template spineMetaDocHarvestsTopics() { M _make_and_meta_struct, O _opt_action, ) { + <> <> <> <> @@ -220,7 +221,14 @@ foreach(k, doc_harvest; hvst.harvests) {

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

-

[ HOME ] [ Metadata Harvest - Authors ]

+

ABCDEFGHIJKLMNOPQRSTUVWXYZ


@@ -233,6 +241,7 @@ foreach(k, doc_harvest; hvst.harvests) { ┃", _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"; #+END_SRC @@ -467,6 +476,7 @@ template spineMetaDocHarvestsAuthors() { M _make_and_meta_struct, O _opt_action, ) { + <> <> <> <> @@ -502,7 +512,14 @@ template spineMetaDocHarvestsAuthors() {

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

-

[ HOME ] [ Metadata Harvest - Topics ]

+


ABCDEFGHIJKLMNOPQRSTUVWXYZ,  @@ -515,6 +532,7 @@ template spineMetaDocHarvestsAuthors() { ┃", _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; @@ -646,6 +664,10 @@ string theme_dark_0 = format(q"┃ color : #FFFFFF; background : #777777; } + input { + color : #FFFFFF; + background-color : #777777; + } ┃"); string theme_light_0 = format(q"┃ body { @@ -686,6 +708,10 @@ string theme_light_0 = format(q"┃ a.lev3:hover { background : #BBBBBB; } + input { + color : #000000; + background-color : #FFFFFF; + } ┃"); #+END_SRC @@ -753,6 +779,43 @@ string theme_light_1 = format(q"┃ ┃"); #+END_SRC +*** search form + +#+NAME: harvested_html_search +#+BEGIN_SRC d +@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; +} +#+END_SRC + *** harvested html head #+NAME: harvested_html_head @@ -852,6 +915,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; + } #+END_SRC diff --git a/org/out_metadata.org b/org/out_metadata.org index f7f8700..13d6708 100644 --- a/org/out_metadata.org +++ b/org/out_metadata.org @@ -22,6 +22,7 @@ module doc_reform.io_out.metadata; template outputMetadata() { @safe void outputMetadata(T)( T doc_matters) { + <> <> <> <> @@ -77,17 +78,17 @@ metadata_ ~= 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) { @@ -258,7 +259,7 @@ metadata_write_output(doc_matters, metadata_); **** head #+NAME: harvested_html_themes -#+BEGIN_SRC d +#+BEGIN_SRC css string theme_dark_0 = format(q"┃ body { color : #CCCCCC; @@ -284,6 +285,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 { @@ -310,13 +315,17 @@ string theme_light_0 = format(q"┃ color : #003399; text-decoration : underline; } + input { + color : #000000; + background-color : #FFFFFF; + } ┃"); #+END_SRC **** levels #+NAME: harvested_html_themes -#+BEGIN_SRC d +#+BEGIN_SRC css string theme_dark_1 = format(q"┃ h1 { color : #FFFFFF; @@ -454,6 +463,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; + } #+END_SRC @@ -484,3 +522,42 @@ string theme_light_1 = format(q"┃ doc_matters.opt.action.css_theme_default ? theme_light_1 : theme_dark_1, ) ~ "\n"; #+END_SRC + +*** search form + +#+NAME: harvested_html_search +#+BEGIN_SRC d +@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; +} +#+END_SRC diff --git a/org/out_xmls.org b/org/out_xmls.org index 0211cd5..db1b2a0 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -200,7 +200,7 @@ import ┃", - 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, @@ -261,7 +261,6 @@ import o = format(q"┃
-
┃", @@ -816,10 +814,9 @@ import prev, next, ); - string _pre_next = format(q"┃ + string _pre_next = format(q"┃ ┃", diff --git a/org/out_xmls_css.org b/org/out_xmls_css.org index 443f788..7e5ed46 100644 --- a/org/out_xmls_css.org +++ b/org/out_xmls_css.org @@ -157,6 +157,10 @@ template spineCss() { color : #003399; text-decoration : underline; } + input { + color : #000000; + background-color : #FFFFFF; + } #+END_SRC **** div @@ -1073,6 +1077,10 @@ Consider what if anything should be used here color : #888888; text-decoration : underline; } + input { + color : #FFFFFF; + background-color : #777777; + } #+END_SRC **** div -- cgit v1.2.3