Skip to content

Commit 04cdba7

Browse files
authored
feat(): os announcement bar config and styles (#3689)
* feat(): os announcement bar config and styles * fix(announcement bar): better contrast
1 parent ca5789f commit 04cdba7

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

docusaurus.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ module.exports = {
104104
],
105105
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
106106
themeConfig: {
107+
announcementBar: {
108+
id: 'announcement-bar',
109+
content:
110+
'<a href="https://www.outsystems.com/?utm_source=ionic&utm_medium=referral&utm_campaign=ionic-referral&utm_term=none&utm_content=other&utm_campaignteam=digital-mktg&utm_partner=none" target="_blank" rel="noopener"><span>An <strong>OutSystems</strong> Company →</span></a>',
111+
isCloseable: false,
112+
},
107113
metadata: [
108114
{ name: 'og:image', content: 'https://ionicframework.com/docs/img/meta/open-graph.png' },
109115
{ name: 'twitter:image', content: 'https://ionicframework.com/docs/img/meta/open-graph.png' },

src/styles/custom.scss

+42-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ iframe {
169169
}
170170
}
171171

172-
173172
.cordova-ee-card {
174173
max-width: 100%;
175174
}
@@ -188,3 +187,45 @@ iframe {
188187
.cordova-ee-card p {
189188
margin: 1rem 0 0;
190189
}
190+
191+
// OS Announcement Bar
192+
[class*='announcementBar_'] {
193+
--docusaurus-announcement-bar-height: 3.5rem;
194+
195+
background: linear-gradient(90deg, #440f14, #5e1219 15%, #000 35%, #000 45%, #5e1219 85%, #440f14);
196+
197+
&:hover,
198+
&:focus,
199+
&:active {
200+
strong {
201+
color: var(--c-red-50);
202+
}
203+
}
204+
}
205+
206+
[class*='announcementBarContent_'] {
207+
padding: 0;
208+
209+
> a {
210+
display: flex;
211+
align-items: center;
212+
justify-content: center;
213+
height: var(--docusaurus-announcement-bar-height);
214+
215+
letter-spacing: 0.01em !important;
216+
text-decoration: none !important;
217+
218+
color: #fff !important;
219+
220+
font-size: 1.04rem;
221+
font-weight: 500;
222+
223+
strong {
224+
font-weight: 500;
225+
226+
color: var(--c-red-70);
227+
228+
transition: color 0.2s ease-out;
229+
}
230+
}
231+
}

0 commit comments

Comments
 (0)