-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from "react"; | ||
import clsx from "clsx"; | ||
import styles from './styles.module.scss'; | ||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; | ||
import Link from '/src/components/Link' | ||
|
||
export default function NewsLine () { | ||
const {siteConfig} = useDocusaurusContext(); | ||
const news = siteConfig?.customFields?.news || []; | ||
|
||
return news?.length > 0 && <div | ||
className={clsx(`py-10 px-32 border-top border-bottom d-flex align-items-center justify-content-center gap-12 bg-black`, styles.NewsLine)} | ||
> | ||
<div class="d-flex align-items-center justify-content-center gap-12"> | ||
{news.map((item, index) => ( | ||
<Link key={index} href={item.url} className={clsx(`d-flex fs-14 gap-16 align-items-center link-base`)}> | ||
{item.title} | ||
</Link> | ||
))} | ||
</div> | ||
<button className="btn-blank d-flex"> | ||
<svg width="24" height="24"> | ||
<use xlinkHref="#icon-close-circle"></use> | ||
</svg> | ||
</button> | ||
</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.NewsLine{ | ||
position: sticky; | ||
top: 88px; | ||
z-index: var(--ifm-z-index-fixed); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters