diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-04-24 13:59:28 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-05-20 11:27:26 -0400 |
commit | 681dd49c3e138942778266cc44210e47eea8b048 (patch) | |
tree | 14ba4e94ba6718d3c5a19daca652972706407aa0 /src/doc_reform/io_out/metadata.d | |
parent | backmatter, special sections, heading ocn fix (diff) |
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
Diffstat (limited to 'src/doc_reform/io_out/metadata.d')
-rw-r--r-- | src/doc_reform/io_out/metadata.d | 74 |
1 files changed, 72 insertions, 2 deletions
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"┃ + <div class="flex-menu-option"> + <!-- SiSU Spine Search --> + <form action="%s" target="_top" method="POST" accept-charset="UTF-8" id="search"> + <font size="2"> + <input type="text" name="sf" size="24" maxlength="255">%s + <input type="hidden" name="sml" value="1000"> + <input type="hidden" name="ec" value="on"> + <input type="hidden" name="url" value="on"> + <button type="submit" form="search" name="fn" value="%s">doc</button> + <button type="submit" form="search">db</button> + </font></form> + <!-- SiSU Spine Search --> + </div>┃", + doc_matters.conf_make_meta.conf.w_srv_cgi_action, + (doc_matters.conf_make_meta.conf.w_srv_db_sqlite.empty) + ? "" + : "\n <input type=\"hidden\" name=\"db\" value=\"" + ~ doc_matters.conf_make_meta.conf.w_srv_db_sqlite + ~ "\">", + 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; + } </style> <link rel="shortcut icon" href="../_sisu/image/rb7.ico" /> </head> @@ -230,17 +300,17 @@ string theme_light_1 = format(q"┃ <a name="up" id="up"></a> <a name="start" id="start"></a> ┃"); + metadata_ ~= "<div class=\"flex-menu-bar\"><div class=\"flex-menu-option\">"; if (doc_matters.opt.action.html_harvest_link) { metadata_ ~= format(q"┃<p>[<a href="../../index.html"> HOME </a>] Metadata Harvest [<a href="../../authors.html"> Authors </a>] [<a href="../../topics.html"> Topics </a>]</p> - <hr /> ┃"); } else { metadata_ ~= format(q"┃<p>[<a href="../../index.html"> HOME </a>] - <hr /> ┃"); } + metadata_ ~= "</div>" ~ inline_search_form(doc_matters) ~ "</div><hr />"; if (!(doc_matters.conf_make_meta.meta.title_full.empty)) { metadata_ ~= "<p class=\"lev0\">Title: <b><a href=\"" ~ doc_matters.src.filename_base ~ "/toc.html\">" ~ doc_matters.conf_make_meta.meta.title_full ~ "</a></b></p>"; } else if (doc_matters.opt.action.debug_do || doc_matters.opt.action.very_verbose) { |