SUSE/hackweek

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

Summary

Maintainability
Test Coverage
%html{:xmlns => "http://www.w3.org/1999/html"}
  %head
    %title
      - if @project
        SUSE Hack Week:
        = @project.title
      -else
        SUSE Hack Week
    %meta{:charset=> "utf-8"}
    %meta{:name => "viewport", :content =>"width=device-width, initial-scale=1.0"}
    = favicon_link_tag 'favicon.gif'
    = stylesheet_link_tag "application", :media => "all"
    %meta{:property => "og:site_name", :content => "SUSE Hack Week"}
    %meta{:property => "og:image", :content => "#{ image_url('hackweek-label-small.png', host: 'https://hackweek.opensuse.org') }" }
    - if @project
      %meta{ :property => "og:description", :content => "A SUSE #{@episode.try(:name)} Project" }
      %meta{:property => "og:title", :content => "#{ @project.title }"}
    -else
      %meta{:property => "og:description", :content => "Hack Week is the time SUSE employees and openSUSE community members experiment, innovate & learn interruption-free for a whole week."}
    = javascript_include_tag "application"
    = csrf_meta_tags
  %body
    = render :partial => "layouts/header"
    .container
      %div#loader
      #content
        - if flash
          #flash
            = render partial: "layouts/alert", flash: flash
        - if @news
          = render partial: "layouts/news"
        = yield
    = render :partial => "layouts/footer"

    = render :partial => "layouts/scripts" if Rails.env.production?
    = yield :script

    .modal.fade#modal{ role: :dialog, aria_hidden: true }
      .modal-dialog
        .modal-content
          .modal-header#modal-header
          .modal-body#modal-body
          .modal-footer
            %button.btn.btn-default{ type: :button, data:{ dismiss: :modal }} Close