From 1f6e74785e9e325847fe046128079921b87aa6e6 Mon Sep 17 00:00:00 2001 From: Philipp Fischbeck Date: Sun, 7 Dec 2014 18:16:52 +0100 Subject: [PATCH] Add bootstrap --- Gemfile | 2 ++ Gemfile.lock | 6 +++++ app/assets/javascripts/application.js | 1 + app/assets/javascripts/bootstrap.js.coffee | 3 +++ .../stylesheets/bootstrap_and_overrides.css | 7 ++++++ config/locales/en.bootstrap.yml | 23 +++++++++++++++++++ 6 files changed, 42 insertions(+) create mode 100644 app/assets/javascripts/bootstrap.js.coffee create mode 100644 app/assets/stylesheets/bootstrap_and_overrides.css create mode 100644 config/locales/en.bootstrap.yml diff --git a/Gemfile b/Gemfile index 0e664df..195e893 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,8 @@ gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc +gem 'twitter-bootstrap-rails' + # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' diff --git a/Gemfile.lock b/Gemfile.lock index e5a9ce9..d6a59ae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,6 +97,11 @@ GEM tilt (1.4.1) turbolinks (2.5.2) coffee-rails + twitter-bootstrap-rails (3.2.0) + actionpack (~> 4.1) + execjs (~> 2.2) + rails (~> 4.1) + railties (~> 4.1) tzinfo (1.2.2) thread_safe (~> 0.1) tzinfo-data (1.2014.10) @@ -117,5 +122,6 @@ DEPENDENCIES sdoc (~> 0.4.0) sqlite3 turbolinks + twitter-bootstrap-rails tzinfo-data uglifier (>= 1.3.0) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index d6925fa..3885622 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,5 +12,6 @@ // //= require jquery //= require jquery_ujs +//= require twitter/bootstrap //= require turbolinks //= require_tree . diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee new file mode 100644 index 0000000..9440679 --- /dev/null +++ b/app/assets/javascripts/bootstrap.js.coffee @@ -0,0 +1,3 @@ +jQuery -> + $("a[rel~=popover], .has-popover").popover() + $("a[rel~=tooltip], .has-tooltip").tooltip() diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css b/app/assets/stylesheets/bootstrap_and_overrides.css new file mode 100644 index 0000000..131fcfd --- /dev/null +++ b/app/assets/stylesheets/bootstrap_and_overrides.css @@ -0,0 +1,7 @@ +/* + =require twitter-bootstrap-static/bootstrap + + Use Font Awesome icons (default) + To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites" + =require twitter-bootstrap-static/fontawesome + */ \ No newline at end of file diff --git a/config/locales/en.bootstrap.yml b/config/locales/en.bootstrap.yml new file mode 100644 index 0000000..8d75119 --- /dev/null +++ b/config/locales/en.bootstrap.yml @@ -0,0 +1,23 @@ +# Sample localization file for English. Add more files in this directory for other locales. +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. + +en: + breadcrumbs: + application: + root: "Index" + pages: + pages: "Pages" + helpers: + actions: "Actions" + links: + back: "Back" + cancel: "Cancel" + confirm: "Are you sure?" + destroy: "Delete" + new: "New" + edit: "Edit" + titles: + edit: "Edit %{model}" + save: "Save %{model}" + new: "New %{model}" + delete: "Delete %{model}"