Loading lib/jsduck/app.rb +1 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ module JsDuck html.gsub!("{extjs_path}", @opts.extjs_path) html.gsub!("{local_storage_db}", @opts.local_storage_db) html.gsub!("{categories}", @categories.to_html) html.gsub!("{guides}", @guides.to_html) html.gsub!("{head_html}", @opts.head_html) html.gsub!("{body_html}", @opts.body_html) FileUtils.rm(@opts.output_dir+"/template.html") Loading lib/jsduck/guides.rb +19 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,25 @@ module JsDuck @guides end # Returns HTML listing of guides def to_html return "" if @guides.length == 0 html = @guides.map do |group| [ "<h3>#{group['title']}</h3>", "<ul>", group["items"].map {|g| "<li><a href='#!/guide/#{g['name']}'>#{g['title']}</a></li>" }, "</ul>", ] end.flatten.join("\n") return <<-EOHTML <div id='guides-content' style='display:none'> #{html} </div> EOHTML end end end template/template.html +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ </form> {categories} {guides} {footer} {body_html} Loading Loading
lib/jsduck/app.rb +1 −0 Original line number Diff line number Diff line Loading @@ -223,6 +223,7 @@ module JsDuck html.gsub!("{extjs_path}", @opts.extjs_path) html.gsub!("{local_storage_db}", @opts.local_storage_db) html.gsub!("{categories}", @categories.to_html) html.gsub!("{guides}", @guides.to_html) html.gsub!("{head_html}", @opts.head_html) html.gsub!("{body_html}", @opts.body_html) FileUtils.rm(@opts.output_dir+"/template.html") Loading
lib/jsduck/guides.rb +19 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,25 @@ module JsDuck @guides end # Returns HTML listing of guides def to_html return "" if @guides.length == 0 html = @guides.map do |group| [ "<h3>#{group['title']}</h3>", "<ul>", group["items"].map {|g| "<li><a href='#!/guide/#{g['name']}'>#{g['title']}</a></li>" }, "</ul>", ] end.flatten.join("\n") return <<-EOHTML <div id='guides-content' style='display:none'> #{html} </div> EOHTML end end end
template/template.html +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ </form> {categories} {guides} {footer} {body_html} Loading