Skip to content

Commit

Permalink
Add tooling page CTA
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwllmr committed Nov 27, 2024
1 parent 71446d0 commit e1f829f
Show file tree
Hide file tree
Showing 5 changed files with 31 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
24 changes: 24 additions & 0 deletions src/components/ToolingCTA.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';

Check failure on line 1 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `'react'` with `"react"`
import {useLocation} from '@docusaurus/router';

Check failure on line 2 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `useLocation}·from·'@docusaurus/router'` with `·useLocation·}·from·"@docusaurus/router"`
import Admonition from '@theme/Admonition';

Check failure on line 3 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `'@theme/Admonition'` with `"@theme/Admonition"`

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

Check failure on line 7 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Delete `··`
// Only show on pages that include '/tooling' in their path
if (!location.pathname.includes('/tooling')) {

Check failure on line 9 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `'/tooling'` with `"/tooling"`
return null;
}

return (
<div style={{ marginTop: '2rem' }}>

Check failure on line 14 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `'2rem'` with `"2rem"`
<Admonition type="info" title="Want to be featured here?">

Check failure on line 15 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Delete `··`
<p>

Check failure on line 16 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Delete `····`
Have you built a tool for Linea? Contribute to the docs to add it here!

Check failure on line 17 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `············Have·you·built·a·tool·for·Linea?·Contribute·to·the·docs·to·add·it·here!·` with `··········Have·you·built·a·tool·for·Linea?·Contribute·to·the·docs·to·add·it`
See our <a href="https://github.com/Consensys/doc.linea?tab=readme-ov-file#contribute">

Check failure on line 18 in src/components/ToolingCTA.jsx

View workflow job for this annotation

GitHub Actions / Lint Code Base, Spelling

Replace `··See·our` with `here!·See·our{"·"}⏎·········`
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 e1f829f

Please sign in to comment.