aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/html_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v4/html_format.rb')
-rw-r--r--lib/sisu/v4/html_format.rb30
1 files changed, 12 insertions, 18 deletions
diff --git a/lib/sisu/v4/html_format.rb b/lib/sisu/v4/html_format.rb
index 25a8dbee..f96db380 100644
--- a/lib/sisu/v4/html_format.rb
+++ b/lib/sisu/v4/html_format.rb
@@ -70,27 +70,25 @@ module SiSU_HTML_Format
make=SiSU_Env::ProcessingSettings.new(@md)
if make.build.ocn?
ocn_class='ocn'
- if @ocn.to_i==0
- @ocn.gsub(/^(\d+|)$/,
- %{<label class="#{ocn_class}"><a name="#{@ocn}">&nbsp;</a></label>})
+ if @ocn.to_i==0 \
+ or @ocn.empty?
+ %{<label class="ocn_off">&nbsp;</label>}
else
@ocn.gsub(/^(\d+|)$/,
%{<label class="#{ocn_class}"><a name="#{@ocn}" href="##{@ocn}" class="lnk#{ocn_class}">\\1</a></label>})
end
else
- ocn_class='ocn_off'
- @ocn.gsub(/^(\d+|)$/,
- %{<label class="#{ocn_class}">&nbsp;</label>})
+ %{<label class="ocn_off">&nbsp;</label>}
end
end
def name
- %{<a name="#{@ocn}"></a>}
+ (@ocn==nil || @ocn.empty?) ? '' : %{<a name="#{@ocn}"></a>}
end
def id #w3c? "tidy" complains about numbers as identifiers ! annoying
- %{id="o#{@ocn}"}
+ (@ocn==nil || @ocn.empty?) ? '' : %{id="o#{@ocn}"}
end
def goto
- %{<a href="##{@ocn}">}
+ (@ocn==nil || @ocn.empty?) ? '' : %{<a href="##{@ocn}">}
end
end
class HeadInformation
@@ -517,15 +515,13 @@ WOK
%{<p class="small_left">Prefix: #{@md.prefix_b}<p />}
end
def scroll_head_title_banner_open
- %{<center>
-#{@md.icon}
-</center>
+ icon=@md.icon ? %{<center>\n#{@md.icon}\n</center>} : ''
+ %{#{icon}
#{@vz.banner_instrument_cover_band_scr}}
end
def seg_head_title_banner_open
- %{<center>
- #{@md.icon}
-</center>
+ icon=@md.icon ? %{<center>\n#{@md.icon}\n</center>} : ''
+ %{#{icon}
#{@vz.banner_instrument_cover_band_seg}}
end
def make_scroll
@@ -619,8 +615,6 @@ WOK
<a name="stop" id="stop"></a>
<a name="credits"></a>
</div>
-</div>
-</div>
}
end
def seg_navigation_tail #this is a bug area, look up and "tidy"
@@ -1029,7 +1023,7 @@ WOK
end
def heading_normal(tag,attrib)
section_break=(tag=~/h[1-4]/) \
- ? '<p><hr width=90% /></p>'
+ ? '<br /><hr width=90% /><br />'
: ''
%{#{section_break}
<div class="substance">