Skip to content

Commit 5172d3a

Browse files
authored
Merge pull request #725 from CDLUC3/bug/JS-fix-klaro-style
Bug fix for missing Consent Manager background styles on stage and production
2 parents 22f12c7 + 620e8c6 commit 5172d3a

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ RUN echo $(apt-cache search magick)
1111
# Add NodeJS and Yarn repositories to apt-get
1212
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
1313
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
14-
# Installing Node 16.x
15-
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash
14+
# Installing Node 20.x
15+
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash
1616

1717
# Install packages
1818
RUN apt-get clean

app/assets/stylesheets/application.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@
3434
// DMPTool additional styling that is not part of the dmptool-ui repo
3535
// Import new DMPTool v5 styling
3636
@use "dmptool_v5/app";
37-
@use "dmptool_v5/overrides";
37+
@use "dmptool_v5/overrides";
38+
39+
// Import Klaro cookie consent styles
40+
@use "dmptool/klaro";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.cookie-notice{--color-blue:#125382;--color-gold:#f1ae00;--color-tan:#f0ede9;--color-black-blue:#072135;--color-light-blue:#00aee9;z-index:999;background-color:var(--modal-bg);position:fixed;inset:auto 0 0}@supports (color:lab(0% 0 0)){.cookie-notice{--color-blue:#125382;--color-gold:#f1ae00;--color-tan:#f0ede9;--color-black-blue:#072135;--color-light-blue:#00aee9}@supports (color:lab(0% 0 0)){.cookie-notice{--color-blue:lab(33.3212% -6.19453 -32.4883);--color-gold:lab(75.9472% 18.2781 84.2191);--color-tan:lab(93.8273% .513971 2.25042);--color-black-blue:lab(11.4666% -3.50665 -16.1963);--color-light-blue:lab(66.007% -23.4346 -43.4511)}}}.cn-body{color:var(--main-text);padding:1.5rem;font-size:medium}.cn-body h1{color:currentColor;margin-block:0 1rem;font-size:1.3rem;font-weight:600}.cn-body p{color:currentColor;line-height:1.5}.cn-body a{color:var(--link-text);text-decoration:underline}.cn-body>p{margin:0}.cn-buttons{justify-content:center;gap:clamp(1rem,3vw,2rem);margin-block-start:1.5rem;display:flex}.cm-btn{border-radius:4px;flex-basis:50%;max-inline-size:15rem;padding:.7rem;font-family:inherit;font-size:100%}.cm-btn:focus,.cm-btn:hover{text-decoration:underline}.cm-btn-danger{border:1px solid var(--main-text);color:var(--main-text);background-color:#0000}.cm-btn-success{border:1px solid var(--button-success-bg);background-color:var(--button-success-bg);color:var(--button-success-text)}@media (min-width:64rem){.cookie-notice{max-inline-size:37rem;inset:auto 1.5rem 1.5rem auto;box-shadow:.3rem .3rem .6rem #0006;box-shadow:.3rem .3rem .6rem lab(0% 0 0/.4)}}.cookie-notice{--modal-bg:var(--color-tan);--main-text:black;--link-text:var(--color-blue);--button-success-bg:var(--color-blue);--button-success-text:white}@media (prefers-color-scheme:dark){.cookie-notice{--modal-bg:var(--color-black-blue);--main-text:white;--link-text:var(--color-light-blue);--button-success-bg:var(--color-gold);--button-success-text:black}}
2+
#klaro {
3+
button:focus, button:hover, button:active{
4+
outline: none !important;;
5+
}
6+
}

app/javascript/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import './src/superAdmin/users/edit';
9797

9898
// Add Klaro consent manager imports
9999
import 'klaro-ui/dist/js/klaro-config.js';
100-
import 'klaro-ui/dist/css/klaro-ui-light.css';
100+
import 'klaro-ui/dist/css/klaro-ui.css';
101101

102102
// ==========================
103103
// = DMPTool customizations =

0 commit comments

Comments
 (0)