Skip to content

Commit dce05b1

Browse files
authored
Add alert about demo site (#174)
Signed-off-by: Cintia Sánchez García <[email protected]>
1 parent edbe87d commit dce05b1

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

ocg-server/templates/common/base.html

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,19 @@
8989
</a>
9090
{# End skip navigation link -#}
9191

92+
{# Alert -#}
93+
{% if !path.starts_with("/dashboard") -%}
94+
{% include "common/demo_alert.html" -%}
95+
{% endif -%}
96+
{# End alert -#}
97+
9298
<div class='min-h-full flex flex-col {% if path == "/" %}bg-white{% else %}bg-stone-100{% endif %}'>
9399
<div class='{%- if path == "/" -%}bg-stone-100{%- else if path == "/explore" -%}bg-transparent{%- endif -%}'>
100+
{# Header -#}
94101
{% if !path.starts_with("/dashboard") -%}
95-
{# Header -#}
96102
<div class="px-4 lg:px-5">{% include "common/header.html" -%}</div>
97-
{# End header -#}
98103
{% endif -%}
104+
{# End header -#}
99105

100106
{# Jumbotron -#}
101107
{% block jumbotron -%}
@@ -110,11 +116,11 @@
110116
</main>
111117
{# End content -#}
112118

119+
{# Footer -#}
113120
{% if !path.starts_with("/dashboard") && path != "/log-in" && path != "/sign-up" -%}
114-
{# Footer -#}
115121
{% include "common/footer.html" -%}
116-
{# End footer -#}
117122
{% endif -%}
123+
{# End footer -#}
118124
</div>
119125

120126
{% block scripts -%}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<div class="p-2 px-10 border-b border-stone-200 bg-white relative"
2+
role="alert">
3+
<div class="text-xs text-stone-700 text-center">
4+
This is a demo of <span class="font-medium text-primary-500">Open Community Groups</span>. <span class="hidden md:inline">The actual CNCF community groups site is <a href="https://community.cncf.io"
5+
class="font-medium text-primary-500 hover:underline"
6+
target="_blank"
7+
rel="noopener noreferrer">https://community.cncf.io</a>.</span>
8+
</div>
9+
<button id="beta-alert-close"
10+
type="button"
11+
class="absolute end-5 top-1.5"
12+
aria-label="Close">
13+
<span class="sr-only">Dismiss</span>
14+
<div class="svg-icon size-5 bg-stone-500 hover:bg-stone-800 transition-colors icon-close"></div>
15+
</button>
16+
</div>
17+
<script type="module">
18+
const betaAlertClose = document.getElementById('beta-alert-close');
19+
if (betaAlertClose) {
20+
betaAlertClose.addEventListener('click', () => {
21+
const alert = betaAlertClose.parentElement;
22+
if (alert) {
23+
alert.classList.add('hidden');
24+
}
25+
});
26+
}
27+
</script>

0 commit comments

Comments
 (0)