assemblymade/coderwall

View on GitHub
app/views/layouts/application.html.slim

Summary

Maintainability
Test Coverage
doctype html
html.no-js lang=I18n.locale
  head
    title= page_title(yield(:page_title))
    link rel= 'author' href= '/humans.txt'
    meta name="viewport" content="initial-scale=1.0,width=device-width"
    - if Rails.env.production?
      = render 'mixpanel'
      = render 'analytics'
    = render 'fav_icons'
    = stylesheet_link_tag 'coderwall'
    = csrf_meta_tag

    meta content= page_description(yield(:page_description)) name= 'description'  property= 'og:description'
    meta content= page_keywords(yield(:page_keywords))  name= 'keywords'

    meta name= 'twitter:account_id'  content= ENV['TWITTER_ACCOUNT_ID']
    = metamagic

    = yield :head

  body id=yield(:body_id)
    = render partial: 'nav_bar'
    #main-content
      - if main_content_wrapper(yield(:content_wrapper))
        - if flash[:notice] || flash[:error]
          .notification-bar
            .notification-bar-inside class=(flash[:error].blank? ? 'notice' : 'error')
              p= flash[:notice] || flash[:error]
              =link_to '/', class: 'close-notification remove-parent', 'data-parent' => 'notification-bar'
                span Close
        = yield :top_of_main_content
        .inside-main-content.cf= yield
      - else
        = yield
    = render 'footer'
    = render 'current_user_js'