From 145f3092505f614ca5c81a4cbcfea9f22329e745 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 3 Feb 2012 20:02:32 -0500 Subject: v3 v3dv: path & url links, updates for multiple output directory structures --- lib/sisu/v3dv/epub_format.rb | 281 ++----------------------------------------- 1 file changed, 7 insertions(+), 274 deletions(-) (limited to 'lib/sisu/v3dv/epub_format.rb') diff --git a/lib/sisu/v3dv/epub_format.rb b/lib/sisu/v3dv/epub_format.rb index c1987fa0..344e4e7e 100644 --- a/lib/sisu/v3dv/epub_format.rb +++ b/lib/sisu/v3dv/epub_format.rb @@ -1718,50 +1718,12 @@ WOK } end end - class Widget < HeadInformation - def initialize(md) - super(md) - @md=md - @cf_defaults=SiSU_Env::InfoProcessingFlag.new - end - def home - %{ - - #{@vz.png_homepage} - -} - end - def search - env=SiSU_Env::InfoEnv.new(@md.fns,@md) - env.widget.search_form('sisusearch',nil,nil,true) - end - def manifest - %{ - - #{@vz.nav_txt_manifest} - -} - end - end - class XML - end class HeadToc < HeadInformation def initialize(md) super(md) @md=md @tocband_segtoc=make_seg end - def concordance_navigation_band(type='') - if type=~/pdf/ - @tocband_concordance=make_concordance - end - %{

- - #{@vz.epub_png_nav_toc} - -

-} - end def seg_head_navigation_band firstseg=%{ #{@vz.epub_png_nav_nxt} @@ -1778,30 +1740,17 @@ WOK ? '' : %{

#{firstseg}

} end - def manifest_link(text) #watch fix removed font size 2 - %{
#{text}} + def manifest_link(text) + %{ #{text}} end - def concordance_link(text) #watch fix removed font size 2 + def concordance_link(text) if @md.concord_make - %{ + %{ #{text} } else '' end end - def make_concordance - manifest=scroll=seg='' - wgt=SiSU_EPUB_Format::Widget.new(@md) - %{ - - #{wgt.seg(@vz.nav_txt_toc_link)}#{wgt.scroll(@vz.nav_txt_doc_link)}#{wgt.pdf}#{wgt.odf} -
- #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - end def head %{#{doc_type} @@ -1815,7 +1764,7 @@ WOK if @md.concord_make %{#{@vz.margin_css}

- + Concordance

@@ -1879,10 +1828,6 @@ WOK #{@vz.table_close}} end - def seg_metadata - @metalink=%{./#{@md.fn[:metadata]}} - metadata - end end class HeadSeg < HeadInformation def initialize(md) @@ -1896,227 +1841,15 @@ WOK #{@md.html_title} -#{@vz.font_css_table_file} +#{@css.xhtml_epub} -#{@vz.color_body} -#{@vz.js_top}} - end - def title_banner(title,subtitle,creator) - end - def dot_control_pre_next - %{ - - -
- - #{@vz.png_nav_dot_pre} - - - - #{@vz.png_nav_dot_toc} - - - - #{@vz.png_nav_dot_nxt} - -#{@vz.table_close}} - end - def dot_control_pre - %{ - - -
- - #{@vz.png_nav_dot_pre} - - - - #{@vz.png_nav_dot_toc} - - - - #{@vz.png_nav_dot_nxt} - -#{@vz.table_close}} - end - def toc_nav(f_pre=false,f_nxt=false,use=1) - pre=nxt='' - toc=%{ - #{@vz.epub_png_nav_toc} - -} - pre=%{ - #{@vz.epub_png_nav_pre} - -} if f_pre==true - nxt=%{ - #{@vz.epub_png_nav_nxt} - -} if f_nxt==true - DISABLE[:epub][:internal_navigation] \ - ? '' - : %{

-#{pre} -#{toc} -#{nxt} -

-} - end - def toc_next2 - pre,nxt=false,true - toc_nav(false,true).dup - end - def toc_pre_next2 - toc_nav(true,true).dup - end - def toc_pre2 - toc_nav(true,false).dup - end - def manifest_link(text) - %{ - #{text} - } - end - def concordance_link(text) - if @md.concord_make - %{ - #{text} - } - else '' - end - end - def doc_types #used in seg_nav_band ### - scroll=seg='' - wgt=SiSU_EPUB_Format::Widget.new(@md) - x=if @md.concord_make - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.pdf}#{wgt.odf} -
- #{wgt.concordance(@vz.nav_txt_concordance)} - #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - else - %{ - - - #{wgt.seg(@vz.nav_txt_toc_link)} - #{wgt.scroll(@vz.nav_txt_doc_link)} - #{wgt.pdf}#{wgt.odf} -
- #{wgt.manifest} - #{wgt.search} - #{wgt.home} -
} - end - end - def navigation_table - %{ -
- - - } - end - def navigation_table1 - %{ -
- } - end - def navigation_table2 - %{ -
- } - end - def heading_advert_local_1 - dir=SiSU_Env::InfoEnv.new(@fns) - %{

- -
- - #{@md.ad_alt} - -#{@vz.table_close} -

} - end - def heading_advert_local_2 - dir=SiSU_Env::InfoEnv.new(@fns) - %{

- -
- - #{@md.ad_alt} - -#{@vz.table_close} -

} - end - def heading_advert_external - dir=SiSU_Env::InfoEnv.new(@fns) - %{

- -
- - #{@md.ad_alt} - -#{@vz.table_close} -

} - end - def navigation_band(segtocband) #change name to navigaion_band_banner - %{#{segtocband} -} - end - def navigation_band_bottom(segtocband,seg_table_top_control) #change name to navigaion_band_bannerless - %{ -
- - - -
- #{doc_types} - - #{segtocband} -
- #{seg_table_top_control} -
-} +#{@vz.color_body}} end def endnote_mark %{
} end - def endnote_section_open -%{ -
-} - end - def endnote_section_close -%{ -
-} #revisit - end - def head - %{#{doc_type} - - - #{@seg_name_xhtml[@seg_name_xhtml_tracker]} - - #{@md.html_title} - - -#{@css.xhtml_epub} - -#{@vz.color_body}} - end - def toc_metadata - @metalink=%{./#{@md.fn[:metadata]}} - toc_metadata - end - def title_banner(title,subtitle,creator) - end end class HeadScroll < HeadToc def initialize(md) -- cgit v1.2.3