From 680872aafcb49d265051ea31964460ebb4b584f0 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Fri, 21 Jun 2013 08:53:35 +0200 Subject: [PATCH] install bootstrap --- app/assets/javascripts/application.js | 1 + app/assets/javascripts/bootstrap.js.coffee | 4 +++ app/assets/stylesheets/application.css | 1 + .../bootstrap_and_overrides.css.less | 30 +++++++++++++++++++ config/locales/en.bootstrap.yml | 18 +++++++++++ 5 files changed, 54 insertions(+) create mode 100644 app/assets/javascripts/bootstrap.js.coffee create mode 100644 app/assets/stylesheets/bootstrap_and_overrides.css.less create mode 100644 config/locales/en.bootstrap.yml diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index edb3f334..d967bad9 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,6 +12,7 @@ // //= require jquery //= require jquery_ujs +//= require twitter/bootstrap //= require mousetrap // Stuff in app/assets diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee new file mode 100644 index 00000000..c9404a8e --- /dev/null +++ b/app/assets/javascripts/bootstrap.js.coffee @@ -0,0 +1,4 @@ +jQuery -> + $("a[rel=popover]").popover() + $(".tooltip").tooltip() + $("a[rel=tooltip]").tooltip() \ No newline at end of file diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 865245e4..b14f486e 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -9,6 +9,7 @@ * compiled file, but it's generally better to create a new file per style scope. * *= require_self + *= require bootstrap_and_overrides *= require mousetrap *= require_tree ../../../vendor/assets/stylesheets *= require tracks diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less new file mode 100644 index 00000000..0729ddbf --- /dev/null +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -0,0 +1,30 @@ +@import "twitter/bootstrap/bootstrap"; +@import "twitter/bootstrap/responsive"; + +// Set the correct sprite paths +@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings"); +@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white"); + +// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) +@fontAwesomeEotPath: asset-url("fontawesome-webfont.eot"); +@fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot#iefix"); +@fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff"); +@fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf"); +@fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular"); + +// Font Awesome +@import "fontawesome/font-awesome"; + +// Glyphicons +//@import "twitter/bootstrap/sprites.less"; + +// Your custom LESS stylesheets goes here +// +// Since bootstrap was imported above you have access to its mixins which +// you may use and inherit here +// +// If you'd like to override bootstrap's own variables, you can do so here as well +// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation +// +// Example: +// @linkColor: #ff0000; diff --git a/config/locales/en.bootstrap.yml b/config/locales/en.bootstrap.yml new file mode 100644 index 00000000..664de2b2 --- /dev/null +++ b/config/locales/en.bootstrap.yml @@ -0,0 +1,18 @@ +# 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: + helpers: + actions: "Actions" + links: + back: "Back" + cancel: "Cancel" + confirm: "Are you sure?" + destroy: "Delete" + new: "New" + edit: "Edit" + titles: + edit: "Edit" + save: "Save" + new: "New" + delete: "Delete"