Skip to content

Commit

Permalink
fix: css issues (#1285)
Browse files Browse the repository at this point in the history
* fix: css issues

* disable stylelint for bootstrap css since we don't want to change this css

* fix logo

* remove bootstrap 5 css and move coreUI to bundled styles

* disable linting of core UI

* fix mobile brand header title
  • Loading branch information
jaredgalanis authored Aug 1, 2024
1 parent 2f6064c commit f958f7f
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 30 deletions.
10 changes: 4 additions & 6 deletions app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export default class ApplicationController extends Controller {
@service currentUser;
@service router;
@service flashMessages;

@alias('model.staticConfig')
staticConfig;
@service('app-static-config') staticConfig;

rootURL = config.rootURL;

Expand All @@ -32,14 +30,14 @@ export default class ApplicationController extends Controller {
}

get logoUri() {
return get(this, 'brand.logo');
return this.staticConfig?._config?.branding?.logo ?? '';
}

get homepage() {
return get(this, 'brand.homepage');
return this.staticConfig?._config?.branding?.homepage ?? '';
}

get contactUrl() {
return get(this, 'brand.pages.contactUrl');
return this.staticConfig?._config?.branding?.contactUrl ?? '';
}
}
3 changes: 1 addition & 2 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
Expand All @@ -11,7 +11,6 @@
<link rel="icon" href="/app/favicon.png" />
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" />
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/pass-ui.css" />
<link rel="stylesheet" href="{{rootURL}}coreUI.css" />

{{content-for "head-footer"}}
</head>
Expand Down
12 changes: 9 additions & 3 deletions app/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('branding.css');
@import url('core-ui.css');
@import url('font-awesome-5-0-13.css');
@import url('workflow-wrapper.css');
@import url('workflow-review.css');
Expand Down Expand Up @@ -635,7 +635,10 @@ table td {
line-height: 1.5;
border-radius: 0;
/* stylelint-disable-next-line prettier/prettier */
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
transition:
color 0.15s ease-in-out,
background-color 0.15s ease-in-out,
border-color 0.15s ease-in-out,
box-shadow 0.15s ease-in-out;
background-color: #418fde !important;
border-color: #418fde !important;
Expand All @@ -656,7 +659,10 @@ table td {
line-height: 1.5;
border-radius: 0;
/* stylelint-disable-next-line prettier/prettier */
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
transition:
color 0.15s ease-in-out,
background-color 0.15s ease-in-out,
border-color 0.15s ease-in-out,
box-shadow 0.15s ease-in-out;
color: #151b1e !important;
background-color: #a4b7c1 !important;
Expand Down
60 changes: 47 additions & 13 deletions public/coreUI.css → app/styles/core-ui.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* stylelint-disable */
/*!
* CoreUI - Open Source Bootstrap Admin Template
* @version v1.0.10
Expand Down Expand Up @@ -2402,7 +2403,9 @@ pre code {
background-clip: padding-box;
border: 1px solid #c2cfd6;
border-radius: 0;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
transition:
border-color 0.15s ease-in-out,
box-shadow 0.15s ease-in-out;
}

.form-control::-ms-expand {
Expand Down Expand Up @@ -2694,7 +2697,9 @@ select.form-control-lg:not([size], [multiple]),

.was-validated .custom-control-input:valid:focus ~ .custom-control-label::before,
.custom-control-input.is-valid:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 1px #e4e5e6, 0 0 0 0.2rem rgb(77 189 116 / 25%);
box-shadow:
0 0 0 1px #e4e5e6,
0 0 0 0.2rem rgb(77 189 116 / 25%);
}

.was-validated .custom-file-input:valid ~ .custom-file-label,
Expand Down Expand Up @@ -2804,7 +2809,9 @@ select.form-control-lg:not([size], [multiple]),

.was-validated .custom-control-input:invalid:focus ~ .custom-control-label::before,
.custom-control-input.is-invalid:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 1px #e4e5e6, 0 0 0 0.2rem rgb(248 108 107 / 25%);
box-shadow:
0 0 0 1px #e4e5e6,
0 0 0 0.2rem rgb(248 108 107 / 25%);
}

.was-validated .custom-file-input:invalid ~ .custom-file-label,
Expand Down Expand Up @@ -2924,7 +2931,10 @@ select.form-control-lg:not([size], [multiple]),
font-size: 0.875rem;
line-height: 1.5;
border-radius: 0;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
transition:
color 0.15s ease-in-out,
background-color 0.15s ease-in-out,
border-color 0.15s ease-in-out,
box-shadow 0.15s ease-in-out;
}

Expand Down Expand Up @@ -5515,7 +5525,9 @@ tbody.collapse.show {
}

.custom-control-input:focus ~ .custom-control-label::before {
box-shadow: 0 0 0 1px #e4e5e6, 0 0 0 0.2rem rgb(32 168 216 / 25%);
box-shadow:
0 0 0 1px #e4e5e6,
0 0 0 0.2rem rgb(32 168 216 / 25%);
}

.custom-control-input:active ~ .custom-control-label::before {
Expand Down Expand Up @@ -5626,7 +5638,9 @@ tbody.collapse.show {
.custom-select:focus {
border-color: #8ad4ee;
outline: 0;
box-shadow: inset 0 1px 2px rgb(0 0 0 / 7.5%), 0 0 5px rgb(138 212 238 / 50%);
box-shadow:
inset 0 1px 2px rgb(0 0 0 / 7.5%),
0 0 5px rgb(138 212 238 / 50%);
}

.custom-select:focus::-ms-value {
Expand Down Expand Up @@ -8104,7 +8118,9 @@ button.close {
.modal.fade .modal-dialog {
transition: -webkit-transform 0.3s ease-out;
transition: transform 0.3s ease-out;
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
transition:
transform 0.3s ease-out,
-webkit-transform 0.3s ease-out;
transform: translate(0, -25%);
transform: translate(0, -25%);
}
Expand Down Expand Up @@ -8566,7 +8582,9 @@ button.close {
width: 100%;
transition: -webkit-transform 0.6s ease;
transition: transform 0.6s ease;
transition: transform 0.6s ease, -webkit-transform 0.6s ease;
transition:
transform 0.6s ease,
-webkit-transform 0.6s ease;
backface-visibility: hidden;
backface-visibility: hidden;
perspective: 1000px;
Expand Down Expand Up @@ -12724,7 +12742,9 @@ body {

.avatars-stack .avatar {
margin-right: -15px;
transition: margin-left 0.25s, margin-right 0.25s;
transition:
margin-left 0.25s,
margin-right 0.25s;
}

.avatars-stack .avatar:hover {
Expand Down Expand Up @@ -16287,7 +16307,9 @@ base-chart.chart {
background-position: center;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
transition:
transform 0.3s,
-webkit-transform 0.3s;
}

.sidebar .nav-dropdown.open {
Expand Down Expand Up @@ -18522,16 +18544,28 @@ app-root {
.sidebar,
.main,
.aside-menu {
transition: margin-left 0.25s, margin-right 0.25s, width 0.25s, flex 0.25s;
transition: margin-left 0.25s, margin-right 0.25s, width 0.25s, flex 0.25s, -ms-flex 0.25s;
transition:
margin-left 0.25s,
margin-right 0.25s,
width 0.25s,
flex 0.25s;
transition:
margin-left 0.25s,
margin-right 0.25s,
width 0.25s,
flex 0.25s,
-ms-flex 0.25s;
}

.sidebar-nav {
transition: width 0.25s;
}

.breadcrumb {
transition: left 0.25s, right 0.25s, width 0.25s;
transition:
left 0.25s,
right 0.25s,
width 0.25s;
}

@media (width <= 991.98px) {
Expand Down
4 changes: 2 additions & 2 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<header id="brand-header" class="navbar navbar-expand-xs justify-content-center mb-0">
<div class={{if this.fullWidth "container-fluid" "container"}}>
<a href="/" class="navbar-brand d-none d-sm-block">
<h3 id="brand-header-title" class="font-weight-light">
<h3 class="brand-header-title font-weight-light">
Public Access Submission System
</h3>
</a>
<a href="/" class="navbar-brand custom-color d-xs-block d-sm-none">
<h3 class="font-weight-light">
<h3 class="brand-header-title font-weight-light">
P.A.S.S.
</h3>
</a>
Expand Down
2 changes: 1 addition & 1 deletion ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = function (defaults) {

'ember-bootstrap': {
bootstrapVersion: 5,
importBootstrapCSS: true,
importBootstrapCSS: false,
},
});

Expand Down
2 changes: 1 addition & 1 deletion public/branding.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ a.text-danger:hover {
color: white;
}

#brand-header-title {
.brand-header-title {
color: white;
}

Expand Down
3 changes: 1 addition & 2 deletions tests/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
Expand All @@ -12,7 +12,6 @@
<link rel="stylesheet" href="{{rootURL}}assets/pass-ui.css" />
<link rel="stylesheet" href="{{rootURL}}assets/test-support.css" />
<link rel="icon" href="{{rootURL}}favicon.png" />
<link rel="stylesheet" href="{{rootURL}}coreUI.css" />

{{content-for "head-footer"}} {{content-for "test-head-footer"}}
</head>
Expand Down

0 comments on commit f958f7f

Please sign in to comment.