Last active
August 29, 2015 14:06
-
-
Save isaiah/45021105ea1093a173b7 to your computer and use it in GitHub Desktop.
Bootsrap haml navbar & fixed footer layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "bootstrap-sprockets"; | |
@import "bootstrap"; | |
/* Sticky footer styles | |
-------------------------------------------------- */ | |
html { | |
position: relative; | |
min-height: 100%; | |
} | |
body { | |
/* Margin bottom by footer height */ | |
margin-bottom: 60px; | |
} | |
.footer { | |
position: absolute; | |
bottom: 0; | |
width: 100%; | |
/* Set the fixed height of the footer here */ | |
height: 60px; | |
background-color: #f5f5f5; | |
} | |
/* Custom page CSS | |
-------------------------------------------------- */ | |
/* Not required for template or sticky footer method. */ | |
body > .container { | |
padding: 60px 15px 0; | |
} | |
.container .text-muted { | |
margin: 20px 0; | |
} | |
.footer > .container { | |
padding-right: 15px; | |
padding-left: 15px; | |
} | |
code { | |
font-size: 80%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! | |
%html | |
%head | |
%title Jobhunter | |
%meta(charset="utf-8") | |
%meta(http-equiv="X-UA-Compatible" content="IE=edge") | |
%meta(name="viewport" content="width=device-width, initial-scale=1") | |
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true | |
= javascript_include_tag 'application', 'data-turbolinks-track' => true | |
= csrf_meta_tags | |
/ HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries | |
/ WARNING: Respond.js doesn't work if you view the page via file:// | |
/ [if lt IE 9] | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
%body | |
<!-- Fixed navbar --> | |
.navbar.navbar-default.navbar-fixed-top(rol="navigation") | |
.container | |
.navbar-header | |
%button.navbar-toggle.collapsed(type='button' data-toggle='collapse' data-target='.navbar-collapse') | |
%span.sr-only Toggle navigation | |
%span.icon-bar | |
%span.icon-bar | |
%span.icon-bar | |
%a.navbar-brand(href="#") Job Hunting | |
.collapse.navbar-collapse | |
%ul.nav.navbar-nav | |
%li.active | |
%a(href="#") Home | |
%li.dropdown | |
%a.dropdown-toggle(href="#" data-toggle="dropdown") | |
Dropdown | |
%span.caret | |
%ul.dropdown-menu(role="menu") | |
%li | |
%a(href="#") Action | |
%li | |
%a(href="#") Another Action | |
%li.divider | |
%li.dropdown-header Nav header | |
%li | |
%a(href="#") Separated link | |
<!-- Begin page content --> | |
.container | |
.page-header | |
%h1 Job Hunter | |
= yield | |
.footer | |
.container | |
%p.text-muted © 2014 Isaiah Peng |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'react-rails', '~> 1.0.0.pre', github: 'reactjs/react-rails' | |
gem 'haml-rails' | |
gem 'bootstrap-sass' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.2.0.beta1' | |
# Use postgresql as the database for Active Record | |
gem 'pg' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 5.0.0.beta1' | |
# Use Uglifier as compressor for JavaScript assets | |
gem 'uglifier', '>= 1.3.0' | |
# Use CoffeeScript for .js.coffee assets and views | |
gem 'coffee-rails', '~> 4.0.0' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | |
# gem 'therubyracer', platforms: :ruby | |
# Use jquery as the JavaScript library | |
gem 'jquery-rails' | |
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks | |
gem 'turbolinks' | |
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | |
gem 'jbuilder', '~> 2.0' | |
# bundle exec rake doc:rails generates the API under doc/api. | |
gem 'sdoc', '~> 0.4.0', group: :doc | |
# Use ActiveModel has_secure_password | |
# gem 'bcrypt', '~> 3.1.7' | |
# Use Rails Html Sanitizer for HTML sanitization | |
gem 'rails-html-sanitizer', '~> 1.0' | |
# Use Unicorn as the app server | |
gem 'unicorn' | |
# Use Capistrano for deployment | |
# gem 'capistrano-rails', group: :development | |
group :development, :test do | |
# Call 'debugger' anywhere in the code to stop execution and get a debugger console | |
gem 'byebug' | |
# Access an IRB console on exceptions page and /console in development | |
gem 'web-console', '~> 2.0.0.beta2' | |
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | |
gem 'spring' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment