Skip to content

Commit e4da6fc

Browse files
Merge pull request #3965 from OpenLiberty/cookie-consent-staging
Cookie consent banner and loading GA4 using tealium
2 parents bd360fb + 2dbe1c7 commit e4da6fc

File tree

7 files changed

+77
-29
lines changed

7 files changed

+77
-29
lines changed

src/main/content/_assets/css/openliberty.scss

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,10 @@ footer {
547547
color: #6F7878;
548548
}
549549

550+
#footer_copyright{
551+
margin-bottom: 0;
552+
}
553+
550554
.vertical_bar {
551555
margin: 0 4px;
552556
}
@@ -622,19 +626,15 @@ footer {
622626

623627

624628
#teconsent {
625-
height: 40px;
626-
background-color: rgb(255, 255, 255);
627-
z-index: 2147483647;
628-
bottom: 0px;
629-
right: 0px;
630-
margin: 0px;
631-
padding: 0px 16px;
632-
line-height: 40px;
633629
vertical-align: middle;
634-
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 10px 3px;
635630
float: right;
636-
margin-bottom: 10px;
637-
margin-left: 10px;
631+
display:contents !important;
632+
a{
633+
font-size: 11px;
634+
color: #6F7878;
635+
display: inline-block;
636+
line-height: 1.5;
637+
}
638638
}
639639

640640

@@ -783,4 +783,4 @@ code .conum[data-value]+b {
783783
opacity: 1;
784784
}
785785
}
786-
}
786+
}

src/main/content/_includes/footer.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
<a id="footer_license_link" href="https://github.com/OpenLiberty/open-liberty/blob/release/LICENSE" target="_blank" rel="noopener" class="left_footer_link">{% t footer.license %}</a>
3030
<p class="vertical_bar">|</p>
3131
<a id="footer_logos_link" href="https://github.com/OpenLiberty/logos" target="_blank" rel="noopener" class="left_footer_link">{% t footer.logos %}</a>
32+
<p class="vertical_bar">|</p>
33+
<span id="teconsent" style="display:none"></span>
3234
</div>
3335
<div id="footer_bottom_right_section">
3436
<a id="footer_get_started_link" href="/start" aria-label="Open Liberty Get Started" class="right_footer_link blue_link_light_background">{% t pages.start %}</a>

src/main/content/_includes/head.html

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,26 @@
7777
{% endif %}
7878

7979
<script async defer src="https://buttons.github.io/buttons.js"></script>
80-
</head>
80+
<script type="text/javascript">
81+
window._ibmAnalytics = {
82+
"settings": {
83+
"name": "Openliberty-io-website",
84+
"tealiumProfileName": "ibm-web-app"
85+
},
86+
"digitalData.page.services.google.enabled": true
87+
};
88+
digitalData = {
89+
"page": {
90+
"pageInfo": {
91+
"ibm": {
92+
"siteId": "IBM_" + _ibmAnalytics.settings.name,
93+
}
94+
},
95+
"category": {
96+
"primaryCategory": "PC100"
97+
}
98+
}
99+
};
100+
</script>
101+
<script src="//1.www.s81c.com/common/stats/ibm-common.js" type="text/javascript" async="async"></script>
102+
</head>

src/main/content/antora_ui/src/partials/footer-content.hbs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<footer>
1+
<footer>
22
<div id="footer_gray_background">
33
<div id="footer_top_container" class="footer_container container-fluid">
44
<div id="footer_project_container">
@@ -23,6 +23,8 @@
2323
<a id="footer_license_link" href="https://github.com/OpenLiberty/open-liberty/blob/release/LICENSE" target="_blank" rel="noopener" class="left_footer_link">License</a>
2424
<p class="vertical_bar">|</p>
2525
<a id="footer_logos_link" href="https://github.com/OpenLiberty/logos" target="_blank" rel="noopener" class="left_footer_link">Logos</a>
26+
<p class="vertical_bar">|</p>
27+
<span id="teconsent" style="display:none"></span>
2628
</div>
2729
<div id="footer_bottom_right_section">
2830
<a id="footer_get_started_link" href="/start" aria-label="Open Liberty Get Started" class="right_footer_link blue_link_light_background">Get Started</a>
@@ -40,4 +42,4 @@
4042
<img src="{{uiRootPath}}/img/Footer_StackO_Hover.svg" alt="Open-liberty Stack Overflow link">
4143
<img src="{{uiRootPath}}/img/Footer_GroupsIO_Hover.svg" alt="Openliberty Groups IO link">
4244
<img src="{{uiRootPath}}/img/footer_gitter_hover.svg" alt="Openliberty Gitter link">
43-
</div>
45+
</div>

src/main/content/antora_ui/src/partials/head-scripts.hbs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,26 @@
44
<script async src="{{uiRootPath}}/js/vendor/highlight.js "></script>
55
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha512-+NqPlbbtM1QqiK8ZAo4Yrj2c4lNQoGv8P79DPtKzj++l5jnN39rHA/xsqn8zE9l0uSoxaCdrOgFs6yjyfbBxSg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
66
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
7+
8+
<script type="text/javascript">
9+
window._ibmAnalytics = {
10+
"settings": {
11+
"name": "Openliberty-io-website",
12+
"tealiumProfileName": "ibm-web-app"
13+
},
14+
"digitalData.page.services.google.enabled": true
15+
};
16+
digitalData = {
17+
"page": {
18+
"pageInfo": {
19+
"ibm": {
20+
"siteId": "IBM_" + _ibmAnalytics.settings.name,
21+
}
22+
},
23+
"category": {
24+
"primaryCategory": "PC100"
25+
}
26+
}
27+
};
28+
</script>
29+
<script src="//1.www.s81c.com/common/stats/ibm-common.js" type="text/javascript" async="async"></script>

src/main/content/antora_ui/src/sass/openliberty.scss

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ footer {
512512
color: #6F7878;
513513
}
514514

515+
#footer_copyright{
516+
margin-bottom: 0;
517+
}
518+
515519
.vertical_bar {
516520
margin: 0 4px;
517521
}
@@ -587,19 +591,15 @@ footer {
587591

588592

589593
#teconsent {
590-
height: 40px;
591-
background-color: rgb(255, 255, 255);
592-
z-index: 2147483647;
593-
bottom: 0px;
594-
right: 0px;
595-
margin: 0px;
596-
padding: 0px 16px;
597-
line-height: 40px;
598594
vertical-align: middle;
599-
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 10px 3px;
600595
float: right;
601-
margin-bottom: 10px;
602-
margin-left: 10px;
596+
display:contents !important;
597+
a{
598+
font-size: 11px;
599+
color: #6F7878;
600+
display: inline-block;
601+
line-height: 1.5;
602+
}
603603
}
604604

605605

@@ -748,5 +748,4 @@ code .conum[data-value]+b {
748748
opacity: 1;
749749
}
750750
}
751-
}
752-
751+
}

src/main/java/io/openliberty/website/SecurityFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain
7171
response.setHeader("X-Content-Type-Options", "nosniff");
7272
// Mitigating cross site scripting (XSS) from other domains.
7373
response.setHeader("Content-Security-Policy",
74-
"default-src 'self' 'unsafe-inline' 'unsafe-eval' cdn.jsdelivr.net ajax.googleapis.com code.jquery.com fonts.gstatic.com *.githubusercontent.com api.github.com www.googletagmanager.com tagmanager.google.com www.google-analytics.com cdnjs.cloudflare.com data: buttons.github.io www.youtube.com video.ibm.com https://start.openliberty.io/ gitlab.com starter-staging.rh9j6zz75er.us-east.codeengine.appdomain.cloud https://docs.oracle.com/javase/8/docs/api/ https://docs.oracle.com/en/java/javase/17/docs/api/");
74+
"default-src 'self' 'unsafe-inline' 'unsafe-eval' cdn.jsdelivr.net ajax.googleapis.com code.jquery.com fonts.gstatic.com *.githubusercontent.com api.github.com www.googletagmanager.com tagmanager.google.com www.google-analytics.com cdnjs.cloudflare.com data: buttons.github.io www.youtube.com video.ibm.com https://start.openliberty.io/ gitlab.com starter-staging.rh9j6zz75er.us-east.codeengine.appdomain.cloud https://docs.oracle.com/javase/8/docs/api/ https://docs.oracle.com/en/java/javase/17/docs/api/ http://*.tealium.com https://*.tags.tiqcdn.com http://*.tags.tiqcdn.com http://*.trustarc.com https://*.trustarc.com https://*.prefmgr-cookie.truste-svc.net http://*.prefmgr-cookie.truste-svc.net https://www.ibm.com https://1.www.s81c.com/ https://www-api.ibm.com https://tags.tiqcdn.com");
7575

7676
// Limits the information sent cross-domain and does not send the origin name.
7777
response.setHeader("Referrer-Policy", "no-referrer");

0 commit comments

Comments
 (0)