Skip to content

Commit d695f7e

Browse files
Added hellobar
1 parent bed47b5 commit d695f7e

File tree

4 files changed

+113
-12
lines changed

4 files changed

+113
-12
lines changed

docusaurus.config.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,6 @@ const config = {
183183
({
184184
// Replace with your project's social card
185185
image: 'img/social-card.png',
186-
announcementBar: {
187-
id: 'support_us',
188-
content:
189-
'Get the help you need with our <a target="_blank" rel="noopener noreferrer" href="https://avaloniaui.net/support?utm_source=docs&utm_medium=referral&utm_content=header_link">Enhanced Support!</a>',
190-
backgroundColor: '#0d6efd',
191-
textColor: '#ffffff',
192-
isCloseable: false,
193-
},
194186
colorMode: {
195187
defaultMode: 'light',
196188
disableSwitch: false,

src/components/homepage/HelloBar.jsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import Link from '@docusaurus/Link';
3+
import { ChevronRight, GitHub } from 'react-feather';
4+
import clsx from 'clsx';
5+
6+
function HelloBar() {
7+
return (
8+
<a
9+
href="https://avaloniaui.net/xpf?utm_source=docs&utm_medium=referral&utm_content=hellobar"
10+
target="_blank"
11+
className="hello-bar u-hflex-center-center w-inline-block"
12+
>
13+
<div className="hello_bar_contents u-hflex-center-center u-gap-10">
14+
<div className="ph_cat_nd_txt-wrapper u-hflex-left-center u-gap-10">
15+
<div className="ph_banner_txt">
16+
Introducing Avalonia XPF: A cross-platform fork of WPF
17+
</div>
18+
</div>
19+
<div className="banner_separator"></div>
20+
<div className="hello_bar_cta u-hflex-left-center u-gap-8">
21+
<div className="text-block-98">Try it today</div>
22+
</div>
23+
</div>
24+
</a>
25+
);
26+
}
27+
28+
export default HelloBar;

src/css/custom.css

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,3 +1359,86 @@ img.center {
13591359
}
13601360
}
13611361

1362+
.hello-bar {
1363+
background-color: #1b2a4e;
1364+
background-image: linear-gradient(#0003, #0003);
1365+
padding-top: 12px;
1366+
padding-bottom: 12px;
1367+
}
1368+
1369+
.hello-bar:hover {
1370+
text-decoration: underline;
1371+
text-decoration-color: #1b2a4e; /* Red underline */
1372+
}
1373+
1374+
.u-hflex-center-center {
1375+
justify-content: center;
1376+
align-items: center;
1377+
display: flex;
1378+
}
1379+
1380+
.u-gap-10 {
1381+
grid-column-gap: 10px;
1382+
grid-row-gap: 10px;
1383+
display: flex;
1384+
}
1385+
1386+
.u-hflex-center-center {
1387+
justify-content: center;
1388+
align-items: center;
1389+
display: flex;
1390+
}
1391+
1392+
.u-hflex-left-center {
1393+
flex-flow: wrap;
1394+
align-items: center;
1395+
display: flex;
1396+
}
1397+
1398+
.ph_cat {
1399+
width: 28px;
1400+
height: auto;
1401+
}
1402+
.ph_banner_txt {
1403+
color: #fff;
1404+
font-family: Inter, sans-serif;
1405+
font-size: 16px;
1406+
font-weight: 500;
1407+
line-height: 1;
1408+
}
1409+
1410+
.banner_separator {
1411+
background-color: #fff;
1412+
width: 1px;
1413+
height: 20px;
1414+
}
1415+
1416+
.hello_bar_cta {
1417+
background-color: #fff;
1418+
border-radius: 6px;
1419+
padding: 6px 12px 6px 14px;
1420+
}
1421+
1422+
.u-gap-8 {
1423+
grid-column-gap: 8px;
1424+
grid-row-gap: 8px;
1425+
}
1426+
1427+
.u-hflex-left-center {
1428+
flex-flow: wrap;
1429+
align-items: center;
1430+
display: flex;
1431+
}
1432+
1433+
.text-block-98 {
1434+
color: #1a1c21;
1435+
font-family: Inter, sans-serif;
1436+
font-size: 16px;
1437+
font-weight: 500;
1438+
line-height: 1;
1439+
}
1440+
1441+
.image-213 {
1442+
width: 16px;
1443+
height: 16px;
1444+
}

src/pages/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import HelpSection from '../components/homepage/HelpSection';
1111
import HomeFooter from '../components/homepage/HomeFooter';
1212
import ResourcesSection from '../components/homepage/ResourcesSection';
1313
import CTASection from '../components/homepage/CallToActionSection';
14-
14+
import HelloBar from '../components/homepage/HelloBar';
1515

1616

1717
export default function Home(): JSX.Element {
@@ -21,12 +21,10 @@ export default function Home(): JSX.Element {
2121
title={`${siteConfig.title}`}
2222
description="Learn to build with Avalonia"
2323
noFooter>
24-
24+
<HelloBar/>
2525
<HeroSection/>
2626
<GuidesAndSamplesSection/>
2727

28-
<CTASection/>
29-
3028
<div className="z-0">
3129
<HelpSection className="-mb-48" />
3230
</div>

0 commit comments

Comments
 (0)