Skip to content

Commit

Permalink
#16 hq namespace base layout added
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdilek committed Sep 5, 2013
1 parent f954448 commit b39c20a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 20 deletions.
12 changes: 12 additions & 0 deletions app/helpers/view_helpers.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module ViewHelpers
def page(title, id)
@page_id = id
content_for :title do
title
end
end

def launcher_active(page)
@page_id == page ? {class:'active'} : {}
end
end
71 changes: 51 additions & 20 deletions app/views/layouts/hq/base.html.haml
Original file line number Diff line number Diff line change
@@ -1,21 +1,52 @@
!!!
%html
!!! 5
/[if IE 8] <html class="no-js lt-ie10 lt-ie9" lang="en-us">
/[if IE 9] <html class="no-js lt-ie10 lt-ie9" lang="en-us">
/[if lt IE 10] <html class="no-js lt-ie10" lang="en-us">
%html{lang: 'en', class: 'no-js'}
%head
%title yakut
= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
= javascript_include_tag "application", "data-turbolinks-track" => true
= csrf_meta_tags
%body
.container-narrow
.masthead
%ul.nav.nav-pills.pull-right
%li.active
%a{:href => "/"} Home
%li
%a{:href => "/rails/routes"} Routes
%h3.muted= link_to "yakut", root_path
%hr/
= yield
%hr/
.footer
%p © Company 2013
%title= yield :title
%meta(http-equiv="content-type" content="text/html" charset="utf-8")
%meta(http-equiv="x-ua-compatible" content="ie=edge,chrome=1")
%meta(name="description" content="")
%meta(name="author" content="")
%meta{content: 'initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width', name: 'viewport'}
%meta(name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)")
%meta(name='apple-mobile-web-app-capable' content='yes')
%meta(name='apple-mobile-web-app-status-bar-style' content='translucent-black')

%link(rel="shortcut icon" href="/assets/images/favicon.ico")
%link(rel="apple-touch-icon-precomposed" href="/assets/images/apple-touch-icon-precomposed.png")
%link(rel="apple-touch-icon-precomposed" sizes="57x57" href="/assets/images/apple-touch-icon-57x57-precomposed.png")
%link(rel="apple-touch-icon-precomposed" sizes="72x72" href="/assets/images/apple-touch-icon-72x72-precomposed.png")
%link(rel="apple-touch-icon-precomposed" sizes="114x114" href="/assets/images/apple-touch-icon-114x114-precomposed.png")

/ Stylesheets (Don't change include order)
= stylesheet_link_tag 'application',
'//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.css'
= yield :head

%body.main{class: @page || 'page'}

/ Navbar
= render partial: 'layouts/partials/navbar'

#wrapper

/ Sidebar
%section#sidebar
= render partial: 'layouts/partials/dock'

/ Tools
%section#tools
= render partial: 'layouts/partials/breadcrumb'
= render partial: 'layouts/partials/toolbar'

/ Content
#content
= yield

/ Footer
= render partial: 'layouts/partials/footer'

/ Google Analytics
= render partial: 'layouts/partials/trackers'

0 comments on commit b39c20a

Please sign in to comment.