From afb83150d0b9876006bc100517b60be9e2fd0f56 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 16 Aug 2008 00:21:01 -0400 Subject: html css and div related --- lib/sisu/v0/css.rb | 9 ++++- lib/sisu/v0/html.rb | 7 ++-- lib/sisu/v0/html_format.rb | 78 +++++++++++++++++++++++++++++++------------- lib/sisu/v0/html_scroll.rb | 1 + lib/sisu/v0/html_segments.rb | 19 ++++++++--- lib/sisu/v0/html_tune.rb | 1 - 6 files changed, 82 insertions(+), 33 deletions(-) diff --git a/lib/sisu/v0/css.rb b/lib/sisu/v0/css.rb index f4dfc15f..1eef5023 100644 --- a/lib/sisu/v0/css.rb +++ b/lib/sisu/v0/css.rb @@ -742,7 +742,7 @@ WOK margin-bottom: 0px; } - div.substance { + div.substance, div.main_column { width: 100%; background-color: #ffffff; } @@ -804,6 +804,9 @@ WOK padding-left: 0.5em; color: #0000aa; } + hr { + width: 90%; + } span.currentlink { text-decoration: none; @@ -843,6 +846,10 @@ WOK margin-left: 2em; font-size: 85%; } + h0.minitoc { + margin-left: 0em; + font-size: 90%; + } h1.c, h2.c, h3.c, h4.c, h5.c, h6.c, p.c { text-align: center diff --git a/lib/sisu/v0/html.rb b/lib/sisu/v0/html.rb index e882627c..e57b5add 100644 --- a/lib/sisu/v0/html.rb +++ b/lib/sisu/v0/html.rb @@ -358,8 +358,8 @@ WOK format_toc.lev0 else format_toc.lev1 end - toc[:seg_mini]=if para =~/^#{Mx[:lv_o]}\d:meta^#{Mx[:lv_c]}\s*Document Information/ - format_toc.lev0 + toc[:seg_mini]=if para =~/^#{Mx[:lv_o]}\d:meta#{Mx[:lv_c]}\s*Document Information/ + format_toc.mini_lev0 else format_toc.mini_lev1 end title=if para =~/(#{Mx[:id_o]}~0;(?:\w|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]})$/ @@ -582,6 +582,7 @@ WOK prefix_b=SiSU_Tune::Clean_html.new(prefix_b).clean end @seg_toc_band=format_head_toc.seg_head_navigation_band('pdf') #bug, vary depending on type of doc !! examine + @seg_toc_band_bottom=format_head_toc.seg_head_navigation_band_bottom('pdf') #bug, vary depending on type of doc !! examine @segtoc << @seg_toc_band toc_shared << format_head_toc.scroll_head_title_banner_open @segtoc << format_head_toc.seg_head_title_banner_open @@ -627,7 +628,7 @@ WOK @segtoc << prefix_b if @md.prefix_b #Segtoc tail added here @segtoc << "

\n" #bugfix sort later DEBUGNOW - @segtoc << @seg_toc_band + @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.flatten!.compact! diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 87988ec1..1ee409ab 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -333,6 +333,25 @@ WOK  #{firstseg}  #{@vz.table_close} +

} + end + def seg_head_navigation_band_bottom(type='') + if type=~/pdf/ + @tocband_segtoc=make_scroll_seg_pdf + end + firstseg=%{ + #{@vz.png_nav_nxt} + } if @md.firstseg =~/\S+/ + %{ + + +
+   + + #@tocband_segtoc + +  #{firstseg}  +#{@vz.table_close}

} end def manifest_link(text) @@ -572,7 +591,9 @@ WOK metadata end def seg_tail - %{

 

+ %{ +

+

 

#{@vz.banner_band} @@ -591,11 +612,15 @@ WOK -} + + +} end def scroll_tail #debug nav=scroll_head_navigation_band - %{#{nav} + %{ +
+#{nav} #{@vz.credits_splash} #{@vz.credits_sisu} @@ -604,11 +629,13 @@ WOK -
} +} end def seg_navigation_tail #this is a bug area, look up and "tidy" #nav=scroll_head_navigation_band - %{

 

+ %{ +
+

 

#{@vz.credits_splash} #{@vz.credits_sisu} @@ -616,7 +643,9 @@ WOK -} + +
+} end end class Head_seg < Head_information @@ -864,7 +893,9 @@ WOK } end def credit - %{#{@vz.credits_splash} + %{ +
+#{@vz.credits_splash} #{@vz.credits_sisu} @@ -891,8 +922,7 @@ WOK end def navigation_band_bottom(segtocband,seg_table_top_control) #change name to navigaion_band_bannerless %{ -
-

+

#{doc_types} @@ -902,13 +932,24 @@ WOK
#{seg_table_top_control} -

} end def endnote_mark -%{

-

} #revisit +%{ +

+


+

} + end + def endnote_section_open +%{ +
+} + end + def endnote_section_close +%{ +
+} #revisit end def head %{#{doc_type} @@ -1177,12 +1218,9 @@ WOK end def endnote_body %{ -
- -

+

#@one -

-
+

} end def header_normal @@ -1279,30 +1317,24 @@ WOK end def endnote_body_seg_tail #FIX %{ -

#@one

-
} end def endnote_body_seg_tail_indent %{ -

#@one

-
} end def endnote_seg_body(fn='') #FIX #url construction keep within single line... BUG WATCH 200408 fn='doc' if fn.empty? #you may wish to reconsider, sends to 'doc' where no segment info %{ -

#@one#{@md.fnl[:pre]}#{fn}#{@md.fnl[:mid]}#{@md.sfx}#{@md.fnl[:post]}#@two#@three

-
} end def title_header diff --git a/lib/sisu/v0/html_scroll.rb b/lib/sisu/v0/html_scroll.rb index 8b1e041c..93e30494 100644 --- a/lib/sisu/v0/html_scroll.rb +++ b/lib/sisu/v0/html_scroll.rb @@ -97,6 +97,7 @@ module SiSU_HTML_scroll and (para =~/^#{Mx[:lv_o]}:metadata#{Mx[:lv_c]}/ or para =~/^#{Mx[:lv_o]}1:meta#{Mx[:lv_c]}\s*Document Information/) @rcdc=true end + para.gsub!(/(?:\s*#{Mx[:br_page]}\s*|\s*#{Mx[:br_page_new]}\s*)+/m,'


') if para !~/(^#{Rx[:meta]}|#{Mx[:br_endnotes]}|#{Mx[:br_eof]})/ unless para =~/^#{Mx[:gr_o]}code#{Mx[:gr_c]}/; para.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') end diff --git a/lib/sisu/v0/html_segments.rb b/lib/sisu/v0/html_segments.rb index c3617b24..c4d136b7 100644 --- a/lib/sisu/v0/html_segments.rb +++ b/lib/sisu/v0/html_segments.rb @@ -141,7 +141,9 @@ module SiSU_HTML_seg end end if @@is4 == 1 \ - or para =~/^#{Mx[:br_endnotes]}|^#{Mx[:br_eof]}/ + or para =~/^#{Mx[:br_endnotes]}|^#{Mx[:br_eof]}/ \ + or para =~/^#{Mx[:mk_o]}4:metadata#{Mx[:mk_c]}/ + m=para[/^#{Mx[:lv_o]}4:(metadata)#{Mx[:lv_c]}/]; @@get_hash_fn=$1 if m if newfile == 1 \ or para =~/^#{Mx[:br_endnotes]}|^#{Mx[:br_eof]}/ newfile=0 @@ -219,7 +221,11 @@ module SiSU_HTML_seg if @@is1 == 1 @dc_creator=%{#{@md.dc_creator}\n} if @md.dc_creator.to_s =~/\S/ @@seg[:tocband_banner] << format_head_seg.navigation_band(@@segtocband,@@seg[:dot_nav]) - @@seg[:tocband_bannerless] << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) + endnote_section_close=unless @@get_hash_fn =~/metadata/ + format_head_seg.endnote_section_close + else '' + end + @@seg[:tocband_bannerless] << endnote_section_close << format_head_seg.navigation_band_bottom(@@segtocband,@@seg[:dot_nav]) @@seg[:headers] << format_head_seg.seg_head_escript if SiSU_HTML_Format::Head_seg.method_defined? :seg_head_escript #debug PHP move up in text #bug @@seg[:headers] << format_head_seg.title_banner(@md.title,@md.subtitle,@dc_creator).gsub(clean,'') paranum=if @@header1[/.+?#{Mx[:id_o]}~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+#{Mx[:id_c]}#{Mx[:id_o]}#@dp:#@dp#{Mx[:id_c]}$/]; $1 @@ -364,9 +370,12 @@ module SiSU_HTML_seg end def tail format_head_seg=SiSU_HTML_Format::Head_seg.new(@md) - if @md.flag_auto_endnotes - @@seg[:tail] << format_head_seg.endnote_mark - @@seg[:tail] << @@seg_endnotes[@@get_hash_fn] #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES| + if @md.flag_auto_endnotes and @@seg_endnotes[@@get_hash_fn] + @@seg[:tail] << format_head_seg.endnote_section_open + if @@seg_endnotes[@@get_hash_fn].flatten.length > 0 + @@seg[:tail] << format_head_seg.endnote_mark + @@seg[:tail] << @@seg_endnotes[@@get_hash_fn].flatten #endnotes deposited at end of individual segments ||@|EXTRACTION OF ENDNOTES| + end end #@@seg[:tail] << '
 
' ads=SiSU_HTML_promo::Ad.new(@md) diff --git a/lib/sisu/v0/html_tune.rb b/lib/sisu/v0/html_tune.rb index 9cc50b23..f06b8764 100644 --- a/lib/sisu/v0/html_tune.rb +++ b/lib/sisu/v0/html_tune.rb @@ -236,7 +236,6 @@ module SiSU_Tune para.gsub!(/#{Mx[:mk_o]}#([a-zA-Z]+)#{Mx[:mk_c]}/,'&\1;') para.gsub!(/#{Mx[:mk_o]}(#[0-9]+)#{Mx[:mk_c]}/,'&\1;') para.gsub!(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'
') - para.gsub!(/(?:\s*#{Mx[:br_page]}\s*|\s*#{Mx[:br_page_new]}\s*)+/m,'


') # else clean '' para.gsub!(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/,'\1') para.gsub!(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/,'\1') para.gsub!(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/,'\1') -- cgit v1.2.3