Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakshmishri committed Aug 19, 2024
2 parents 7b84694 + 80a2b4a commit 9fb7265
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 7 deletions.
34 changes: 33 additions & 1 deletion scripts/delayed.js
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
// add delayed functionality here
import { loadScript } from './aem.js';

// OneTrust Cookies Consent Notice
if (!window.location.pathname.includes('srcdoc')
&& !['hlx.live', 'aem.page', 'aem.live'].some((url) => window.location.host.includes(url))) {
// when running on localhost in the block library host is empty but the path is srcdoc
// on localhost/hlx.page/hlx.live the consent notice is displayed every time the page opens,
// because the cookie is not persistent. To avoid this annoyance, disable unless on the
// production page.
loadScript('https://cdn.cookielaw.org/scripttemplates/otSDKStub.js', {
type: 'text/javascript',
charset: 'UTF-8',
'data-domain-script': '0190e9aa-e486-72b8-ada6-bda52c32aa2c',
});

window.OptanonWrapper = () => {
const currentOnetrustActiveGroups = window.OnetrustActiveGroups;

function isSameGroups(groups1, groups2) {
const s1 = JSON.stringify(groups1.split(',').sort());
const s2 = JSON.stringify(groups2.split(',').sort());

return s1 === s2;
}

window.OneTrust.OnConsentChanged(() => {
// reloading the page only when the active group has changed
if (!isSameGroups(currentOnetrustActiveGroups, window.OnetrustActiveGroups)) {
window.location.reload();
}
});
};
}
61 changes: 55 additions & 6 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ h6,
font-weight: 600;
}

* + .h1,
* + .h2,
* + .h3,
* + .h4,
* + .h5,
* + .h6,
* + h1,
* + h2,
* + h3,
* + h4,
* + h5,
* + h6 {
margin-top: 40px;
}


p,
dl,
ol,
Expand All @@ -112,6 +128,10 @@ blockquote {
margin-bottom: 1em;
}

ul {
padding-left: 30px;
}

address, dl, fieldset, figure, ol, p, pre, ul {
margin: 0 0 20px;
}
Expand Down Expand Up @@ -231,7 +251,12 @@ main .section {
padding: var(--section-y-padding) var(--section-x-padding);
}

main .section:last-child {
main .section:first-child {
padding-top: 0;
}

main .section:last-child,
main .section.padding-bottom-0 {
padding-bottom: 0;
}

Expand Down Expand Up @@ -345,11 +370,35 @@ main .section:first-child {
margin: auto;
}

.section.padding-bottom-0 {
padding-bottom: 0;
}

.section-center .button-container {
display: flex;
justify-content: center;
}
}
/* styles to override onetrust */
#onetrust-consent-sdk #onetrust-pc-sdk button:not(#clear-filters-handler, .ot-close-icon, #filter-btn-handler, .ot-remove-objection-handler, .ot-obj-leg-btn-handler, [aria-expanded], .ot-link-btn),
#onetrust-banner-sdk #onetrust-reject-all-handler,
#onetrust-consent-sdk #onetrust-accept-btn-handler {
background-color: var(--link-color) !important;
border-color: transparent !important;
}

/* article styles - start */
.article h1 {
font-size: 2.2313rem;
line-height: 1.2;
color: #333;
font-weight: 400;
margin-bottom: 40px
}

.article em {
color: rgb(240 80 110);
}

@media (width >= 960px) {
.article h1 {
font-size:2.625rem
}
}

/* article styles - end */

0 comments on commit 9fb7265

Please sign in to comment.