-
Notifications
You must be signed in to change notification settings - Fork 106
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
1 parent
200a6fa
commit 14c7d3a
Showing
5 changed files
with
69 additions
and
17 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
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 |
---|---|---|
@@ -1,23 +1,25 @@ | ||
import React from "react"; | ||
import React from "react" | ||
|
||
interface AnnouncementProps { | ||
text: string; | ||
refLink?: string; | ||
refText?: string; | ||
text: string | ||
refLink?: string | ||
refText?: string | ||
} | ||
|
||
const Announcement: React.FC<AnnouncementProps> = ({ text, refLink, refText }) => { | ||
const Announcement: React.FC<AnnouncementProps> = ({text, refLink, refText}) => { | ||
return ( | ||
<div className="w-full h-[39px] bg-black text-white flex items-center justify-center"> | ||
<div className="text-sm sm:text-base md:text-lg font-bold"> | ||
{text} | ||
{refLink && refText && ( | ||
<a className="text-tailCall-yellow font-bold" href={refLink}> {refText} </a> | ||
) | ||
} | ||
<a className="text-tailCall-yellow font-bold" href={refLink}> | ||
{" "} | ||
{refText}{" "} | ||
</a> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
) | ||
} | ||
|
||
export default Announcement; | ||
export default Announcement |
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,36 @@ | ||
import React from "react" | ||
import clsx from "clsx" | ||
import Layout from "@theme/Layout" | ||
import BlogSidebar from "@theme/BlogSidebar" | ||
|
||
import type {Props} from "@theme/BlogLayout" | ||
import Announcement from "@site/src/components/shared/Announcement" | ||
|
||
export default function BlogLayout(props: Props): JSX.Element { | ||
const {sidebar, toc, children, ...layoutProps} = props | ||
const hasSidebar = sidebar && sidebar.items.length > 0 | ||
|
||
return ( | ||
<Layout {...layoutProps}> | ||
<Announcement | ||
text={"📣 Catch Us at GraphQLConf 2024 • September 10-12 • San Francisco • "} | ||
refLink={"https://graphql.org/conf/2024/schedule/870876ffad45b79d11e09393e7f22587/"} | ||
refText={" Know more → "} | ||
/> | ||
<div className="container margin-vert--lg"> | ||
<div className="row"> | ||
<BlogSidebar sidebar={sidebar} /> | ||
<main | ||
className={clsx("col", { | ||
"col--7": hasSidebar, | ||
"col--9 col--offset-1": !hasSidebar, | ||
})} | ||
> | ||
{children} | ||
</main> | ||
{toc && <div className="col col--2">{toc}</div>} | ||
</div> | ||
</div> | ||
</Layout> | ||
) | ||
} |