aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_out')
-rw-r--r--src/doc_reform/io_out/cgi_sqlite_search_form.d149
1 files changed, 138 insertions, 11 deletions
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;
}
</style>
</head>
@@ -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) ? "" : "</p>";
+ _matched_ocn_open = (idx == 1) ? "" : "<p class=\"matched_ocn\">";
_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(
- "<hr><a href=\""
+ _close_para
+ ~ "<hr><p class=\"publication\"><a href=\""
~ "http://" ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/"
@@ -1369,40 +1495,39 @@ LIMIT %%s OFFSET %%s
~ row["creator_author_last_first"].as!string
~ " "
~ show_matched_objects(row["src_filename_base"].as!string)
- ~ "<br> \n"
+ ~ "</p>"
);
}
if (cv.results_type == "txt") {
if (row["ocn"].as!string != "0") {
cgi.write(
- "<hr><a href=\""
+ "<hr style=\"width:5%%; align:left\"><p class=\"ocn_is\"><a href=\""
~ "http://" ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/"
~ row["seg_name"].as!string ~ ".html#" ~ row["ocn"].as!string
~ "\">"
~ row["ocn"].as!string
- ~ "</a>"
- ~ "<br>"
+ ~ "</a>:</p>"
~ highlight_text_matched(row["body"].as!string, tf.text)
);
} else {
cgi.write(
- "<hr><a href=\""
+ "<hr style=\"width:5%%; align:left\"><p class=\"ocn_is\"><a href=\""
~ "http://" ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/toc.html"
~ "\">"
~ row["ocn"].as!string
- ~ "</a>"
- ~ "<br>"
+ ~ "</a>:</p>"
~ highlight_text_matched(row["body"].as!string, tf.text)
);
}
} else {
if (row["ocn"].as!string != "0") {
cgi.write(
- "<a href=\""
+ _matched_ocn_open
+ ~ "<a href=\""
~ "http://" ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/"
@@ -1413,7 +1538,8 @@ LIMIT %%s OFFSET %%s
);
} else {
cgi.write(
- "<a href=\""
+ _matched_ocn_open
+ ~ "<a href=\""
~ "http://" ~ conf.http_host ~ conf.doc_collection_sub_root ~ "/"
~ row["language_document_char"].as!string ~ "/html/"
~ row["src_filename_base"].as!string ~ "/toc.html"
@@ -1422,6 +1548,7 @@ LIMIT %%s OFFSET %%s
~ "</a>, "
);
}
+ _matched_ocn_open = "";
}
}
cgi.write( previous_next);