From 29af0a143fd2304ab8fa228ac6487c314db80072 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 21 Apr 2020 21:06:01 -0400 Subject: cgi output, adjust appearance --- src/doc_reform/io_out/cgi_sqlite_search_form.d | 149 +++++++++++++++++++++++-- 1 file changed, 138 insertions(+), 11 deletions(-) (limited to 'src/doc_reform/io_out/cgi_sqlite_search_form.d') diff --git a/src/doc_reform/io_out/cgi_sqlite_search_form.d b/src/doc_reform/io_out/cgi_sqlite_search_form.d index 9c95f7d..d823e8c 100644 --- a/src/doc_reform/io_out/cgi_sqlite_search_form.d +++ b/src/doc_reform/io_out/cgi_sqlite_search_form.d @@ -590,6 +590,26 @@ void cgi_function_intro(Cgi cgi) { padding-left : 0em; text-indent : 0em; } + p.publication { + font-size : 100%%%%; + margin-left : 0em; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; + } + p.ocn_is { + font-size : 100%%%%; + display : inline-block; + } + p.matched_ocn { + font-size : 90%%%%; + margin-left : 2em; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; + } p[indent="h0i1"] { padding-left : 1em; text-indent : -1em; @@ -986,12 +1006,113 @@ void cgi_function_intro(Cgi cgi) { padding-left : 9em; text-indent : 0em; } + p.spaced { white-space : pre; } + p.block { + white-space : pre; + } + p.group { } + p.alt { } + p.verse { + white-space : pre; + margin-bottom : 6px; + } + p.caption { + text-align : left; + font-size : 80%%%%; + display : inline; + } + p.endnote { + font-size : 96%%%%; + line-height : 120%%%%; + text-align : left; + margin-right : 15mm; + } + p.endnote_indent { + font-size : 96%%%%; + line-height : 120%%%%; + text-align : left; + margin-left : 2em; + margin-right : 15mm; + } + p.center { + text-align : center; + } + p.bold { + font-weight : bold; + } + p.bold_left { + font-weight : bold; + text-align : left; + } + p.centerbold { + text-align : center; + font-weight : bold; + } + p.em { + font-weight : bold; + font-style : normal; + background : #FFF3B6; + } + p.small { + font-size : 80%%%%; + margin-top : 0px; + margin-bottom : 0px; + margin-right : 6px; + text-align : left; + } + .tiny, .tiny_left, .tiny_right, .tiny_center { + font-size : 10px; + margin-top : 0px; + margin-bottom : 0px; + color : #EEEEEE; + margin-right : 6px; + text-align : left; + } + p.tiny { } + p.tiny_left { + margin-left : 0px; + margin-right : 0px; + text-align : left; + } + p.tiny_right { + margin-right : 1em; + text-align : right; + } + p.tiny_center { + margin-left : 0px; + margin-right : 0px; + text-align : center; + } + p.book_index_lev1 { + line-height : 100%%%%; + margin-top : 4px; + margin-bottom : 1px; + } + p.book_index_lev2 { + line-height : 100%%%%; + text-align : left; + margin-left : 3em; + margin-top : 1px; + margin-bottom : 3px; + } + tt { + font-family : inconsolata, "liberation mono", "bitstream vera mono", "dejavu mono", monaco, consolas, "andale mono", "courier new", "courier 10 pitch", courier, monospace; + background-color : #555555; + color : #DDDDDD; + } hr { + display : block; + height : 1px; width : 100%%%%; + border : 0; + border-top : 1px solid #AAAAAA; + border-color : #AAAAAA + background-color : #AAAAAA margin-left : 0%%%%; margin-right : 0em; margin-top : 0.5em; margin-bottom : 0.5em; + padding : 0; } @@ -1348,15 +1469,20 @@ LIMIT %%s OFFSET %%s string _old_uid = ""; if (!select_query_results.empty) { string _date_published = "0000"; - foreach (row; select_query_results) { + string _close_para = ""; + string _matched_ocn_open = ""; + foreach (idx, row; select_query_results) { if (row["uid"].as!string != _old_uid) { + _close_para = (idx == 1) ? "" : "

"; + _matched_ocn_open = (idx == 1) ? "" : "

"; _old_uid = row["uid"].as!string; _date_published = (row["date_published"].as!string.match(regex(r"^([0-9]{4})"))) ? row["date_published"].as!string : "0000"; // used in regex that breaks if no match auto m = _date_published.match(regex(r"^([0-9]{4})")); string _date = (m.hit == "0000") ? "(year?) " : "(" ~ m.hit ~ ") "; cgi.write( - "


\n" + ~ "

" ); } if (cv.results_type == "txt") { if (row["ocn"].as!string != "0") { cgi.write( - "

" ~ row["ocn"].as!string - ~ "" - ~ "
" + ~ ":

" ~ highlight_text_matched(row["body"].as!string, tf.text) ); } else { cgi.write( - "

" ~ row["ocn"].as!string - ~ "" - ~ "
" + ~ ":

" ~ highlight_text_matched(row["body"].as!string, tf.text) ); } } else { if (row["ocn"].as!string != "0") { cgi.write( - ", " ); } + _matched_ocn_open = ""; } } cgi.write( previous_next); -- cgit v1.2.3