aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-09-05 22:59:44 -0400
committerRalph Amissah <ralph@amissah.com>2014-09-05 23:14:30 -0400
commit984b76e0779f3b465b9287b55119d2353423c27f (patch)
treeda7db8dd6c12fa199341f7a328cc813aeb370676
parentv5 v6: (for html) set default to navigation bar off (diff)
v5 v6: html navigation, enable turn off (nav buttons on remaining html segments)
-rw-r--r--data/doc/sisu/CHANGELOG_v52
-rw-r--r--data/doc/sisu/CHANGELOG_v62
-rw-r--r--lib/sisu/v5/html_format.rb41
-rw-r--r--lib/sisu/v6/html_format.rb41
4 files changed, 56 insertions, 30 deletions
diff --git a/data/doc/sisu/CHANGELOG_v5 b/data/doc/sisu/CHANGELOG_v5
index 41443428..aed37d24 100644
--- a/data/doc/sisu/CHANGELOG_v5
+++ b/data/doc/sisu/CHANGELOG_v5
@@ -38,6 +38,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_5.6.5.orig.tar.xz
sisu_5.6.5.orig.tar.xz
sisu_5.6.5-1.dsc
+* html navigation, enable turn off (nav buttons on remaining html segments)
+
* (for html) set default to navigation bar off
* xml xhtml outputs, &amp; issues
diff --git a/data/doc/sisu/CHANGELOG_v6 b/data/doc/sisu/CHANGELOG_v6
index 783899f1..2e6a6f9b 100644
--- a/data/doc/sisu/CHANGELOG_v6
+++ b/data/doc/sisu/CHANGELOG_v6
@@ -28,6 +28,8 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_6.2.6.orig.tar.xz
sisu_6.2.6.orig.tar.xz
sisu_6.2.6-1.dsc
+* html navigation, enable turn off (nav buttons on remaining html segments)
+
* (for html) set default to navigation bar off
* xml xhtml outputs, &amp; issues
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?
+ %{</td>
+<td width="5%" align="right">
+ &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
+ #{png_nav.toc}
+ </a>&nbsp;
+}
+ else ''
+ end
if @make.build.html_top_band?
%{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
@@ -317,29 +326,29 @@ WOK
</td>
<td width="75%" align="center">
#{doc_types}
-</td>
-<td width="5%" align="right">
- &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
- #{png_nav.toc}
- </a>&nbsp;
+#{up_button}
#{@vz.table_close}
<p />}
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=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+ 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=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+ #{png_nav.nxt}</a>}
+ elsif @md.firstseg =~/\S+/
+ firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
#{png_nav.nxt}</a>}
- elsif @md.firstseg =~/\S+/
- firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
- #{png_nav.nxt}</a>}
+ end
+ else ''
end
- %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
+ if @make.build.html_top_band?
+ %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
#{button_home(page)}
</td>
@@ -350,6 +359,8 @@ WOK
&nbsp;#{firstseg}&nbsp;
#{@vz.table_close}
<p />}
+ 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?
+ %{</td>
+<td width="5%" align="right">
+ &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
+ #{png_nav.toc}
+ </a>&nbsp;
+}
+ else ''
+ end
if @make.build.html_top_band?
%{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
@@ -317,29 +326,29 @@ WOK
</td>
<td width="75%" align="center">
#{doc_types}
-</td>
-<td width="5%" align="right">
- &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
- #{png_nav.toc}
- </a>&nbsp;
+#{up_button}
#{@vz.table_close}
<p />}
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=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+ 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=%{<a href="#{nxt}" target="_top" alt="-&gt;">
+ #{png_nav.nxt}</a>}
+ elsif @md.firstseg =~/\S+/
+ firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
#{png_nav.nxt}</a>}
- elsif @md.firstseg =~/\S+/
- firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
- #{png_nav.nxt}</a>}
+ end
+ else ''
end
- %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
+ if @make.build.html_top_band?
+ %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
<tr><td width="20%">
#{button_home(page)}
</td>
@@ -350,6 +359,8 @@ WOK
&nbsp;#{firstseg}&nbsp;
#{@vz.table_close}
<p />}
+ else ''
+ end
end
def manifest_link(text)
# @file=SiSU_Env::FileOp.new(@md) if @md