Class: SiSU_HTML_Format::HeadSeg

Inherits:
HeadInformation show all
Defined in:
lib/sisu/html_format.rb

Instance Attribute Summary

Attributes inherited from HeadInformation

#md, #rdf

Instance Method Summary collapse

Methods inherited from HeadInformation

#button_home, #doc_types, #dot, #dot_clear, #dot_nxt, #dot_pre, #dot_toc, #dot_white, #html_close, #icon, #next, #nxt, #png_nav, #pre, #previous, #toc, #up, #url_path_image_sys

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

Constructor Details

#initialize(md) ⇒ HeadSeg

Returns a new instance of HeadSeg.



614
615
616
# File 'lib/sisu/html_format.rb', line 614

def initialize(md)
  super(md)
end

Instance Method Details



714
715
716
717
718
719
720
721
722
723
# File 'lib/sisu/html_format.rb', line 714

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

#creditObject



724
725
726
727
728
729
730
731
732
# File 'lib/sisu/html_format.rb', line 724

def credit
  %{
<div class="main_column">
#{@bits.credits_sisu}
<a name="bottom" id="bottom"></a>
<a name="end" id="end"></a>
</div></div>
}
end

#dot_control_preObject



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
# File 'lib/sisu/html_format.rb', line 645

def dot_control_pre
  pre="#{@per.seg_name_x[@per.seg_name_x_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}"
  up=@toc
  nxt="#{@md.file.base_filename.html_segtoc}"
  %{<table summary="segment hidden control pre" width="100%" border="0" cellpadding="0" bgcolor=#{the_color.grey_pale} align="center">
<tr><td align="left">
  <a href="#{pre}" target="_top">
#{png_nav.dot_pre}
  </a>
</td>
<td align="center">
  <a href="#{up}" target="_top">
#{png_nav.dot_toc}
  </a>
</td>
<td align="right">
  <a href="#{nxt}" target="_top">
#{png_nav.dot_nxt}
  </a>
#{the_table_close}}
end

#dot_control_pre_nextObject



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
# File 'lib/sisu/html_format.rb', line 617

def dot_control_pre_next
  pre="#{@per.seg_name_x[@per.seg_name_x_tracker-1]}#{@md.lang_code_insert}#{Sfx[:html]}"
  up=@toc
  nxt="#{@per.seg_name_x[@per.seg_name_x_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}"
  if nxt=~/sisu_manifest\.html/
    @file=SiSU_Env::FileOp.new(@md) if @md
    if @file.output_dir_structure.by_language_code? \
    or @file.output_dir_structure.by_filetype?
      nxt=nxt.gsub(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}")
    end
  end
  %{<table summary="segment hidden control pre and next" width="100%" border="0" cellpadding="0" bgcolor=#{the_color.grey_pale} align="center">
<tr><td align="left">
  <a href="#{pre}" target="_top">
#{png_nav.dot_pre}
  </a>
</td>
<td align="center">
  <a href="#{up}" target="_top">
#{png_nav.dot_toc}
  </a>
</td>
<td align="right">
  <a href="#{nxt}" target="_top">
#{png_nav.dot_nxt}
  </a>
#{the_table_close}}
end

#endnote_markObject



762
763
764
765
766
767
# File 'lib/sisu/html_format.rb', line 762

def endnote_mark
%{
<p class="center" id="endnotes">
  <hr class="endnote" />
</p>}
end

#endnote_section_closeObject



773
774
775
776
777
# File 'lib/sisu/html_format.rb', line 773

def endnote_section_close
%{
</div>
} #revisit
end

#endnote_section_openObject



768
769
770
771
772
# File 'lib/sisu/html_format.rb', line 768

def endnote_section_open
%{
<div class="endnote">
}
end

#head_segObject

revisit



778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
# File 'lib/sisu/html_format.rb', line 778

def head_seg
  rdf=SiSU_XML_Tags::RDF.new(@md)
  %{<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>
#{@per.seg_name_x[@per.seg_name_x_tracker]} -
#{@md.title.main}
  </title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
#{rdf.metatag_html}
#{@stylesheet.css_head_seg}
</head>
<body lang="#{@md.opt.lng}">
<a name="top" id="top"></a>}
end


707
708
709
710
711
712
713
# File 'lib/sisu/html_format.rb', line 707

def manifest_link(text)
  %{<font size=2>
<a href="#{@md.file.base_filename.manifest}" target="_top">
  #{text}
</a>
  </font>}
end

change name to navigation_band_banner



733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'lib/sisu/html_format.rb', line 733

def navigation_band(segtocband,seg_table_top_control) #change name to navigation_band_banner
  %{<table summary="segment navigation band with banner" bgcolor=#{the_color.band1} width="100%"><tr>
<td width="20%" align="left">
#{button_home}
</td>
<td width="75%" align="center">
  #{doc_types}
</td>
<td width="5%" align="right">
  #{segtocband}
</td></tr>
</table>
#{seg_table_top_control}}
end

change name to navigation_band_bannerless



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
# File 'lib/sisu/html_format.rb', line 747

def navigation_band_bottom(segtocband,seg_table_top_control) #change name to navigation_band_bannerless
  %{
<div class="main_column">
  <table summary="segment navigation band" bgcolor=#{the_color.band1} width="100%"><tr>
  <td width="70%" align="center">
#{doc_types}
  </td>
  <td width="5%" align="right">
#{segtocband}
  </td></tr>
  </table>
  #{seg_table_top_control}
</div>
}
end

#title_banner(title, subtitle, creator) ⇒ Object



795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
# File 'lib/sisu/html_format.rb', line 795

def title_banner(title,subtitle,creator)
  %{
<div class="summary">
  <p class="tiny">
#{title}
  </p>
  <p class="tiny">
#{subtitle}
  </p>
  <p class="tiny">
#{creator}
  </p>
  <p class="tiny">
copy @
<a href="#{the_url.home}">
  #{the_text.txt_home}
</a>
  </p>
</div>
}
end

#toc_nav(f_pre = false, f_nxt = false, use = 1) ⇒ Object



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
694
695
696
697
# File 'lib/sisu/html_format.rb', line 666

def toc_nav(f_pre=false,f_nxt=false,use=1)
  pre=nxt=''
  toc=%{<td align="center" bgcolor=#{the_color.band1}>
  <a href="#{@toc}" target="_top">
#{png_nav.toc}
  </a>
</td>}
  pre=%{<td align="center" bgcolor=#{the_color.band1}>
  <a href="#{@per.seg_name_x[@per.seg_name_x_tracker-use]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
#{png_nav.pre}
  </a>
</td>} if f_pre==true
  nxt=%{<td align="center" bgcolor=#{the_color.band1}>
  <a href="#{@per.seg_name_x[@per.seg_name_x_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
#{png_nav.nxt}
  </a>
</td>} if f_nxt==true
  if nxt =~/sisu_manifest.html/
    @file=SiSU_Env::FileOp.new(@md) if @md
    if @file.output_dir_structure.by_language_code? \
    or @file.output_dir_structure.by_filetype?
      nxt=nxt.gsub(/sisu_manifest\.html/,"../../manifest/#{@file.base_filename.manifest}")
    end
  end
  %{<table summary="segment navigation pre/next" border="0" cellpadding="3" cellspacing="0">
<tr>
#{pre}
#{toc}
#{nxt}
<td>
#{the_table_close}}
end

#toc_next2Object



698
699
700
# File 'lib/sisu/html_format.rb', line 698

def toc_next2
  toc_nav(false,true).dup
end

#toc_pre2Object



704
705
706
# File 'lib/sisu/html_format.rb', line 704

def toc_pre2
  toc_nav(true,false,2).dup
end

#toc_pre_next2Object



701
702
703
# File 'lib/sisu/html_format.rb', line 701

def toc_pre_next2
  toc_nav(true,true).dup
end