aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/develop/html_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-11-20 23:03:24 -0500
committerRalph Amissah <ralph@amissah.com>2014-12-08 00:18:16 -0500
commit1625f316c0d74e01789bec8b8fca0608acc9310e (patch)
tree234bc83004c3e2ad7bf274f72a68523759b96664 /lib/sisu/develop/html_format.rb
parentd: orgmode, add orgmode structure output to txts (diff)
d: html, segments, reorganize, introduce new file
Diffstat (limited to 'lib/sisu/develop/html_format.rb')
-rw-r--r--lib/sisu/develop/html_format.rb44
1 files changed, 15 insertions, 29 deletions
diff --git a/lib/sisu/develop/html_format.rb b/lib/sisu/develop/html_format.rb
index b69c5d86..5d7a4a7d 100644
--- a/lib/sisu/develop/html_format.rb
+++ b/lib/sisu/develop/html_format.rb
@@ -84,10 +84,12 @@ module SiSU_HTML_Format
end
end
def id #w3c? "tidy" complains about numbers as identifiers ! annoying
- (@ocn==nil || @ocn.empty?) ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"}
+ (@ocn==nil || @ocn.empty?) \
+ ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"}
end
def goto
- (@ocn==nil || @ocn.empty?) ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
+ (@ocn==nil || @ocn.empty?) \
+ ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
end
end
class HeadInformation
@@ -99,8 +101,9 @@ module SiSU_HTML_Format
@md=md
# DublinCore 1 - title
@bits=SiSU_Proj_HTML::Bits.new
- @seg_name_html=(SiSU_HTML::Source::Seg.new.seg_name_html || [])
- @seg_name_html_tracker=(SiSU_HTML::Source::Seg.new.seg_name_html_tracker || [])
+ @per=SiSU_HTML_Persist::Persist.new
+ @per.seg_name_x=SiSU_HTML::Seg.new.seg_name_x
+ @per.seg_name_x_tracker=SiSU_HTML::Seg.new.seg_name_x_tracker
@tocband_scroll,@tocband_segtoc=nil,nil
@stylesheet=SiSU_Style::CSS_HeadInfo.new(md).stylesheet
@o_str ||=SiSU_Env::ProcessingSettings.new(md).output_dir_structure
@@ -403,7 +406,7 @@ WOK
<head>
<meta charset="utf-8">
<title>
- #{@md.html_title}
+ #{@md.title.full}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
#{rdf.metatag_html}
@@ -615,9 +618,9 @@ WOK
super(md)
end
def dot_control_pre_next
- pre="#{@seg_name_html[@seg_name_html_tracker-1]}#{@md.lang_code_insert}#{Sfx[:html]}"
+ pre="#{@per.seg_name_x[@per.seg_name_x_tracker-1]}#{@md.lang_code_insert}#{Sfx[:html]}"
up=@toc
- nxt="#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}"
+ 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? \
@@ -643,7 +646,7 @@ WOK
#{the_table_close}}
end
def dot_control_pre
- pre="#{@seg_name_html[@seg_name_html_tracker-2]}#{@md.lang_code_insert}#{Sfx[:html]}"
+ 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">
@@ -671,12 +674,12 @@ WOK
</a>
</td>}
pre=%{<td align="center" bgcolor=#{the_color.band1}>
- <a href="#{@seg_name_html[@seg_name_html_tracker-use]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
+ <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="#{@seg_name_html[@seg_name_html_tracker+1]}#{@md.lang_code_insert}#{Sfx[:html]}" target="_top">
+ <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
@@ -721,23 +724,6 @@ WOK
else ''
end
end
- def navigation_table
- %{<table summary="navigation segment table" width=#{the_width.table1} border="0" bgcolor="white" cellpadding="0">
-<tr><th width="#{@@indent['leve_1']}" align="right">
-</td>
-<td valign="top">
- <font size=2>}
- end
- def navigation_table1
- %{<table summary="navigation segment table1" width=#{the_width.table1} border="0" cellpadding=#{the_table_cellpad_box} bgcolor=#{the_color.table1} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
- def navigation_table2
- %{<table summary="navigation segment table2" width=#{the_width.table2} border="0" cellpadding=#{the_table_cellpad_box} bgcolor=#{the_color.table2} align="left">
-<tr><td valign="top">
- <font size="2">}
- end
def credit
%{
<div class="main_column">
@@ -799,8 +785,8 @@ WOK
<head>
<meta charset="utf-8">
<title>
- #{@seg_name_html[@seg_name_html_tracker]} -
- #{@md.html_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}