aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-12-03 23:47:08 -0500
committerRalph Amissah <ralph@amissah.com>2010-12-03 23:47:11 -0500
commitf0f647e331cf162d86bfe064e8710f3e29b8408e (patch)
tree0e10bf1f85b5da132570fefbb008bbcd0ab01ea0 /lib/sisu/v2/html_format.rb
parenttexpdf: toc now contains level 3~ consistent with other output formats (diff)
html, link to "document manifest" remains (individual output links removed)
Diffstat (limited to 'lib/sisu/v2/html_format.rb')
-rw-r--r--lib/sisu/v2/html_format.rb117
1 files changed, 10 insertions, 107 deletions
diff --git a/lib/sisu/v2/html_format.rb b/lib/sisu/v2/html_format.rb
index 89ee812f..66f9bc05 100644
--- a/lib/sisu/v2/html_format.rb
+++ b/lib/sisu/v2/html_format.rb
@@ -145,29 +145,13 @@ module SiSU_HTML_Format
@cf_defaults=SiSU_Env::Info_processing_flag.new
end
def home
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="../index.html" target="_top">
- #{@vz.nav_txt_homepage}</a>
-</td>
-}
+ ''
end
def scroll(text)
- if @md.fns =~ /\.(?:-|ssm\.)?sst$/
- scroll=%{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:doc]}" target="_top" #{@vz.js_doc}>
- #{text}
- </a>
-</td>
-}
- end
+ ''
end
def seg(text)
- %{<td align="center" bgcolor="#99CC66">
- <a href="#{@md.fn[:toc]}" target="_top" #{@vz.js_doc}>
- #{text}
- </a>
-</td>
-}
+ ''
end
def search
env=SiSU_Env::Info_env.new(@md.fns,@md)
@@ -181,66 +165,19 @@ module SiSU_HTML_Format
</td>}
end
def pdf
- pdf=if @md.programs[:pdf] \
- and @cf_defaults.cf_0 =~/p/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:pdf_p]}" target="_top" #{@vz.js_portrait}>
- #{@vz.nav_txt_pdf_portrait}
- </a>
-</td>
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:pdf_l]}" target="_top" #{@vz.js_landscape}>
- #{@vz.nav_txt_pdf_landscape}
- </a>
-</td>
-}
- else ''
- end
+ ''
end
def txt
- txt=if @cf_defaults.cf_0 =~/[at]/
- %{
-<td valign=bottom bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:plain]}" target="_top" #{@vz.js_plaintext}>
- #{@vz.nav_txt_plaintext}
- </a>
-</td>}
- else ''
- end
+ ''
end
def epub
- epub=if @cf_defaults.cf_0 =~/e/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="../epub/#{@md.fn[:epub]}" target="_top" #{@vz.js_epub}>
- #{@vz.nav_txt_epub}
- </a>
-</td>}
- else ''
- end
+ ''
end
def odf
- odf=if @cf_defaults.cf_0 =~/o/
- %{
-<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:odf]}" target="_top" #{@vz.js_odf}>
- #{@vz.nav_txt_odf}
- </a>
-</td>}
- else ''
- end
+ ''
end
def concordance(text)
- if @md.concord_make \
- and @md.wc_words < 300000 #max word count for display of concordance here as would now be a large file
- %{<td align="center" bgcolor=#{@vz.color_band2}>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </td>}
- else ''
- end
+ ''
end
end
class XML
@@ -307,23 +244,7 @@ WOK
<p />}
end
def seg_head_navigation_band_bottom(type='')
- if type=~/pdf/
- @tocband_segtoc=make_scroll_seg_pdf
- end
- firstseg=%{<a href="#{@md.fnl[:pre]}#{@md.firstseg}#{@md.fnl[:mid]}#{Sfx[:html]}#{@md.fnl[:post]}" target="_top" alt="-&gt;">
- #{@vz.png_nav_nxt}
- </a>} if @md.firstseg =~/\S+/
- %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{@vz.color_band1}>
-<tr><td width="20%">
- &nbsp;
-</td>
-<td width="75%" align="center">
- #{@tocband_segtoc}
-</td>
-<td width="5%" align="right">
- &nbsp;#{firstseg}&nbsp;
-#{@vz.table_close}
-<p />}
+ ''
end
def manifest_link(text)
%{<font size=2>
@@ -331,14 +252,7 @@ WOK
</font>}
end
def concordance_link(text)
- if @md.concord_make
- %{<font size=2>
- <a href="#{@md.fn[:concordance]}" target="_top" #{@vz.js_concordance}>
- #{text}
- </a>
- </font>}
- else ''
- end
+ ''
end
def make_seg_scroll_pdf
wgt=Widget.new(@md)
@@ -348,12 +262,8 @@ WOK
}
%{<table summary="toc segment and scroll with pdf" border="0" cellpadding="3" cellspacing="0">
<tr>
- #{scroll}
- #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf}
- #{wgt.concordance(@vz.nav_txt_concordance)}
#{wgt.manifest}
#{wgt.search}
- #{wgt.home}
</tr></table>}
end
def make_scroll_seg_pdf
@@ -365,13 +275,9 @@ WOK
}
%{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0">
<tr>
- #{seg}
- #{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.txt}#{wgt.epub}#{wgt.pdf}#{wgt.odf}
<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
#{wgt.manifest}
#{wgt.search}
- #{wgt.home}
</tr></table>}
end
def make_concordance
@@ -379,12 +285,9 @@ WOK
wgt=Widget.new(@md)
%{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0">
<tr>
- #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf}
<td align="center" bgcolor=#{@vz.color_band2}>
- #{wgt.concordance(@vz.nav_txt_concordance)}
#{wgt.manifest}
#{wgt.search}
- #{wgt.home}
</tr></table>}
end
def head