From b792308a4c5c8239fe129851b2b8512abb559af4 Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Wed, 8 Nov 2023 15:41:00 -0600 Subject: [PATCH] Stop bundling bootstrap Just use the CDN instead --- app/assets/stylesheets/application.sass.scss | 15 +++++---- .../stylesheets/bootstrap-variables.scss | 16 ---------- .../stylesheets/modules/top-navbar.scss | 32 +++---------------- app/views/layouts/application.html.erb | 1 + app/views/shared/_top_navbar.html.erb | 4 +-- package.json | 1 - yarn.lock | 5 --- 7 files changed, 16 insertions(+), 58 deletions(-) delete mode 100644 app/assets/stylesheets/bootstrap-variables.scss diff --git a/app/assets/stylesheets/application.sass.scss b/app/assets/stylesheets/application.sass.scss index c3ddffab..f7332395 100644 --- a/app/assets/stylesheets/application.sass.scss +++ b/app/assets/stylesheets/application.sass.scss @@ -6,18 +6,21 @@ $color-cardinal-red: #8c1515; $gray-41-percent: #696969; $sul-footer-bg-color: #f2f1eb; -$sul-topnavbar-link-color: $color-cardinal-red; $sul-link-color-border: #b6b1a9; -$sul-body-bg: #fbfbf9; -$sul-text-color: #000; - $sul-h1-font-color: #3f3c30; $sul-h2-border-color: #e3dfd5; $sul-shadow-color: rgba(0, 0, 0, .2); -@import 'bootstrap-variables'; +:root { +--bs-link-color: #000; +--bs-link-hover-color: #000; +--bs-body-bg: fbfbf9; +} + +h1, h2 { + font-weight: 300; +} -@import 'bootstrap/scss/bootstrap'; @import 'base'; @import 'layout'; diff --git a/app/assets/stylesheets/bootstrap-variables.scss b/app/assets/stylesheets/bootstrap-variables.scss deleted file mode 100644 index d66846c6..00000000 --- a/app/assets/stylesheets/bootstrap-variables.scss +++ /dev/null @@ -1,16 +0,0 @@ -// Override Bootstrap variables here - -// Body -$body-bg: $sul-body-bg; - -// Text / Links -$text-color: $sul-text-color; -$link-color: $sul-text-color; -$link-hover-color: $sul-text-color; - -// Colors -$primary: $color-cardinal-red; -$component-active-bg: #80bdff; - -// Typography -$headings-font-weight: 300; diff --git a/app/assets/stylesheets/modules/top-navbar.scss b/app/assets/stylesheets/modules/top-navbar.scss index 2cc409b4..ceaee0d2 100644 --- a/app/assets/stylesheets/modules/top-navbar.scss +++ b/app/assets/stylesheets/modules/top-navbar.scss @@ -4,37 +4,13 @@ } #topnav { - @extend .row; border: none; background: none; margin-bottom: 0; - padding: 2px 0; - - .header-links { - @extend .col-1; - margin-left: auto; - margin-top: 2px; - a { - font-weight: normal; - margin-left: 15px; - padding-bottom: 3px; - color: $sul-topnavbar-link-color; - border-bottom: none; - &.first { - margin-left: 0; - } - } - a:hover { - border-bottom: 3px solid $sul-topnavbar-link-color; - } - } - -} + padding: 2px 10px; + width: 100%; -@include media-breakpoint-down(xs) { - #topnav { - padding-left: 10px; - padding-right: 10px; - width: 100%; + & > a { + border: none; } } diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d0dad93f..8001db7f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,6 +8,7 @@ Stacks <%= favicon_link_tag 'favicon.ico' %> + <%= stylesheet_link_tag "application" %> <%= stylesheet_link_tag "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700" %> diff --git a/app/views/shared/_top_navbar.html.erb b/app/views/shared/_top_navbar.html.erb index 133be0ab..e1306ccd 100644 --- a/app/views/shared/_top_navbar.html.erb +++ b/app/views/shared/_top_navbar.html.erb @@ -1,11 +1,11 @@
-
diff --git a/package.json b/package.json index e5a3cfe2..fe258f00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { "dependencies": { - "bootstrap": "^5.2.3", "sass": "^1.57.1" }, "scripts": { diff --git a/yarn.lock b/yarn.lock index 4c30a1a0..ddcccb55 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,11 +15,6 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bootstrap@^5.2.3: - version "5.3.2" - resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.2.tgz#97226583f27aae93b2b28ab23f4c114757ff16ae" - integrity sha512-D32nmNWiQHo94BKHLmOrdjlL05q1c8oxbtBphQFb9Z5to6eGRDCm0QgeaZ4zFBHzfg2++rqa2JkqCcxDy0sH0g== - braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"