From 50cd123935c8f0c7e2d812a5d4bf9a6e1c9d0030 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Wed, 17 Sep 2014 12:42:37 +0300 Subject: [PATCH] Introduce bootstrap-sass and extras --- Gemfile | 4 +++ Gemfile.lock | 9 +++++++ app/assets/javascripts/application.js | 2 +- .../javascripts/management/application.js | 3 +++ .../management/application.css.scss | 5 ++++ .../stylesheets/management/navbar.css.scss | 3 +++ app/views/layouts/management.html.slim | 27 +++++++++++++++++++ config/initializers/assets.rb | 2 +- 8 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 app/assets/javascripts/management/application.js create mode 100644 app/assets/stylesheets/management/application.css.scss create mode 100644 app/assets/stylesheets/management/navbar.css.scss create mode 100644 app/views/layouts/management.html.slim diff --git a/Gemfile b/Gemfile index 10d52dc..9a105bd 100644 --- a/Gemfile +++ b/Gemfile @@ -37,6 +37,10 @@ gem 'puma' gem 'globalize', '~> 4.0.2' +gem 'bootstrap-sass' +gem 'bootstrap-sass-extras' +gem 'autoprefixer-rails' + group :development do gem 'spring' gem 'spring-commands-rspec' diff --git a/Gemfile.lock b/Gemfile.lock index 24c19a2..97a2743 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,7 +37,13 @@ GEM thread_safe (~> 0.1) tzinfo (~> 1.1) arel (5.0.1.20140414130214) + autoprefixer-rails (3.1.0.20140911) + execjs bcrypt (3.1.7) + bootstrap-sass (3.2.0.2) + sass (~> 3.2) + bootstrap-sass-extras (0.0.6) + rails (>= 3.1.0) builder (3.2.2) capistrano (3.2.1) i18n @@ -261,6 +267,9 @@ PLATFORMS ruby DEPENDENCIES + autoprefixer-rails + bootstrap-sass + bootstrap-sass-extras capistrano capistrano-rails capistrano-rvm diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 1ca0e3b..af0d871 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,4 +12,4 @@ // //= require jquery //= require jquery_ujs -//= require_tree . +//= require_directory . diff --git a/app/assets/javascripts/management/application.js b/app/assets/javascripts/management/application.js new file mode 100644 index 0000000..d9c80b0 --- /dev/null +++ b/app/assets/javascripts/management/application.js @@ -0,0 +1,3 @@ +//= require jquery +//= require jquery_ujs +//= require bootstrap-sprockets diff --git a/app/assets/stylesheets/management/application.css.scss b/app/assets/stylesheets/management/application.css.scss new file mode 100644 index 0000000..2721681 --- /dev/null +++ b/app/assets/stylesheets/management/application.css.scss @@ -0,0 +1,5 @@ +//= require_directory . + +@import "bootstrap-sprockets"; +@import "bootstrap"; +@import "bootstrap/theme"; diff --git a/app/assets/stylesheets/management/navbar.css.scss b/app/assets/stylesheets/management/navbar.css.scss new file mode 100644 index 0000000..e2b26c5 --- /dev/null +++ b/app/assets/stylesheets/management/navbar.css.scss @@ -0,0 +1,3 @@ +body { + padding-top: 70px; +} diff --git a/app/views/layouts/management.html.slim b/app/views/layouts/management.html.slim new file mode 100644 index 0000000..be1a419 --- /dev/null +++ b/app/views/layouts/management.html.slim @@ -0,0 +1,27 @@ +doctype html + +html + head + meta charset="utf-8" + meta http-equiv="X-UA-Compatible" content="IE=edge" + meta name="viewport" content="width=device-width, initial-scale=1" + title "Clarion" + = stylesheet_link_tag "management/application" + = csrf_meta_tags + body + nav.navbar.navbar-default.navbar-fixed-top + .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 + = link_to 'Clarion', root_path, class: 'navbar-brand' + .navbar-collapse.collapse + ul.nav.navbar-nav + li.active = link_to 'Home', root_path + li = link_to 'Users', root_path + div.container + == yield + = javascript_include_tag "management/application" diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index d2f4ec3..1364a3b 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -5,4 +5,4 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -# Rails.application.config.assets.precompile += %w( search.js ) +Rails.application.config.assets.precompile += %w( management/application.css management/application.js )