hacken-in/hacken-in

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

Summary

Maintainability
Test Coverage
!!! 5
%html
  %head{"data-current-revision" => "#{Rails.configuration.x.current_revision}"}

    %title= content_for?(:title) ? yield(:title) + " – " + sitename : sitename
    = stylesheet_link_tag "application"
    = csrf_meta_tags
    - if content_for?(:opengraph)
      = yield(:opengraph)
    = render_opengraph("og:title" => content_for?(:title) ? yield(:title) + " – hacken.in" : "hacken.in",
          "og:url" => url_for(only_path: false),
          "og:site_name"=> "hacken.in",
          "fb:admins" => "520869354",
          "og:type" => "website",
          "og:description" => "Der Event-Kalender für Nerds")
    %meta{ name: "viewport", content: "width=device-width, initial-scale=1.0" }

    = favicon_link_tag('logo/hacken_in-100.png', rel: 'icon', type:'image/png', sizes:'100x100')
    = favicon_link_tag('logo/hacken_in-500.png', rel: 'icon', type:'image/png', sizes:'500x500')
    = favicon_link_tag('logo/hacken_in-apple-touch-icon-76x76.png', rel: 'apple-touch-icon', type:'image/png', sizes:'76x76')
    = favicon_link_tag('logo/hacken_in-apple-touch-icon-120x120.png', rel: 'apple-touch-icon', type:'image/png', sizes:'120x120')
    = favicon_link_tag('logo/hacken_in-apple-touch-icon-152x152.png', rel: 'apple-touch-icon', type:'image/png', sizes:'152x152')
    = javascript_include_tag "application"

  %body{:class => "#{controller.controller_name}_#{controller.action_name}" }
    .off-canvas-wrap{"data-offcanvas" => true}
      .inner-wrap
        %a.exit-off-canvas
        = render 'modules/common/topbar'
        = render 'modules/common/ical_popup'

        - if privacy_mode?
          .alert-box.alert{data: {alert: true}}
            = t("common.privacy_alert")
            = link_to t("common.privacy_alert_more"), privacy_settings_path

        .row
          = render 'modules/common/flash'
          %section.main= yield
          = render 'modules/common/sidebar'