From 5fb49b575a548313b827fd66fd7ecce514fe0e45 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 6 Jan 2014 23:02:50 -0500 Subject: v5: heading recalibration, code (downstream) changes * here no doubt remains breakage (test, fix & test again) --- lib/sisu/v5/html.rb | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'lib/sisu/v5/html.rb') diff --git a/lib/sisu/v5/html.rb b/lib/sisu/v5/html.rb index 4ff58c43..f473f1b7 100644 --- a/lib/sisu/v5/html.rb +++ b/lib/sisu/v5/html.rb @@ -259,6 +259,7 @@ module SiSU_HTML toc=if dob_toc.is ==:heading \ || dob.is==:heading_insert toc=case dob_toc.ln + when 0 then SiSU_HTML::Source::Toc.new(@md,dob_toc).level_0 when 1 then SiSU_HTML::Source::Toc.new(@md,dob_toc).level_1 when 2 then SiSU_HTML::Source::Toc.new(@md,dob_toc).level_2 when 3 then SiSU_HTML::Source::Toc.new(@md,dob_toc).level_3 @@ -335,6 +336,29 @@ WOK @@toc[:seg_mini] << format_head_toc.mini_concordance end # <-- not used + def level_0 + dob=@data + linkname,link=dob.obj.strip,dob.ocn + if link \ + and link !~/#/ #% keep eye on link + SiSU_HTML_Format::ParagraphNumber.new(@md,link) + end + title=linkname + toc={} + txt_obj={ txt: title } + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) + toc[:seg]=format_toc.lev0 + toc[:seg_mini]=format_toc.mini_lev0 + title=if dob.ocn ==0 then linkname + else + @@toc[:scr] << '
' + %{#{linkname}} + end + txt_obj={ txt: title } + format_toc=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) + toc[:scr]=format_toc.lev0 + toc + end def level_1 dob=@data linkname,link=dob.obj.strip,dob.ocn @@ -567,9 +591,8 @@ WOK format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) dochead=format_head_toc.head dochead=dochead.gsub(/toc\.(html)/,'doc.\1') #kludge - ads=SiSU_HTML_Promo::Ad.new(@md) - toc_shared << dochead << ads.div.major - @segtoc << format_head_toc.head << ads.div.major + toc_shared << dochead + @segtoc << format_head_toc.head if @make.build.html_top_band? toc_shared << format_head_toc.scroll_head_navigation_band end @@ -632,8 +655,7 @@ WOK #Segtoc tail added here @segtoc << "

\n" #bugfix sort later DEBUGNOW @segtoc << @seg_toc_band_bottom - ads=SiSU_HTML_Promo::Ad.new(@md) - @segtoc << format_head_toc.seg_navigation_tail << ads.div.close << ads.display << format_head_toc.html_close + @segtoc << format_head_toc.seg_navigation_tail << format_head_toc.html_close @segtoc=@segtoc.flatten.compact #watch if @md.opt.act[:html_seg][:set]==:on SiSU_HTML::Source::Output.new(@segtoc,@md).segtoc -- cgit v1.2.3