out render :partial => "header"

out render_component :action => "sidebar"

out render_component :action => "main_menu"

div(:id => "display_area") do
  div(:id => "message_area", :style => "display: none") {}
  
  div(:id => "tiddler_display") do
    # tiddler.id == nil => NotFound
    # tiddler.id == 0   => NewTiddler
    # tiddler.id > 0    => normal tiddlers
    
    # NewTiddler
    tiddler = Tiddler.new(:title => "", :content => "", :autolink => true)
    tiddler.id = 0
    out render :partial => "tiddler", :locals => { :tiddler => tiddler }
    
    if @tag
      # tag permalink
      out render :partial => "tag"
    elsif @search
      # search permalink
      out render :partial => "search"
    else
      # default index or tiddler permalink
      cache :action => "index", :title => @title do
        out render :partial => "tiddler", :locals => { :tiddler => @start_here }
      end
    end
  end
end

noscript do
  div.javascript_warning do
    _("javascript_warning")
  end
end

div(:id => "tiddler_template", :style => "display: none") do
  out render :partial => "tiddler_template"
end

div(:id => "tag_template", :style => "display: none") do
  out render :partial => "tag_template"
end

div(:id => "search_template", :style => "display: none") do
  out render :partial => "search_template"
end
