Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
allevo committed Nov 22, 2024
1 parent 665b795 commit 891db6a
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions packages/website/src/pages/blog/Blog.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import { Divider, Heading, Hero, Link, Prose, Tabs } from "@seqflow/components";
import { ComponentProps, Contexts } from "@seqflow/seqflow";
import classes from './Blog.module.css';
import classes from "./Blog.module.css";

import { html } from "./2024-11-24-theres-a-new-framework-in-town.md";


export async function Blog(
_: ComponentProps<unknown>,
{ component, app }: Contexts,
) {
component._el.style.backgroundColor = "rgb(6, 6, 6)";
component._el.style.minHeight = "100vh";

component._el.style.paddingTop = '15px'
component._el.style.paddingTop = "15px";

const segments = app.router.segments;
if (segments.length === 1) {
component.renderSync(
<Prose className={['m-auto']} style={{ maxWidth: '786px'}}>
<Prose className={["m-auto"]} style={{ maxWidth: "786px" }}>
<Heading level={1}>Blog</Heading>
<ol>
<li>
Expand All @@ -27,7 +26,9 @@ export async function Blog(
</Link>
</Heading>
<p>
Release 1.0.0-rc1 is out! We are excited to announce the first release candidate of SeqFlow. This release includes a new framework that makes it easier to build web applications.
Release 1.0.0-rc1 is out! We are excited to announce the first
release candidate of SeqFlow. This release includes a new
framework that makes it easier to build web applications.
</p>
</li>
</ol>
Expand All @@ -36,27 +37,29 @@ export async function Blog(
return;
}

component._el.style.paddingBottom = '15px'
component._el.style.paddingBottom = "15px";

const segment = segments[1];
switch (segment) {
case '2024-11-24-theres-a-new-framework-in-town':
case "2024-11-24-theres-a-new-framework-in-town": {
const element = getElementFromString(html);

component.renderSync([
<Prose className={['m-auto', classes.blogPost]}>
<Heading className={'text-center'} level={1}>There's a New Framework in Town!</Heading>
<Prose className={["m-auto", classes.blogPost]}>
<Heading className={"text-center"} level={1}>
There's a New Framework in Town!
</Heading>
<img
src="/images/blog/2024-11-24-theres-a-new-framework-in-town.svg"
alt="A beautiful image that show the SeqFlow logo"
style={{ borderRadius: '15px', border: '1px solid #2b2f35' }}
alt="the amazing SeqFlow logo"
style={{ borderRadius: "15px", border: "1px solid #2b2f35" }}
/>
{element}
</Prose>,
]);
break;
}
}

}

function getElementFromString(string: string) {
Expand Down

0 comments on commit 891db6a

Please sign in to comment.