Skip to content

Commit

Permalink
Merge pull request #585 from sul-dlss/518-component-library
Browse files Browse the repository at this point in the history
update header, footer, remove css, point to component library
  • Loading branch information
jcoyne authored Oct 31, 2024
2 parents a1fa1ee + fe4b4d6 commit 2758b2b
Show file tree
Hide file tree
Showing 16 changed files with 163 additions and 354 deletions.
8 changes: 4 additions & 4 deletions app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// Entry point for your Sass build

@import 'palette';

// Custom bootstrap variables must be set or imported *before* bootstrap.
@import 'variables';
@import 'bootstrap/scss/bootstrap';
@import 'library_hours_mixins';
@import 'library_hours';
@import 'global_alert';

Expand Down Expand Up @@ -35,7 +32,6 @@

.editable-error-block {
// position: absolute;
background-color: $color-cardinal-red;
color: #fff;
z-index: 1000;
}
Expand All @@ -45,3 +41,7 @@
padding-top: 1rem;
padding-bottom: 1rem;
}

header {
--bs-dark-rgb: 130, 0, 0;
}
9 changes: 0 additions & 9 deletions app/assets/stylesheets/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ label {
font-weight: normal;
}

button:focus,
embed:focus,
input:focus,
object:focus,
select:focus,
textarea:focus {
@include focus-outline;
}

.location-and-access {
padding-right: 1ch;
}
Expand Down
39 changes: 0 additions & 39 deletions app/assets/stylesheets/layout.scss
Original file line number Diff line number Diff line change
@@ -1,48 +1,9 @@
#outer-container,
#topnav-container,
#top-nav-bar {
border: 0;
margin: 0;
padding: 0;
width: 100%;
}

.header-logo > a {
border-bottom: 0;
}

#main-container {
#main-flashes {
min-height: 0;
}
}

#sul-logo {
border-bottom: 0;
float: left;
}

@media (min-width: 768px) {
#topnav,
#main-container {
width: 750px;
}
}

@media (min-width: 980px) {
#topnav,
#main-container {
width: 970px;
}
}

@media (min-width: 1200px) {
#topnav,
#main-container {
width: 1170px;
}
}

@media only screen and (max-width: 768px) {
#main-container {
padding: 0 15px;
Expand Down
5 changes: 0 additions & 5 deletions app/assets/stylesheets/library_hours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
@import "base";
@import "layout";

@import "top-navbar";
@import "sul-footer";

.date-range {
background-color: $color-beige-10;

@include media-breakpoint-up(sm) {
.date-input {
padding-right: ($spacer * 0.75);
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/library_hours_mixins.scss

This file was deleted.

12 changes: 0 additions & 12 deletions app/assets/stylesheets/palette.scss

This file was deleted.

88 changes: 0 additions & 88 deletions app/assets/stylesheets/sul-footer.scss

This file was deleted.

73 changes: 0 additions & 73 deletions app/assets/stylesheets/top-navbar.scss

This file was deleted.

26 changes: 0 additions & 26 deletions app/assets/stylesheets/variables.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
$sul-footer-bg-color: $color-beige-10;

$gray-base: #000;
$gray-dark: lighten($gray-base, 20%);
$link-color: $gray-dark;
$nav-color: #fbfbf9;

$brand-primary: $color-cardinal-red;
$pagination-active-bg: #696969;
$pagination-active-border: #696969;

$primary: $color-cardinal-red;
/* $theme-colors: (
"primary": $color-cardinal-red,
"secondary": #6c757d,
Expand All @@ -21,46 +15,26 @@ $primary: $color-cardinal-red;
$font-size-base: 0.94rem;
$line-height-base: 1.5;

$btn-default-color: $color-gray;
$btn-default-bg: $color-beige-10;
$btn-default-border: $color-beige-30;

$link-color: #a26624;
$link-hover-color: #a26624;
$link-hover-decoration: none;
$sul-link-color-border: #a26624;

$font-size-h1: floor(($font-size-base * 2.986));
$font-size-h2: floor(($font-size-base * 2.074));
$font-size-h3: floor(($font-size-base * 1.728));
$font-size-h4: floor(($font-size-base * 1.2));
$headings-font-weight: 100;

$body-bg: $color-beige-05;
$font-family-sans-serif: "Source Sans Pro", "Arial Unicode MS", Helvetica,
sans-serif;
$txt-color: $gray-base;

$gray-41-percent: #696969;
$sul-focus-outline: #eaab00;

$navbar-default-link-color: $color-cardinal-red;

//@at-root: $brand-primary;
$navbar-inverse-border: $color-dark-red;
$navbar-inverse-link-color: $link-color;
$navbar-inverse-link-hover-color: $link-color;

$global-alert-color: rgb(204, 0, 0);

// Note: include functions before variables to have access to mixins
@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";

$top-nav-bar-height: 35px;
$brandbar-collapsed-height: 50px;
$brandbar-height: 100px;
$brandbar-padding-vertical: (($brandbar-height - $line-height-base) * 0.5);
$sul-shadow-color: rgba(0, 0, 0, 0.2);

$input-height-base: $input-height;
21 changes: 8 additions & 13 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<%= csrf_meta_tags %>
<%= content_for(:head) %>
<%= stylesheet_link_tag "application" %>
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2024-09-04/styles/sul.css" %>
<%= javascript_importmap_tags %>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-B544ZKTH0M"></script>
Expand All @@ -29,19 +30,13 @@
</head>

<body>
<div id="su-wrap"> <!-- #su-wrap start -->
<div id="su-content"> <!-- #su-content start -->
<div id="outer-container" class="container-fluid">
<%= render 'shared/top_navbar' %>
<section id="main-container" role="main" class="container pt-2 pb-3">
<%= breadcrumbs style: :bootstrap5 %>
<%= render 'shared/global_alert' %>
<%= render 'shared/flashes' %>
<%= yield %>
</section>
</div>
</div>
</div>
<%= render 'shared/top_navbar' %>
<main id="main-container" class="container pt-2 pb-3">
<%= breadcrumbs style: :bootstrap5 %>
<%= render 'shared/global_alert' %>
<%= render 'shared/flashes' %>
<%= yield %>
</main>
<%= render 'shared/sul_footer' %>
</body>
</html>
2 changes: 1 addition & 1 deletion app/views/libraries/_range.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div class="col-xs-12 d-flex" id="jump-term-group">
<h3 class="visually-hidden">Jump to quarters &amp; holidays</h3>
<button id="jump-term" type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<button id="jump-term" type="button" class="btn btn-outline-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Quarters &amp; holidays <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
Expand Down
Loading

0 comments on commit 2758b2b

Please sign in to comment.