class SiSU_HTML_Format::HeadToc
Public Class Methods
new(md)
click to toggle source
Calls superclass method
SiSU_HTML_Format::HeadInformation::new
# File lib/sisu/html_format.rb, line 267 def initialize(md) super(md) @md=md @o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure @make=SiSU_Env::ProcessingSettings.new(@md) @file=SiSU_Env::FileOp.new(@md) end
Public Instance Methods
all()
click to toggle source
# File lib/sisu/html_format.rb, line 496 def all rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') %{<p class="small_left">Rights: #{rights}</p> <p>} end
concordance()
click to toggle source
# File lib/sisu/html_format.rb, line 415 def concordance if @md.concord_make %{#{the_margin.css} <h4 class="toc"> <a href="./#{@md.file.base_filename.html_concordance}"> <i>Concordance</i> </a> </h4> #{table_close}} else %{#{the_margin.css} #{table_close}} end end
concordance_link(text)
click to toggle source
# File lib/sisu/html_format.rb, line 354 def concordance_link(text) if @md.concord_make %{<font size=2> <a href="#{@md.file.base_filename.html_concordance}" target="_top"> #{text} </a> </font>} else '' end end
head()
click to toggle source
# File lib/sisu/html_format.rb, line 399 def head rdf=SiSU_XML_Tags::RDF.new(@md) %{<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> #{@md.title.full} </title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> #{rdf.metatag_html} #{@stylesheet.css_head} </head> <body lang="#{@md.opt.lng}"> <a name="top" id="top"></a>} end
links_guide_close()
click to toggle source
# File lib/sisu/html_format.rb, line 474 def links_guide_close insert='' insert=if @md.sfx_src =~/s?/ link='http://sisudoc.org' #get from defaults url='sisudoc.org' name='SiSU electronic documents' #get from defaults insert= %{ <li class="ref"> <a href="#{link}" alt="#{name}" target="_top"> #{url} </a> </li> </ul> </div> } end %{ #{insert} <!- quick ref -!>} end
links_guide_horizontal_open()
click to toggle source
# File lib/sisu/html_format.rb, line 449 def links_guide_horizontal_open # @file=SiSU_Env::FileOp.new(@md) if @md %{ <div id="horizontal_links"> <ul id="horizontal"> <li class="refbold"> <a href="#{the_url.home}"> #{the_text.txt_hp} </a> </li> <li class="ref"> Quick Ref.: </li> <li class="ref"> <a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top"> Manifest </a> </li> <!- quick ref -!>} end
links_guide_open(type='horizontal')
click to toggle source
# File lib/sisu/html_format.rb, line 469 def links_guide_open(type='horizontal') (type=='vertical') \ ? links_guide_vertical_open : links_guide_horizontal_open end
links_guide_vertical_open()
click to toggle source
# File lib/sisu/html_format.rb, line 429 def links_guide_vertical_open # @file=SiSU_Env::FileOp.new(@md) if @md %{ <div id="vertical_links"> <ul id="vertical"> <li class="refbold"> <a href="#{the_url.home}"> #{the_text.txt_hp} </a> </li> <li class="ref"> Quick Ref.: </li> <li class="ref"> <a href="#{@md.file.base_filename.manifest}" alt="Document Manifest" target="_top"> Manifest </a> </li> <!- quick ref -!>} end
make_concordance()
click to toggle source
# File lib/sisu/html_format.rb, line 390 def make_concordance wgt=SiSU_HTML_Format::Widget.new(@md) %{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0"> <tr> <td align="center" bgcolor=#{the_color.band2}> #{wgt.manifest} #{wgt.search} </tr></table>} end
make_scroll()
click to toggle source
# File lib/sisu/html_format.rb, line 517 def make_scroll concord=concordance_link(the_nav.txt_concordance) %{<table summary="toc scroll" border="0" cellpadding="3" cellspacing="0"> <tr><td align="center" bgcolor="white" border="0"> #{the_nav.txt_doc_link} </td> <td align="center" bgcolor="white"> #{concord} #{the_table_close}} end
make_scroll_search_form_and_manifest_link()
click to toggle source
# File lib/sisu/html_format.rb, line 364 def make_scroll_search_form_and_manifest_link wgt=SiSU_HTML_Format::Widget.new(@md) %{<td align="center" bgcolor=#{the_color.band2}> #{the_nav.txt_doc_link} </td> } %{<table summary="toc segment and scroll with pdf" border="0" cellpadding="3" cellspacing="0"> <tr> #{wgt.manifest} #{wgt.search} </tr></table>} end
make_scroll_seg_pdf()
click to toggle source
# File lib/sisu/html_format.rb, line 376 def make_scroll_seg_pdf seg='' wgt=SiSU_HTML_Format::Widget.new(@md) seg=%{<td align="center" bgcolor=#{the_color.band2}> #{the_nav.txt_toc_link} </td> } %{<table summary="toc scroll and segment with pdf" border="0" cellpadding="3" cellspacing="0"> <tr> <td align="center" bgcolor=#{the_color.band2}> #{wgt.manifest} #{wgt.search} </tr></table>} end
make_seg()
click to toggle source
# File lib/sisu/html_format.rb, line 527 def make_seg concord=concordance_link(the_nav.txt_concordance) %{<table summary="toc segment" border="0" cellpadding="3" cellspacing="0"> <tr><td align="center" bgcolor="white"> #{the_nav.txt_toc_link} </td> <td align="center" bgcolor="white"> <font size=2> #{concord} #{the_table_close}} end
manifest()
click to toggle source
# File lib/sisu/html_format.rb, line 538 def manifest #check structure if not @o_str.dump_or_redirect? manifest=manifest_link(the_nav.txt_manifest) %{#{the_margin.txt_3} #{the_font.paragraph_font_small} #{manifest} </font> #{the_table_close}} else '' end end
manifest_link(text)
click to toggle source
# File lib/sisu/html_format.rb, line 348 def manifest_link(text) # @file=SiSU_Env::FileOp.new(@md) if @md %{<font size=2> <a href="#{@md.file.base_filename.manifest}" target="_top">#{text}</a> </font>} end
metadata()
click to toggle source
# File lib/sisu/html_format.rb, line 557 def metadata %{#{the_margin.css} <h4 class="toc"> <a href="#{@metalink}"> <i>MetaData</i> </a> </h4> #{the_table_close}} end
prefix_a()
click to toggle source
# File lib/sisu/html_format.rb, line 493 def prefix_a end
prefix_b()
click to toggle source
# File lib/sisu/html_format.rb, line 504 def prefix_b %{<p class="small_left">Prefix: #{@md.prefix_b}<p />} end
rights()
click to toggle source
# File lib/sisu/html_format.rb, line 495 def rights def all rights=SiSU_HTML_Tune::CleanHTML.new(@md.rights.all).clean_for_html rights=rights.gsub(/^\s*Copyright\s+\(C\)/,'Copyright <sup>©</sup> ') %{<p class="small_left">Rights: #{rights}</p> <p>} end self end
scroll_tail()
click to toggle source
# File lib/sisu/html_format.rb, line 589 def scroll_tail #debug nav=scroll_head_navigation_band %{ <div class="main_column"> #{nav} #{@bits.credits_sisu} <a name="bottom" id="bottom"></a> <a name="end" id="end"></a> </div> } end
seg_tail()
click to toggle source
# File lib/sisu/html_format.rb, line 566 def seg_tail %{ <div class="main_column"> <p> <p> <table summary="toc segment tail" bgcolor=#{the_color.band1}> <tr><td width="20%"> #{the_banner.banner_band} </td> <td width="60%"> <center> #{@tocband_segtoc} </center> </td></tr> </table> <p> </p> #{@bits.credits_sisu} <a name="bottom" id="bottom"></a> <a name="end" id="end"></a> </div> </div> </div> } end