Browse Source

Adds Bootstrap JS and some CSS examples

Jason Charnes 7 years ago
parent
commit
caac59fcdc
2 changed files with 14 additions and 3 deletions
  1. 5 2
      app/assets/stylesheets/application.scss
  2. 9 1
      template.rb

+ 5 - 2
app/assets/stylesheets/application.scss

@@ -1,4 +1,7 @@
+// $navbar-default-bg: #312312;
+// $light-orange: #ff8c00;
+// $navbar-default-color: $light-orange;
+
 @import "bootstrap-sprockets";
 @import "bootstrap";
-
-// Examples...
+// @import "home";

+ 9 - 1
template.rb

@@ -25,10 +25,18 @@ def add_users
 end
 
 def add_bootstrap
+  gem 'jquery-rails', '~> 4.3.1'
   gem 'bootstrap-sass', '~> 3.3.6'
 
-  # Replace Application SCSS
+  # Remove Application CSS
   run "rm app/assets/stylesheets/application.css"
+
+  # Add Bootstrap JS
+  insert_into_file(
+    "app/assets/javascripts/application.js",
+    "\n//= require jquery\n//= require bootstrap",
+    after: "//= require rails-ujs"
+  )
 end
 
 def copy_templates