From 32fd8f3908bc8632e2d8ab4d872f6e4362fe031b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 12 Oct 2014 10:52:35 -0400 Subject: v5: merge v6: remove defaults.rb & some relics related to sisu skins --- lib/sisu/v5/xhtml_epub2_format.rb | 67 +++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 35 deletions(-) (limited to 'lib/sisu/v5/xhtml_epub2_format.rb') diff --git a/lib/sisu/v5/xhtml_epub2_format.rb b/lib/sisu/v5/xhtml_epub2_format.rb index 4004a446..bbd02a6d 100644 --- a/lib/sisu/v5/xhtml_epub2_format.rb +++ b/lib/sisu/v5/xhtml_epub2_format.rb @@ -58,7 +58,6 @@ =end module SiSU_XHTML_EPUB2_Format - include SiSU_Viz class ParagraphNumber def initialize(md,ocn) @md,@ocn=md,ocn.to_s @@ -1235,6 +1234,7 @@ module SiSU_XHTML_EPUB2_Format end end module SanitizeXML + require_relative 'xhtml_parts' # xhtml_parts.rb def self.xml(x) if x.is_a?(String) x=x.gsub(/ /,' ') if Ep[:alt]==:on @@ -1249,12 +1249,10 @@ module SiSU_XHTML_EPUB2_Format end end class HeadInformation - include SiSU_Viz - attr_reader :md,:rdf,:vz + attr_reader :md,:rdf def initialize(md) @md=md # DublinCore 1 - title - @vz=SiSU_Viz::Defaults.new @css=SiSU_Env::CSS_Stylesheet.new(md) @seg_name_xhtml=(SiSU_XHTML_EPUB2::Source::Seg.new.seg_name_xhtml || []) @seg_name_xhtml_tracker=(SiSU_XHTML_EPUB2::Source::Seg.new.seg_name_xhtml_tracker || []) @@ -1722,15 +1720,16 @@ output_epub_cont_seg.close end def table_close %{ -#{@vz.table_close}} +#{the_table_close}} end def xhtml_close - %{#{@vz.credits_sisu_epub} + %{#{SiSU_Proj_XHTML::Bits.new.credits_sisu_epub} } end end class HeadToc < HeadInformation + include SiSU_Parts_XHTML def initialize(md) super(md) @md=md @@ -1757,16 +1756,16 @@ output_epub_cont_seg.close end def concordance if @md.concord_make - %{#{@vz.margin_css} + %{#{the_margin.css}

Concordance

-#{@vz.table_close}} +#{the_table_close}} else - %{#{@vz.margin_css} -#{@vz.table_close}} + %{#{the_margin.css} +#{the_table_close}} end end def links_guide_open(type='horizontal') @@ -1787,40 +1786,40 @@ output_epub_cont_seg.close %{

Prefix: #{@md.prefix_b}} end def make_seg - concord=concordance_link(@vz.nav_txt_concordance) + concord=concordance_link(the_nav.txt_concordance) %{
- #{@vz.nav_txt_toc_link} + #{the_nav.txt_toc_link} #{concord} -#{@vz.table_close}} +#{the_table_close}} end def manifest #check structure - manifest=manifest_link(@vz.nav_txt_manifest) - %{#{@vz.margin_txt_3} - #{@vz.paragraph_font_small} + manifest=manifest_link(the_nav.txt_manifest) + %{#{the_margin.txt_3} + #{the_font.paragraph_font_small} #{manifest} -#{@vz.table_close}} +#{the_table_close}} end def concordance #check structure - concord=concordance_link(@vz.nav_txt_concordance) - %{#{@vz.margin_txt_3} - #{@vz.paragraph_font_small} + concord=concordance_link(the_nav.txt_concordance) + %{#{the_margin.txt_3} + #{the_font.paragraph_font_small} #{concord} -#{@vz.table_close}} +#{the_table_close}} end def metadata - %{#{@vz.margin_css} + %{#{the_margin.css}

MetaData

-#{@vz.table_close}} +#{the_table_close}} end end class HeadSeg < HeadInformation @@ -1850,8 +1849,8 @@ output_epub_cont_seg.close super(md) end def toc_owner_details - %{#{@vz.margin_txt_3} -#{@vz.paragraph_font_small} + %{#{the_margin.txt_3} +#{the_font.paragraph_font_small} Owner Details @@ -1859,11 +1858,11 @@ output_epub_cont_seg.close -#{@vz.table_close}} +#{the_table_close}} end end class FormatTextObject - @vz=SiSU_Viz::Defaults.new + include SiSU_Parts_XHTML attr_accessor :md,:t_o,:txt,:ocn,:format,:table,:link,:linkname,:paranum,:p_num,:headname,:banner,:url def initialize(md,t_o) @md,@t_o=md,t_o @@ -1907,7 +1906,6 @@ output_epub_cont_seg.close @txt=@txt.gsub(/#{Mx[:mk_o]}[-~]##{Mx[:mk_c]}/,'') end @p_num=ParagraphNumber.new(@md,@ocn) - @vz=SiSU_Viz::Defaults.new end def nametags_seg(dob) #FIX tags='' @@ -2084,13 +2082,13 @@ output_epub_cont_seg.close end end def bold_para - %{#{@vz.margin_txt_0} + %{#{the_margin.txt_0}

#{@txt}

-#{@vz.margin_num_css} +#{the_margin.num_css} #{$ep[:hsp]*3} -#{@vz.table_close}} +#{the_table_close}} end def bold_heading #unused @txt=@txt.gsub(/[1-9]~\S+/,''). @@ -2098,9 +2096,9 @@ output_epub_cont_seg.close %{

#{@txt}

-#{@vz.margin_num_css} +#{the_margin.num_css} #{$ep[:hsp]*3} -#{@vz.table_close}} +#{the_table_close}} end def toc_head_copy_at @txt=SanitizeXML.xml(@txt) @@ -2122,7 +2120,6 @@ output_epub_cont_seg.close class FormatScroll < FormatTextObject def initialize(md,txt) super(md,txt) - @vz=SiSU_Viz::Defaults.new end end class FormatSeg < FormatTextObject @@ -2206,7 +2203,7 @@ output_epub_cont_seg.close

#{@txt}

-#{@vz.table_close}} +#{the_table_close}} end def navigation_heading5 %{

-- cgit v1.2.3