aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-24 16:48:44 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-24 16:52:41 -0400
commited1a104164b53dba74a2220ae99fea52ae8ff77e (patch)
tree27de17d6a4c6c3a3bfd4a2fc81f742cea6f7bde1 /lib/sisu/v2/html.rb
parenthtml segments, title banner (including "copy @" mark) configurable, boolean (diff)
html, quick ref links_guide configurable, boolean
* true/false (config.yml commented out, default false) (requested off option, Daniel Baumann)
Diffstat (limited to 'lib/sisu/v2/html.rb')
-rw-r--r--lib/sisu/v2/html.rb36
1 files changed, 20 insertions, 16 deletions
diff --git a/lib/sisu/v2/html.rb b/lib/sisu/v2/html.rb
index 04406e48..c984a858 100644
--- a/lib/sisu/v2/html.rb
+++ b/lib/sisu/v2/html.rb
@@ -162,29 +162,33 @@ module SiSU_HTML
@links_guide_toc=[]
def initialize(data,md)
@data,@md=data,md
+ @links_guide_=SiSU_Env::Create_site.new(@md.cmd).html_quick_ref?
end
def toc
@links_guide_toc=[]
- format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
- guide_type='horzontal' #values: horizontal or vertical
- @links_guide_toc << format_head_toc.links_guide_open(guide_type)
- if defined? @md.lnk \
- and @md.lnk
- @md.lnk.each do |l|
- if defined? l[:say]
- target=if l[:url] !~/^\.(\.)?\//; 'external'
- else '_top'
+ if @links_guide_
+ format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
+ guide_type='horzontal' #values: horizontal or vertical
+ @links_guide_toc << format_head_toc.links_guide_open(guide_type)
+ if defined? @md.lnk \
+ and @md.lnk
+ @md.lnk.each do |l|
+ if defined? l[:say]
+ target=if l[:url] !~/^\.(\.)?\//; 'external'
+ else '_top'
+ end
+ 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::Format_toc.new(@md,txt_obj)
+ @links_guide_toc << lev_dob_ocn.links_guide if s_lnk_lnk
end
- 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::Format_toc.new(@md,txt_obj)
- @links_guide_toc << lev_dob_ocn.links_guide if s_lnk_lnk
end
end
+ format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
+ @links_guide_toc << format_head_toc.links_guide_close #(guide_type)
+ @links_guide_toc
+ else ''
end
- format_head_toc=SiSU_HTML_Format::Head_toc.new(@md)
- @links_guide_toc << format_head_toc.links_guide_close #(guide_type)
- @links_guide_toc
end
end
class Endnotes