Skip to content

Commit

Permalink
Upgrade to Bootstrap 5 and component library header/footer
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Aug 21, 2024
1 parent afaf8ed commit dda0665
Show file tree
Hide file tree
Showing 37 changed files with 384 additions and 568 deletions.
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,3 @@ end

gem 'config'
gem 'newrelic_rpm'

gem "cssbundling-rails", "~> 1.1"
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ GEM
deep_merge (~> 1.2, >= 1.2.1)
connection_pool (2.4.1)
crass (1.0.6)
cssbundling-rails (1.4.1)
railties (>= 6.0.0)
database_cleaner (2.0.2)
database_cleaner-active_record (>= 2, < 3)
database_cleaner-active_record (2.2.0)
Expand Down Expand Up @@ -412,7 +410,6 @@ DEPENDENCIES
capistrano-rvm
capybara (~> 3.0)
config
cssbundling-rails (~> 1.1)
database_cleaner
debug
dlss-capistrano
Expand Down
1 change: 0 additions & 1 deletion Procfile.dev
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
web: unset PORT && bin/rails server
css: yarn build:css --watch
1 change: 1 addition & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//= link_tree ../images
//= link_directory ../javascripts .js
//= link application.css
//= link_tree ../builds
3 changes: 1 addition & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery3
// require jquery3
//= require rails-ujs
//= require datatables
//= require_tree .
2 changes: 0 additions & 2 deletions app/assets/javascripts/datatables.js

This file was deleted.

5 changes: 1 addition & 4 deletions app/assets/javascripts/modal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Adapted from https://github.com/projectblacklight/blacklight/blob/master/app/javascript/blacklight/modal.js
//= require bootstrap

Reserves = {};

Expand Down Expand Up @@ -27,9 +26,7 @@ Reserves.modal.modalAjaxClickLink = function(e) {
Reserves.modal.onFailure = function(data) {
var contents = '<div class="modal-header">' +
'<div class="modal-title">Network Error</div>' +
'<button type="button" class="Reserves-modal-close close" data-dismiss="modal" aria-label="Close">' +
' <span aria-hidden="true">&times;</span>' +
'</button>';
'<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>';
$(Reserves.modal.modalSelector).find('.modal-content').html(contents);
$(Reserves.modal.modalSelector).modal('show');
}
Expand Down
109 changes: 109 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
:root {
--stanford-fog-dark: #b6b1a9;
--stanford-cardinal-rgb: 143, 20, 20;
}
.bg-cardinal {
--bs-dark-rgb: var(--stanford-cardinal-rgb);
}

.bg-fog {
--bs-table-bg: var(--stanford-fog-dark);
}

.bg-dark.navbar .nav-item {
color: var(--bs-navbar-color);
}

#main-container {
/* keep the footer at the bottom */
min-height: calc(100vh - 441px);
}

#list-management {
min-width: 354px;
}

#item_list {
counter-reset: section;

background-color: var(--bs-table-bg);
margin-top: 1rem;
margin-bottom: 1rem;

.header {
height: 1rem;
background-color: var(--stanford-fog-dark);
}

.reserve {
padding-bottom: 0.5rem;
padding-top: 0.5rem;
}

.reserve:nth-child(even) {
background-color: rgba(var(--bs-emphasis-color-rgb), 0.05);
}

.num_copies {
margin-left: 1rem;
margin-right: 1rem;
width: 12ch;
}

.loan-period {
width: auto;
margin-left: 1rem;
margin-right: 1rem;
}
}

.enumerator {
font-size: 2rem;
line-height: 2rem;
color: var(--stanford-fog-dark);
padding-left: 1rem;
padding-right: 1rem;

.counter {
&::before {
content: counter(section);
counter-increment: section;
}
}
}

#libraries {
width: 35ch;
}

.sent_date {
color: var(--stanford-cardinal);
font-size: 1.2em;
}

.changed {
border-left: 2px solid var(--stanford-cardinal);
border-right: 2px solid var(--stanford-cardinal);
border-bottom: 2px solid var(--bs-border-color);
}

#sw_url {
width: 400px;
}

#introduction {
border-left: 5px solid var(--stanford-fog-dark);
padding-left: 1rem;
max-width: 45em;
}

#all_courses {
width: 100%;
}

#all_courses #course_id {
white-space: nowrap;
}
#all_courses #instructor {
width: 35%;
}
25 changes: 0 additions & 25 deletions app/assets/stylesheets/application.sass.scss

This file was deleted.

1 change: 0 additions & 1 deletion app/assets/stylesheets/datatables.scss

This file was deleted.

49 changes: 0 additions & 49 deletions app/assets/stylesheets/identity/bootstrap-variables.scss

This file was deleted.

36 changes: 0 additions & 36 deletions app/assets/stylesheets/identity/digital-color.scss

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/stylesheets/identity/overrides.scss

This file was deleted.

16 changes: 0 additions & 16 deletions app/assets/stylesheets/modules/home.scss

This file was deleted.

77 changes: 0 additions & 77 deletions app/assets/stylesheets/modules/request.scss

This file was deleted.

Loading

0 comments on commit dda0665

Please sign in to comment.