diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
commit | 1beb5aa3c376dbef89bc33024216650529ef7262 (patch) | |
tree | 1682500089c14fd49bcf52a3a001e291fadd5f75 /lib/sisu/v3/html.rb | |
parent | debian/changelog (3.3.2-1) (diff) | |
parent | v3: 3.3.3 version & changelog, dates touched (diff) |
Merge tag 'sisu_3.3.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/html.rb')
-rw-r--r-- | lib/sisu/v3/html.rb | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/sisu/v3/html.rb b/lib/sisu/v3/html.rb index 100916ff..132394d6 100644 --- a/lib/sisu/v3/html.rb +++ b/lib/sisu/v3/html.rb @@ -90,9 +90,9 @@ module SiSU_HTML @env=@particulars.env loc=@env.url.output_tell unless @opt.cmd =~/q/ - tool=if @opt.cmd =~/[MVvz]/; "#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}" - else "[#{@opt.f_pth[:lng_is]}] #{@opt.fno}" - end + tool=(@opt.cmd =~/[MVvz]/) \ + ? ("#{@env.program.web_browser} file://#{@md.file.output_path.html_seg.dir}/#{@md.file.base_filename.html_segtoc}") + : ("[#{@opt.f_pth[:lng_is]}] #{@opt.fno}") @opt.cmd=~/[MVvz]/ \ ? SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_hi_blue : SiSU_Screen::Ansi.new(@opt.cmd,'HTML',tool).green_title_hi @@ -167,9 +167,9 @@ module SiSU_HTML and @md.lnk @md.lnk.each do |l| if defined? l[:say] - target=if l[:url] !~/^\.(\.)?\//; 'external' - else '_top' - end + target=(l[:url] !~/^\.(\.)?\//) \ + ? 'external' + : '_top' s_lnk_url,s_lnk_lnk=l[:url],l[:say] txt_obj={ lnk_url: s_lnk_url, lnk_txt: s_lnk_lnk, target: target } lev_dob_ocn=SiSU_HTML_Format::FormatToc.new(@md,txt_obj) @@ -321,7 +321,7 @@ WOK and link !~/#/ #% keep eye on link p_num=SiSU_HTML_Format::ParagraphNumber.new(@md,link) end - title=if dob.obj !~/Metadata/; linkname + title=if dob.obj !~/Metadata/ then linkname else link='metadata' %{<b><a href="#{link}#{@md.lang_code_insert}#{Sfx[:html]}">#{linkname}</a></b>} @@ -350,9 +350,9 @@ WOK end else @@toc[:scr] << '<br />' - link=if dob.ln; dob.ln - else '' - end + link=(dob.ln) \ + ? dob.ln + : '' %{<b><a href="##{link}">#{linkname}</a></b>} end txt_obj={ txt: title } @@ -528,8 +528,6 @@ WOK ads=SiSU_HTML_Promo::Ad.new(@md) toc_shared << dochead << ads.div.major @segtoc << format_head_toc.head << ads.div.major - toc_shared << format_head_toc.toc_head_escript if SiSU_HTML_Format::HeadToc.method_defined? :toc_head_escript - @segtoc << format_head_toc.toc_head_escript if SiSU_HTML_Format::HeadToc.method_defined? :toc_head_escript if @make.build.html_top_band? toc_shared << format_head_toc.scroll_head_navigation_band end @@ -609,8 +607,7 @@ WOK end def publish scroll=[] - hr='<center><hr width=90% /></center>' - scroll << @scr_toc << '<div class="scroll">' << hr << @scr_body << @scr_endnotes << hr << @scr_owner_details << '</div>' << @scr_tails + scroll << @scr_toc << '<div class="scroll">' << @scr_body << @scr_endnotes << @scr_owner_details << '</div>' << @scr_tails scroll=scroll.flatten.compact #watch end end |