Class: SiSU_HTML::Source::ScrollHeadAndSegToc
- Inherits:
-
Toc
- Object
- LinksGuide
- Toc
- SiSU_HTML::Source::ScrollHeadAndSegToc
- Includes:
- SiSU_Parts_HTML
- Defined in:
- lib/sisu/html.rb
Instance Method Summary collapse
- #in_common ⇒ Object
-
#initialize(md = '', toc = '', links_guide_toc = '') ⇒ ScrollHeadAndSegToc
constructor
A new instance of ScrollHeadAndSegToc.
Methods included from SiSU_Parts_HTML
#_url_path_image_base, #band1, #band2, #banner_band, #black, #blue_ink, #blue_tinge, #css, #grey, #grey_medium, #grey_pale, #home_button_only, #ico, #instrument_cover_band_scr, #instrument_cover_band_seg, #num, #num_css, #numless, #paragraph_font_small, #paragraph_font_tiny, #png_home, #png_home_button, #set_color, #set_face, #set_fonts, #set_size_endnote, #set_small, #set_tiny, #table1, #table2, #table_txt, #table_txt_r, #the_banner, #the_color, #the_font, #the_line_break, #the_margin, #the_nav, #the_png, #the_table_cellpad_box, #the_table_close, #the_url_decoration, #the_width, #txt_0, #txt_1, #txt_2, #txt_3, #txt_close, #txt_concordance, #txt_doc_link, #txt_homepage, #txt_manifest, #txt_open, #txt_toc_link, #white, #xml_close, #xml_open, #yellow_light
Methods included from SiSU_Parts_Generic
#footer_signature, #home, #home_txt, #i_choice, #i_home_button, #i_ico, #i_new, #rl_root, #root_http, #sisu, #sisu_txt, #sisudoc, #site, #the_icon, #the_text, #the_url, #txt_home, #txt_hp, #txt_hp_alias, #txt_signature, #urify, #url_close, #url_open
Methods inherited from Toc
Methods inherited from LinksGuide
Constructor Details
#initialize(md = '', toc = '', links_guide_toc = '') ⇒ ScrollHeadAndSegToc
Returns a new instance of ScrollHeadAndSegToc.
602 603 604 605 |
# File 'lib/sisu/html.rb', line 602 def initialize(md='',toc='',links_guide_toc='') @md,@toc,@links_guide_toc=md,toc,links_guide_toc @make=SiSU_Env::ProcessingSettings.new(@md) end |
Instance Method Details
#in_common ⇒ Object
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/sisu/html.rb', line 606 def in_common toc_shared=[] @segtoc=[] if (@md.opt.act[:verbose][:set]==:on \ || @md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( @md.opt.act[:color_state][:set], 'Scroll & Segtoc' ).txt_grey end format_head_toc=SiSU_HTML_Format::HeadToc.new(@md) dochead=format_head_toc.head dochead=dochead.gsub(/toc\.(html)/,'doc.\1') #kludge toc_shared << dochead @segtoc << format_head_toc.head if @make.build.html_top_band? toc_shared << format_head_toc. end if defined? @md.rights.all rights=format_head_toc.rights.all rights=SiSU_HTML_Tune::CleanHTML.new(rights).clean end if @md.prefix_b prefix_b=format_head_toc.notes.prefix_b prefix_b=SiSU_HTML_Tune::CleanHTML.new(prefix_b).clean end if @make.build.html_top_band? @segtoc << format_head_toc. end toc_shared << format_head_toc. @segtoc << format_head_toc. tmp_head=nil doc_title_endnote=@md.title.full.gsub(/(\*+)/, '<sup><a href="#endnotes">\1</a></sup>') tmp_head=doc_title_endnote + "\n" txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold if defined? @md.creator. creator=SiSU_HTML_Tune::CleanHTML.new(@md.creator.).clean_for_html creator_endnote=creator.gsub(/(\*+)/, %{ <sup><a href="#notes">\\1</a></sup>}) tmp_head=creator_endnote + "\n" txt_obj={ txt: tmp_head } format_txt_obj=SiSU_HTML_Format::FormatTextObject.new(@md,txt_obj) toc_shared << format_txt_obj.center_bold @segtoc << format_txt_obj.center_bold end toc_shared << "#{the_table_close*1}\n" @segtoc << "#{the_table_close*1}\n" tmp_head=nil if @md.prefix_a tmp_head ||= %{<p>#{@md.prefix_a}\n} toc_shared << tmp_head.dup @segtoc << tmp_head.dup end tmp_head=nil toc_shared << @links_guide_toc if defined? @md.rights.all #and ? @md.rights.all toc_shared << rights end if defined? @md.prefix_b toc_shared << prefix_b end if @make.build.toc? #Table of Contents added/appended here toc_shared << @toc[:scr] end @segtoc << @links_guide_toc @segtoc << @toc[:seg] if defined? @md.rights.all \ and not @md.rights.all.empty? @segtoc << rights end @segtoc << prefix_b if @md.prefix_b #Segtoc tail added here @segtoc << "</p>\n" #bugfix sort later DEBUGNOW @segtoc << @seg_toc_band_bottom @segtoc << format_head_toc. << 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 end @segtoc=[] @toc[:scr],@toc[:seg]=[],[] toc_shared end |