From 984b76e0779f3b465b9287b55119d2353423c27f Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 5 Sep 2014 22:59:44 -0400 Subject: v5 v6: html navigation, enable turn off (nav buttons on remaining html segments) --- lib/sisu/v5/html_format.rb | 41 ++++++++++++++++++++++++++--------------- lib/sisu/v6/html_format.rb | 41 ++++++++++++++++++++++++++--------------- 2 files changed, 52 insertions(+), 30 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v5/html_format.rb b/lib/sisu/v5/html_format.rb index 16120d88..aa002ec7 100644 --- a/lib/sisu/v5/html_format.rb +++ b/lib/sisu/v5/html_format.rb @@ -310,6 +310,15 @@ WOK end end def concordance_navigation_band + up_button=if @make.build.html_navigation? + %{ + +   + #{png_nav.toc} +   +} + else '' + end if @make.build.html_top_band? %{ -
@@ -317,29 +326,29 @@ WOK #{doc_types} - -   - #{png_nav.toc} -   +#{up_button} #{@vz.table_close}

} else '' end end def seg_head_navigation_band(page=:seg) - if page==:manifest - nxt=(@file.output_dir_structure.by_language_code? \ - || @file.output_dir_structure.by_filetype?) \ - ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}" - : "toc#{@md.lang_code_insert}#{Sfx[:html]}" - firstseg=%{ + if @make.build.html_navigation? + if page==:manifest + nxt=(@file.output_dir_structure.by_language_code? \ + || @file.output_dir_structure.by_filetype?) \ + ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}" + : "toc#{@md.lang_code_insert}#{Sfx[:html]}" + firstseg=%{ + #{png_nav.nxt}} + elsif @md.firstseg =~/\S+/ + firstseg=%{ #{png_nav.nxt}} - elsif @md.firstseg =~/\S+/ - firstseg=%{ - #{png_nav.nxt}} + end + else '' end - %{ + if @make.build.html_top_band? + %{
@@ -350,6 +359,8 @@ WOK  #{firstseg}  #{@vz.table_close}

} + else '' + end end def manifest_link(text) # @file=SiSU_Env::FileOp.new(@md) if @md diff --git a/lib/sisu/v6/html_format.rb b/lib/sisu/v6/html_format.rb index febfc30e..acc62a74 100644 --- a/lib/sisu/v6/html_format.rb +++ b/lib/sisu/v6/html_format.rb @@ -310,6 +310,15 @@ WOK end end def concordance_navigation_band + up_button=if @make.build.html_navigation? + %{ +

#{button_home(page)} +   + #{png_nav.toc} +   +} + else '' + end if @make.build.html_top_band? %{ -
@@ -317,29 +326,29 @@ WOK #{doc_types} - -   - #{png_nav.toc} -   +#{up_button} #{@vz.table_close}

} else '' end end def seg_head_navigation_band(page=:seg) - if page==:manifest - nxt=(@file.output_dir_structure.by_language_code? \ - || @file.output_dir_structure.by_filetype?) \ - ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}" - : "toc#{@md.lang_code_insert}#{Sfx[:html]}" - firstseg=%{ + if @make.build.html_navigation? + if page==:manifest + nxt=(@file.output_dir_structure.by_language_code? \ + || @file.output_dir_structure.by_filetype?) \ + ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}" + : "toc#{@md.lang_code_insert}#{Sfx[:html]}" + firstseg=%{ + #{png_nav.nxt}} + elsif @md.firstseg =~/\S+/ + firstseg=%{ #{png_nav.nxt}} - elsif @md.firstseg =~/\S+/ - firstseg=%{ - #{png_nav.nxt}} + end + else '' end - %{ + if @make.build.html_top_band? + %{
@@ -350,6 +359,8 @@ WOK  #{firstseg}  #{@vz.table_close}

} + else '' + end end def manifest_link(text) # @file=SiSU_Env::FileOp.new(@md) if @md -- cgit v1.2.3

#{button_home(page)}