Skip to content

Commit

Permalink
Add tooling page CTA (#859)
Browse files Browse the repository at this point in the history
* Add tooling page CTA

* Address linter

* Move CTA to top of page

* Move CTA back to bottom of page
  • Loading branch information
jlwllmr authored Nov 28, 2024
1 parent 29adaba commit 634349c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/developers/tooling/oracles/redstone.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: RedStone
image: /img/socialCards/redstone-oracles.jpg
image: /img/socialCards/redstone.jpg
---

RedStone provides data feeds with update times of less than 10 seconds, suitable
Expand Down
4 changes: 3 additions & 1 deletion docs/developers/tooling/oracles/tellor.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Tellor
description: A versatile oracle protocol that can provide data of any type permissionlessly with crypto-economic liveness and security.
description: >-
A versatile oracle protocol that can provide data of any type permissionlessly
with crypto-economic liveness and security.
image: /img/socialCards/tellor.jpg
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Query Irys transactions
image: /img/socialCards/querying-irys-transactions.jpg
image: /img/socialCards/query-irys-transactions.jpg
description: Querying data on Irys.
---

Expand Down
27 changes: 27 additions & 0 deletions src/components/ToolingCTA.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";
import { useLocation } from "@docusaurus/router";
import Admonition from "@theme/Admonition";

export default function ToolingCTA() {
const location = useLocation();

// Only show on pages that include "/tooling" in their path
if (!location.pathname.includes("/tooling")) {
return null;
}

return (
<div style={{ marginTop: "2rem" }}>
<Admonition type="info" title="Want to be featured here?">
<p>
Have you built a tool for Linea? Contribute to the docs to add it
here! See our{" "}
<a href="https://github.com/Consensys/doc.linea?tab=readme-ov-file#contribute">
guide to contributing
</a>
.
</p>
</Admonition>
</div>
);
}
2 changes: 2 additions & 0 deletions src/theme/DocItem/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import DocBreadcrumbs from "@theme/DocBreadcrumbs";
import ContentVisibility from "@theme/ContentVisibility";
import styles from "./styles.module.css";
import GetFeedback from "./GetFeedback";
import ToolingCTA from "../../../components/ToolingCTA";

/**
* Decide if the toc should be rendered, on mobile or desktop viewports
Expand Down Expand Up @@ -47,6 +48,7 @@ export default function DocItemLayout({ children }) {
<DocVersionBadge />
{docTOC.mobile}
<DocItemContent>{children}</DocItemContent>
<ToolingCTA />
<GetFeedback />
<DocItemFooter />
</article>
Expand Down

0 comments on commit 634349c

Please sign in to comment.