Skip to content

Commit 4501ed7

Browse files
committed
[website] Add banner to announce Shadcn Admin Kit - master
1 parent 6bf3c34 commit 4501ed7

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed

docs/_layouts/default.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@
9696
font-family: 'Helvetica', sans-serif;
9797
color: #c0ccda;
9898
}
99+
100+
#closeBanner {
101+
cursor: pointer;
102+
}
103+
@media screen and (max-width: 576px) {
104+
#closeBanner {
105+
display: none;
106+
}
107+
}
99108
</style>
100109
<link
101110
rel="stylesheet"
@@ -105,6 +114,37 @@
105114

106115
<body>
107116
<header>
117+
<span
118+
id="banner"
119+
style="
120+
background-color: #db2777;
121+
padding: 3px;
122+
text-align: center;
123+
color: #fff;
124+
display: flex;
125+
justify-content: center;
126+
align-items: center;
127+
gap: 0.5rem;
128+
padding: 0.75rem;
129+
"
130+
>
131+
<span aria-hidden="true" id="randomEmoji"></span>
132+
<span style="text-align: center">
133+
📣 React-admin for Shadcn UI is here! Check out
134+
<a
135+
style="text-decoration: underline; color: #fff"
136+
href="https://marmelab.com/shadcn-admin-kit/"
137+
>Shadcn Admin Kit</a
138+
> 📣
139+
</span>
140+
<span
141+
id="closeBanner"
142+
aria-label="Close"
143+
style="position: absolute; right: 10px"
144+
>
145+
<span aria-hidden="true">X</span>
146+
</span>
147+
</span>
108148
{% include nav.html %}
109149
<ul id="slide-out" class="sidenav sidenav-fixed">
110150
<li class="logo">
@@ -192,5 +232,21 @@
192232

193233
var AUTOHIDE = Boolean(0);
194234
</script>
235+
236+
<script>
237+
function hideBanner() {
238+
const banner = document.getElementById('banner');
239+
if (banner) {
240+
banner.style.display = 'none';
241+
}
242+
}
243+
const closeBanner = document.getElementById('closeBanner');
244+
if (closeBanner) {
245+
closeBanner.addEventListener('click', e => {
246+
e.preventDefault();
247+
hideBanner();
248+
});
249+
}
250+
</script>
195251
</body>
196252
</html>

docs/documentation.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@
8888
font-family: 'Helvetica', sans-serif;
8989
color: #c0ccda;
9090
}
91+
92+
#closeBanner {
93+
cursor: pointer;
94+
}
95+
@media screen and (max-width: 576px) {
96+
#closeBanner {
97+
display: none;
98+
}
99+
}
91100
</style>
92101
<link
93102
rel="stylesheet"
@@ -97,6 +106,37 @@
97106

98107
<body>
99108
<header>
109+
<span
110+
id="banner"
111+
style="
112+
background-color: #db2777;
113+
padding: 3px;
114+
text-align: center;
115+
color: #fff;
116+
display: flex;
117+
justify-content: center;
118+
align-items: center;
119+
gap: 0.5rem;
120+
padding: 0.75rem;
121+
"
122+
>
123+
<span aria-hidden="true" id="randomEmoji"></span>
124+
<span style="text-align: center">
125+
📣 React-admin for Shadcn UI is here! Check out
126+
<a
127+
style="text-decoration: underline; color: #fff"
128+
href="https://marmelab.com/shadcn-admin-kit/"
129+
>Shadcn Admin Kit</a
130+
> 📣
131+
</span>
132+
<span
133+
id="closeBanner"
134+
aria-label="Close"
135+
style="position: absolute; right: 10px"
136+
>
137+
<span aria-hidden="true">X</span>
138+
</span>
139+
</span>
100140
{% include nav.html %}
101141
<ul id="slide-out" class="sidenav sidenav-fixed">
102142
<li class="logo">
@@ -361,5 +401,21 @@ <h2>Recipes</h2>
361401

362402
var AUTOHIDE = Boolean(0);
363403
</script>
404+
405+
<script>
406+
function hideBanner() {
407+
const banner = document.getElementById('banner');
408+
if (banner) {
409+
banner.style.display = 'none';
410+
}
411+
}
412+
const closeBanner = document.getElementById('closeBanner');
413+
if (closeBanner) {
414+
closeBanner.addEventListener('click', e => {
415+
e.preventDefault();
416+
hideBanner();
417+
});
418+
}
419+
</script>
364420
</body>
365421
</html>

0 commit comments

Comments
 (0)