From 0905fae7c1ba93b70cb10ad77b6a24dbbc2c5082 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 20 Jun 2017 15:12:56 -0400 Subject: top banner with previous next navigation bar with svg buttons --- src/sdp/output/xmls.d | 288 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 203 insertions(+), 85 deletions(-) (limited to 'src/sdp/output/xmls.d') diff --git a/src/sdp/output/xmls.d b/src/sdp/output/xmls.d index c7dd552..b86fb46 100644 --- a/src/sdp/output/xmls.d +++ b/src/sdp/output/xmls.d @@ -64,76 +64,172 @@ template outputXHTMLs() { } return tags; } - auto html_scroll_head(Dm)( + auto header_metadata(Dm)( Dm doc_matters, ) { + string _title="Title"; + string _author="Author"; + string _publisher="Publisher"; + string _date="Date"; + string _date_created="Date"; + string _date_issued="Date"; + string _date_available="Date"; + string _date_valid="Date"; + string _date_modified="Date"; + string _language="en"; + string _rights="Copyright: Copyright (C) year holder"; + string _generator="sdp [SiSU 7.1.8 of 2016w08/5 (2016-02-26)] (n*x and D)"; + string _generator_home="http://www.sisudoc.org"; string o; - o = format(q"¶ - - - - %s%s - - - - - - - - - - - - - - - - - - - ¶", - doc_matters.dochead_meta["title"]["full"], - (doc_matters.dochead_meta["creator"]["author"].empty) ? "" : ", " ~ doc_matters.dochead_meta["creator"]["author"], - doc_matters.language, + o = format(q"¶ + + + + + + + + + + + + + + + ¶", + _title, + _author, + _publisher, + _date, + _date_created, + _date_issued, + _date_available, + _date_valid, + _date_modified, + _language, + _rights, + _generator, + _generator_home, + ); + return o; + } + auto site_info_button(Dm)( + Dm doc_matters, + ) { + string _location_1_url ="http://www.sisudoc.org"; + string _location_1_lnk ="SiSU"; + string _location_2_url ="http://www.sisudoc.org"; + string _location_2_lnk ="www.sisudoc.org"; + string _location_3_url ="http://www.sisudoc.org"; + string _location_3_lnk ="sisu"; + string o; + o = format(q"¶ + + +
+

+ %s +

+

+ %s +

+

+ %s +

+
+ ¶", + _location_1_url, + _location_1_lnk, + _location_2_url, + _location_2_lnk, + _location_3_url, + _location_3_lnk, + ); + return o; + } + auto inline_search_form(Dm)( + Dm doc_matters, + ) { + string _action="http://www.sisudoc.org/cgi-bin/search.cgi"; + string _db="SiSU.7a.manual"; + string o; + o = format(q"¶ + +
+ + + + + +
+ + +
+ ¶", + _action, + _db, ); return o; } - auto html_seg_head(Dm)( + auto html_head(Dm)( Dm doc_matters, + string type, ) { string o; o = format(q"¶ - - - %s%s - - - - - - - - - - - - - - - + + + %s%s + + + %s + - - + + - ¶", + +
+
+
+ + + +
+ + %s + + + + + + + %s + +
+ + + + [ document manifest ] + + +
+
+
+
%s¶", doc_matters.dochead_meta["title"]["full"], (doc_matters.dochead_meta["creator"]["author"].empty) ? "" : ", " ~ doc_matters.dochead_meta["creator"]["author"], + header_metadata(doc_matters), + ((type == "seg") ? "../../../" : "../../") ~ "image/rb7.ico", + ((type == "seg") ? "../../../" : "../../") ~ "css/html.css", doc_matters.language, + site_info_button(doc_matters), + inline_search_form(doc_matters), + ((type == "seg") ? "" : "\n
"), ); return o; } @@ -353,64 +449,86 @@ template outputXHTMLs() { lev4_subtoc ~= " \n"; return lev4_subtoc.to!string; } - string nav_pre_next_table(O)( + auto nav_pre_next_svg(O)( auto return ref const O obj, ) { string prev, next, toc; - if (obj.segname_prev == "") { + if (obj.segment_anchor_tag == "toc") { + toc = ""; prev = ""; } else { + toc = format(q"¶ + + + + ¶", + ); + } + if (obj.segname_prev == "") { + prev = ""; + } else { // previous prev = format(q"¶ - - -  << [ prev ] - - + + + ¶", obj.segname_prev, ); } - if (obj.segname_next == "") { + if (obj.segname_next == "") { // next next = ""; } else { next = format(q"¶ - - -  [ next ] >> - - + + + ¶", obj.segname_next, ); } - if (obj.segment_anchor_tag == "toc") { - toc = ""; - prev = ""; - } else { - toc = format(q"¶ - - -  [ toc ] - - - ¶", - ); - } - string o = format(q"¶ + + ¶", - prev, toc, + prev, next, ); - return o; + string _pre_next = format(q"¶ + + ¶", + prev, + next, + ); + struct bar { + string toc_pre_next() { + return _toc_pre_next; + } + string pre_next() { + return _pre_next; + } + } + return bar(); } auto heading(O)( auto return ref const O obj, -- cgit v1.2.3