aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/html_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/html_format.rb')
-rw-r--r--lib/sisu/v6/html_format.rb69
1 files changed, 20 insertions, 49 deletions
diff --git a/lib/sisu/v6/html_format.rb b/lib/sisu/v6/html_format.rb
index eb0745da..abefdf2f 100644
--- a/lib/sisu/v6/html_format.rb
+++ b/lib/sisu/v6/html_format.rb
@@ -74,7 +74,7 @@ module SiSU_HTML_Format
else
name=(@make.build.html_strict?) ? '' : %{ name="#{@ocn}"}
@ocn.gsub(/^(\d+|)$/,
- %{<label class="ocn"><a#{name} href="##{@ocn_html_identifier}#{@ocn}" class="lnkocn">\\1</a></label>})
+ %{<label class="ocn" id="#{@ocn}">\\1</label>})
end
else
''
@@ -89,7 +89,7 @@ module SiSU_HTML_Format
end
end
def id #w3c? "tidy" complains about numbers as identifiers ! annoying
- (@ocn==nil || @ocn.empty?) ? '' : %{id="o#{@ocn}"}
+ (@ocn==nil || @ocn.empty?) ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"}
end
def goto
(@ocn==nil || @ocn.empty?) ? '' : %{<a href="##{@ocn_html_identifier}#{@ocn}">}
@@ -173,9 +173,8 @@ module SiSU_HTML_Format
SiSU_XML_Tags::RDF.new(md)
end
def doc_type
- %{<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">\n}
+ %{<!DOCTYPE html>
+<html>\n}
end
def table_close
%{ </font>
@@ -302,7 +301,7 @@ WOK
<td width="20%">
&nbsp;
#{@vz.table_close}
-<p />}
+<p>}
else ''
end
end
@@ -325,7 +324,7 @@ WOK
#{doc_types}
#{up_button}
#{@vz.table_close}
-<p />}
+<p>}
else ''
end
end
@@ -355,7 +354,7 @@ WOK
<td width="5%" align="right">
&nbsp;#{firstseg}&nbsp;
#{@vz.table_close}
-<p />}
+<p>}
else ''
end
end
@@ -411,20 +410,17 @@ WOK
</tr></table>}
end
def head
- rdf=SiSU_XML_Tags::RDF.new(@md)
%{#{doc_type}
<head>
+ <meta charset="utf-8">
<title>
#{@md.html_title}
</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{rdf.metatag_html}
#{@stylesheet.css_head}
</head>
#{@vz.color_body}
-<a name="top" id="top"></a>
-<a name="up" id="up"></a>
-<a name="start" id="start"></a>}
+<a name="top" id="top"></a>}
end
def concordance
if @md.concord_make
@@ -513,7 +509,7 @@ WOK
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 />}
+<p>}
end
self
end
@@ -597,11 +593,7 @@ WOK
#{@vz.credits_splash}
#{@vz.credits_sisu}
<a name="bottom" id="bottom"></a>
-<a name="down" id="down"></a>
<a name="end" id="end"></a>
-<a name="finish" id="finish"></a>
-<a name="stop" id="stop"></a>
-<a name="credits"></a>
</div>
</div>
</div>
@@ -615,11 +607,7 @@ WOK
#{@vz.credits_splash}
#{@vz.credits_sisu}
<a name="bottom" id="bottom"></a>
-<a name="down" id="down"></a>
<a name="end" id="end"></a>
-<a name="finish" id="finish"></a>
-<a name="stop" id="stop"></a>
-<a name="credits"></a>
</div>
}
end
@@ -630,11 +618,7 @@ WOK
#{@vz.credits_splash}
#{@vz.credits_sisu}
<a name="bottom" id="bottom"></a>
-<a name="down" id="down"></a>
<a name="end" id="end"></a>
-<a name="finish" id="finish"></a>
-<a name="stop" id="stop"></a>
-<a name="credits"></a>
</div>
</div>
</div>
@@ -775,11 +759,7 @@ WOK
#{@vz.credits_splash}
#{@vz.credits_sisu}
<a name="bottom" id="bottom"></a>
-<a name="down" id="down"></a>
<a name="end" id="end"></a>
-<a name="finish" id="finish"></a>
-<a name="stop" id="stop"></a>
-<a name="credits" id="credits"></a>
</div></div>
}
end
@@ -829,21 +809,18 @@ WOK
} #revisit
end
def head_seg
- rdf=SiSU_XML_Tags::RDF.new(@md)
%{#{doc_type}
<head>
+ <meta charset="utf-8">
<title>
#{@seg_name_html[@seg_name_html_tracker]} -
#{@md.html_title}
</title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-#{rdf.metatag_html}
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
#{@stylesheet.css_head_seg}
</head>
#{@vz.color_body}
-<a name="top" id="top"></a>
-<a name="up" id="up"></a>
-<a name="start" id="start"></a>}
+<a name="top" id="top"></a>}
end
def title_banner(title,subtitle,creator)
%{
@@ -937,15 +914,9 @@ WOK
and dob.tags.length > 0 # insert tags "hypertargets"
dob.tags.each do |t|
t=t.gsub(/[^a-z0-9._-]/,'') #use for all html tags? consider limiting to strict? or implementing earlier
- if @make.build.html_strict?
- tags=(t =~/^[#{Mx[:ocn_id_char]}]?[0-9.]+$/) \
- ? tags #check what can be sorted in ao
- : (tags << %{<a name="#{t}" ></a>})
- else
- tags=(t =~/^[#{Mx[:ocn_id_char]}][0-9.]+$/) \
- ? tags #check what can be sorted in ao
- : (tags << %{<a name="#{t}" ></a>})
- end
+ tags=(t =~/^[0-9.]+$/) \
+ ? tags #check what can be sorted in ao
+ : (tags << %{<a name="#{t}" ></a>})
end
end
tags
@@ -1038,7 +1009,7 @@ WOK
end
def heading_normal(tag,attrib)
section_break=(tag=~/h[1-5]/) \
- ? '<br /><hr width=90% /><br />'
+ ? '<br><hr width=90% /><br>'
: ''
%{#{section_break}
<div class="substance">
@@ -1196,13 +1167,13 @@ WOK
<center>
#{@txt}
#{@two}
-</a></center><p />}
+</a></center><p>}
end
def navigation_toc_lev1
%{#{@banner.nav_toc}}
end
def navigation_toc_lev2 #change bold use css
- %{<p />
+ %{<p>
<table summary="navigation segment level 2">
<tr><td width ="20">
</td>
@@ -1214,7 +1185,7 @@ WOK
#{@vz.table_close}}
end
def navigation_toc_lev3 #change bold use css
- %{<p />
+ %{<p>
<table summary="navigation segment level 3">
<tr><td width ="20">
</td>