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>&copy;</sup>&nbsp;')
        %{<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_navigation_band() click to toggle source
# File lib/sisu/html_format.rb, line 295
    def concordance_navigation_band
      up_button=if @make.build.html_navigation?
        %{</td>
<td width="5%" align="right">
  &nbsp;<a href="toc.html" target="_top" alt="-&gt;">
      #{png_nav.toc}
    </a>&nbsp;
}
      else ''
      end
      if @make.build.html_top_band?
        %{<table summary="concordance navigation band" id="toc" width="100%" bgcolor=#{the_color.band1}>
<tr><td width="20%">
  #{button_home}
</td>
<td width="75%" align="center">
  #{doc_types}
#{up_button}
#{the_table_close}
<p>}
      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
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_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
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>&copy;</sup>&nbsp;')
        %{<p class="small_left">Rights: #{rights}</p>
<p>}
      end
      self
    end
scroll_head_navigation_band() click to toggle source
# File lib/sisu/html_format.rb, line 274
    def scroll_head_navigation_band
      if @make.build.html_top_band?
        <<WOK
<td align="center" width="60%">
  #{make_scroll_search_form_and_manifest_link}
</td>
WOK
        %{<table summary="table of contents scroll navigation band" id="toc" width="100%" bgcolor=#{the_color.band1}>
<tr><td width="20%">
  #{button_home(:scroll)}
</td>
<td width="75%" align="center">
  #{doc_types}
</td>
<td width="20%">
  &nbsp;
#{the_table_close}
<p>}
      else ''
      end
    end
scroll_head_title_banner_open() click to toggle source
# File lib/sisu/html_format.rb, line 507
    def scroll_head_title_banner_open
      icon=@md.icon ? %{<center>\n#{@md.icon}\n</center>} : ''
      %{#{icon}
#{the_banner.instrument_cover_band_scr}}
    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_head_navigation_band(page=:seg) click to toggle source
# File lib/sisu/html_format.rb, line 318
    def seg_head_navigation_band(page=:seg)
      if @make.build.html_navigation?
        if page==:manifest
          nxt=(@file.output_dir_structure.by_language_code? \
          || @file.output_dir_structure.by_filetype?) \
          ? "../html/#{@md.fnb}/toc#{@md.lang_code_insert}#{Sfx[:html]}"
          : "toc#{@md.lang_code_insert}#{Sfx[:html]}"
          firstseg=%{<a href="#{nxt}" target="_top" alt="-&gt;">
          #{png_nav.nxt}</a>}
        elsif @md.firstseg =~/\S+/
          firstseg=%{<a href="#{@md.firstseg}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top" alt="-&gt;">
        #{png_nav.nxt}</a>}
        end
      else ''
      end
      if @make.build.html_top_band?
        %{<table summary="table of contents segment navigation band" id="toc" width="100%" bgcolor=#{the_color.band1}>
<tr><td width="20%">
#{button_home(page)}
</td>
<td width="75%" align="center">
  #{doc_types(page)}
</td>
<td width="5%" align="right">
  &nbsp;#{firstseg}&nbsp;
#{the_table_close}
<p>}
      else ''
      end
    end
seg_head_title_banner_open() click to toggle source
# File lib/sisu/html_format.rb, line 512
    def seg_head_title_banner_open
      icon=@md.icon ? %{<center>\n#{@md.icon}\n</center>} : ''
      %{#{icon}
#{the_banner.instrument_cover_band_seg}}
    end
seg_navigation_tail() click to toggle source
# File lib/sisu/html_format.rb, line 600
    def seg_navigation_tail #this is a bug area, look up and "tidy"
      %{
<div class="main_column">
<p>&nbsp;</p>
#{@bits.credits_sisu}
<a name="bottom" id="bottom"></a>
<a name="end" id="end"></a>
</div>
</div>
</div>
}
    end
seg_tail() click to toggle source
# File lib/sisu/html_format.rb, line 566
    def seg_tail
      %{
<div class="main_column">
<p>&nbsp;<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>&nbsp;</p>
#{@bits.credits_sisu}
<a name="bottom" id="bottom"></a>
<a name="end" id="end"></a>
</div>
</div>
</div>
}
    end