Skip to content

Commit

Permalink
First attempt at new link to Moderne
Browse files Browse the repository at this point in the history
Related: #317
  • Loading branch information
mike-solomon committed Nov 8, 2024
1 parent 5ff80db commit d55ad54
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,9 @@ We don't have OpenRewrite recipes implemented for all publicly available policie

## See how this recipe works across multiple open-source repositories

<a href="https://app.moderne.io/recipes/org.openrewrite.staticanalysis.CommonStaticAnalysis">
<img
src={require('/static/img/ModerneRecipeButton.png').default}
alt="Moderne Link Image"
width="50%"
/>
</a>
import RecipeCallout from '@site/src/components/ModerneLink';

<RecipeCallout link="https://app.moderne.io/recipes/org.openrewrite.staticanalysis.CommonStaticAnalysis" />

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Expand Down
8 changes: 8 additions & 0 deletions src/components/External.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions src/components/ModerneLink.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import ExternalSVG from './External.svg';
import ZoomableImage from '../theme/MDXComponents/Img';
import Styles from './button.module.css';

export default function RecipeCallout({children, link}) {
return (
<div className={Styles.container}>
<div className={Styles.subContainer}>
<p className={Styles.heading}>
Run this recipe on OSS repos at scale with the Moderne SaaS.
</p>
<div>
<a href={link} className={Styles.link}>
Run this recipe here <ExternalSVG />
</a>
</div>
</div>
<div>
<ZoomableImage src={require('../../static/img/run-at-scale.png').default} />
</div>
</div>
);
}
40 changes: 40 additions & 0 deletions src/components/button.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.container {
display: grid;
grid-template-columns: 1fr 1fr;
border: 1px solid #2546F0;
padding: 30px;
gap: 15px;
margin: 16px 0;
}

.subContainer {
display: flex;
flex-direction: column;
justify-content: space-between;
}

.heading {
font-weight: 500;
font-size: 18px;
line-height: 23px;
color: #FBFDFF;
}

.link {
font-weight: 400;
font-size: 16px;
line-height: 23px;
background-color: #2546F0;
padding: 8px;
align-items: center;
border-radius: 6px;
color: #FBFDFF;
display: inline-flex;
gap: 8px;
}

.link:hover {
background-color: #2546F080;
color: #FBFDFF;
text-decoration: none;
}
Binary file added static/img/run-at-scale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d55ad54

Please sign in to comment.