-#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
-#   licensed under the Affero General Public License version 3 or later.  See
-#   the COPYRIGHT file.

!!!
%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'}
  %head
    %meta{:charset => 'utf-8'}
    %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}

    %meta{:name => "description", :content => "Diaspora*"}
    %meta{:name => "author", :content => "Diaspora, Inc."}

    %meta{:name => "HandheldFriendly", :content => "True"}
    %meta{:name => "MobileOptimized", :content => "320"}
    %meta{:name => "viewport", :content => "initial-scale=1, maximum-scale=1"}

    %link{:rel => 'shortcut icon', :href => "#{image_path('favicon.png')}" }
    %link{:rel => 'apple-touch-icon', :href => "#{image_path('apple-touch-icon.png')}"}

    = og_site_name
    = chartbeat_head_block
    = include_mixpanel

    %title
      = page_title yield(:page_title)

    = include_base_css_framework(:bootstrap)
    = stylesheet_link_tag :default, 'new-templates', :media => 'all'

    - if rtl?
      = stylesheet_link_tag :rtl, :media => 'all'

    = old_browser_js_support
    <!--[if IE]>
    = javascript_include_tag :ie
    <![endif]-->

    = jquery_include_tag

    = set_current_user_in_javascript

    - unless @landing_page
      = javascript_include_tag :main, :templates
      = load_javascript_locales

    = set_asset_host
    = translation_missing_warnings
    = current_user_atom_tag

    - if @post.present?
      %link{:rel => 'alternate', :type => "application/json+oembed", :href => "#{oembed_url(:url => post_url(@post))}"}
      = og_page_specific_tags(@post)

    = yield(:head)
    = csrf_meta_tag

    = include_gon(:camel_case => true, :namespace => :preloads)

  %body
    = flash_messages
    #container
    = yield


    = include_chartbeat
    = include_mixpanel_guid
