Browse Source

Update to bootstrap 4 beta

Chris Oliver 7 years ago
parent
commit
dbc7671620
3 changed files with 9 additions and 9 deletions
  1. 2 2
      app/assets/stylesheets/announcements.scss
  2. 5 4
      app/views/shared/_navbar.html.erb
  3. 2 3
      template.rb

+ 2 - 2
app/assets/stylesheets/announcements.scss

@@ -1,6 +1,6 @@
 .announcement {
   strong {
-    color: #444;
+    color: $gray-700;
     font-weight: 900;
   }
 }
@@ -12,7 +12,7 @@
   -moz-background-clip: padding-box;
   -webkit-background-clip: padding-box;
   background-clip: padding-box;
-  background: $brand-danger;
+  background: $red;
   content: '';
   display: inline-block;
   height: 8px;

+ 5 - 4
app/views/shared/_navbar.html.erb

@@ -5,14 +5,15 @@
   </div>
 <% end %>
 
-<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
+<nav class="navbar navbar-expand-md navbar-light">
   <div class="container">
-    <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
+    <%= link_to "Spark", root_path, class: "navbar-brand" %>
+
+    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarMain" aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation">
       <span class="navbar-toggler-icon"></span>
     </button>
-    <%= link_to "Spark", root_path, class: "navbar-brand" %>
 
-    <div class="collapse navbar-collapse" id="navbarSupportedContent">
+    <div class="collapse navbar-collapse" id="navbarMain">
       <ul class="navbar-nav mr-auto mt-2 mt-md-0">
       </ul>
 

+ 2 - 3
template.rb

@@ -11,8 +11,7 @@ def add_gems
   gem 'gravatar_image_tag', github: 'mdeering/gravatar_image_tag'
   gem 'jquery-rails', '~> 4.3.1'
   gem 'bootstrap', '~> 4.0.0.alpha6'
-  gem 'rails-assets-tether', '>= 1.3.3', source: 'https://rails-assets.org'
-  gem 'webpacker', '~> 1.1'
+  gem 'webpacker', '~> 3.0'
   gem 'sidekiq', '~> 5.0'
   gem 'foreman', '~> 0.84.0'
 end
@@ -53,7 +52,7 @@ def add_bootstrap
   # Add Bootstrap JS
   insert_into_file(
     "app/assets/javascripts/application.js",
-    "\n//= require jquery\n//= require tether\n//= require bootstrap",
+    "\n//= require jquery\n//= require popper\n//= require bootstrap",
     after: "//= require rails-ujs"
   )
 end