aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/html.rb
diff options
context:
space:
mode:
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