From 0ec2677657a7199d5210d9e013fe62334c83f71a Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 17 Aug 2008 01:18:19 -0400 Subject: html segments structure and info provided (a bit verbose), and css --- lib/sisu/v0/html_format.rb | 304 +++++++++++++++++++-------------------------- 1 file changed, 128 insertions(+), 176 deletions(-) (limited to 'lib/sisu/v0/html_format.rb') diff --git a/lib/sisu/v0/html_format.rb b/lib/sisu/v0/html_format.rb index 0bfe580e..4992dc6d 100644 --- a/lib/sisu/v0/html_format.rb +++ b/lib/sisu/v0/html_format.rb @@ -765,7 +765,7 @@ WOK wgt=Widget.new(@md) #dir=SiSU_Env::Info_env.new(@md.fns) x=if @md.concord_make - %{ + %{ #{wgt.seg(@vz.nav_txt_toc_link)} @@ -988,7 +988,9 @@ WOK toc_metadata end def title_banner(title,subtitle,creator) - %{

+ %{ +

+

#{title}

@@ -1002,7 +1004,9 @@ WOK #{@vz.txt_home} -

} +

+
+} end end class Head_scroll < Head_toc @@ -1055,7 +1059,7 @@ WOK # ##{@vz.table_close}} # end - def title_endnote + def title_endnote #revisit # %{#{@vz.margin_txt_0} # #{@vz.paragraph_txt} # @@ -1063,37 +1067,6 @@ WOK #   ##{@vz.table_close}} end -# def tail -# %{
-##{@vz.margin_txt_0} -#
-# -# -#
-##{@vz.banner_band} -# -#
#@tocband_scroll
-#
-#
-##{@vz.paragraph_txt} -#
-# #{@vz.credits_splash} -# #{@vz.credits_sisu} -#
-##{@vz.margin_num} -##{@vz.table_close} -# -# -# -# -# -# -# -# #{@md.title*10} -# -# -#} -# end end class Format_text_object @vz=SiSU_Env::Get_init.instance.skin @@ -1130,6 +1103,30 @@ WOK end @vz=SiSU_Env::Get_init.instance.skin end + def endnote_body + %{ +

+ #@one +

+} + end + def endnote_body_indent + %{ +

+ #@one +

+} + end + def no_paranum + %{ +
+ +

+ #@one #@two +

+
+} + end def para_form_css(tag,attrib) # regular paragraphs shaped here ul=ulc='' ul,ulc="" if @tag =~/li/ @@ -1157,26 +1154,80 @@ WOK def bullet para_form_css('li','bullet') end - def format(tag,atrib) - para_form_css(tag,atrib) + def format(tag,attrib) + para_form_css(tag,attrib) end - def dl - "
#@one #@two
" + + def header_normal(tag,attrib) + %{ +
+ #{@p_num.ocn_display} + <#{tag} class="#{attrib}" #{@p_num.id}>#{@p_num.name} + #@headname + #@parablock + +
+} end - def table_css_end # - ' -

- ' + def heading_body + header_normal('p','norm') end - def no_paranum + def heading_body1 + header_normal('h1','norm') + end + def heading_body2 + header_normal('h2','norm') + end + def heading_body3 + header_normal('h3','norm') + end + def heading_body4 + header_normal('h4','norm') + end + def heading_body5 + header_normal('h5','norm') + end + def heading_body6 + header_normal('h6','norm') + end + def title_header(tag,attrib) + %{ +
+<#{tag} class="#{attrib}"> + #@one + +
+} + end + def title_header1 + title_header('h1','tiny') + end + def title_header2 + title_header('h2','tiny') + end + def title_header3 + title_header('h3','tiny') + end + def title_header4 + '' + end + def title_header4_old %{
-

- #@one #@two -

+
} + end + def dl + "
#@one #@two
" + end + def table_css_end # + ' +

+ ' end def gsub_body case @one @@ -1230,52 +1281,6 @@ WOK super(md,*txt) @vz=SiSU_Env::Get_init.instance.skin end - def endnote_body - %{ -

- #@one -

-} - end - def header_normal - %{ -
- #{@p_num.ocn_display} - <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} - #@headname - #@parablock - -
-} - end - def heading_body - @tag,@class='p','norm' - header_normal - end - def heading_body1 - @tag,@class='h1','norm' - header_normal - end - def heading_body2 - @tag,@class='h2','norm' - header_normal - end - def heading_body3 - @tag,@class='h3','norm' - header_normal - end - def heading_body4 - @tag,@class='h4','norm' - header_normal - end - def heading_body5 - @tag,@class='h5','norm' - header_normal - end - def heading_body6 - @tag,@class='h6','norm' - header_normal - end end class Format_seg < Format_text_object def initialize(md='',*txt) @@ -1328,20 +1333,6 @@ WOK def navigation_toc_lev5 end def navigation_toc_lev6 - 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 @@ -1351,39 +1342,7 @@ WOK

} end - def title_header - %{ -
- #@two -<#@tag class="#@class"> - #@one - -
-} - end - def title_header1 - @tag,@class='h1','banner' - title_header - end - def title_header2 - @tag,@class='h2','banner' - title_header - end - def title_header3 - @tag,@class='h3','banner' - title_header - end - def title_header4 - %{ -
- - -
-} - end - def subtoc_lev + def subtoc_lev(tag,attrib) one=if @one \ and @one =~/<\/?i>|/mi @one.gsub(/<\/?i>|/mi,'') #removes name markers from subtoc, go directly to substantive text @@ -1396,50 +1355,44 @@ WOK one.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') one.gsub!(/ \d+<\/sup> /m,'') end - %{<#@tag class="#@class"> - - #{one} - #{note} - } + %{<#{tag} class="#{attrib}"> + #{one} #{note} + } end def subtoc_lev5 - @tag,@class='h5','subtoc' - subtoc_lev if @one + subtoc_lev('h5','subtoc') if @one end def subtoc_lev6 - @tag,@class='h6','subtoc' - subtoc_lev if @one + subtoc_lev('h6','subtoc') if @one end #% para sisu - def header4 - %{ -
-#{@p_num.ocn_display} -

#{@p_num.name} - #@format - #@parablock -

-
-} - end - def header_sub + def header_sub(tag,attrib) @parablock.gsub!(/(?:#{Mx[:en_a_o]}|#{Mx[:en_b_o]}).+?(?:#{Mx[:en_a_c]}|#{Mx[:en_b_c]})\s*/m,' ') %{
- #{@p_num.ocn_display} - <#@tag class="#@class" #{@p_num.id}>#{@p_num.name} #{@headname} + #{@p_num.ocn_display} + <#{tag} class="#{attrib}" #{@p_num.id}>#{@p_num.name} #{@headname} #{@parablock} - +
} end def header5 - @tag,@class='p','bold' - header_sub + header_sub('p','bold') end def header6 - @tag,@class='p','bold' - header_sub + header_sub('p','bold') + end + def header4 + %{ +
+ #{@p_num.ocn_display} +

#{@p_num.name} + #@format + #@parablock +

+
+} end def navigation_header4 %{ @@ -1528,22 +1481,21 @@ WOK # # Document Information (metadata) # - x=if @md.concord_make - %{ -

- Concordance (wordlist) -

+ %{

Manifest (alternative outputs)

} - else - %{ + end + def mini_concord_tail + %{ +

+ Concordance (wordlist) +

Manifest (alternative outputs)

} - end end end end -- cgit v1.2.3