-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update manifesto page * Fix eslint issues
- Loading branch information
Showing
27 changed files
with
514 additions
and
806 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
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,5 @@ | ||
type Markdown = { | ||
content: string; | ||
path?: string; | ||
type?: "blogPost" | "docsArticle"; | ||
}; |
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,11 @@ | ||
export type DescriptionProps = { | ||
children: string; | ||
}; | ||
|
||
export default function Description({ children }: DescriptionProps) { | ||
return ( | ||
<> | ||
<meta content={children} name="description" /> | ||
</> | ||
); | ||
} |
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,12 @@ | ||
@import "base"; | ||
|
||
.manifesto { | ||
h1:global(#poeticmetrics-vision) { | ||
font-size: map-get($display-font-sizes, 4); | ||
} | ||
|
||
h3:global(#building-a-better-web) { | ||
font-size: map-get($font-sizes, 4); | ||
margin-block-end: 0; | ||
} | ||
} |
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,12 +1,24 @@ | ||
import classNames from "classnames"; | ||
import Description from "~/components/Description"; | ||
import Markdown from "~/components/Markdown"; | ||
import content from "./manifesto.md?raw"; | ||
import Title from "~/components/Title"; | ||
import markdown from "./manifesto.md?raw"; | ||
import styles from "./Manifesto.module.scss"; | ||
|
||
export default function Manifesto() { | ||
return ( | ||
<div className="container"> | ||
<div className="mx-auto mw-50rem"> | ||
<Markdown content={content} /> | ||
<> | ||
<Title>Manifesto</Title> | ||
<Description> | ||
Discover the principles that guide PoeticMetric. Our privacy-first approach, commitment to transparency, dedication to | ||
sustainability, and focus on efficiency set us apart in the analytics industry. Read our manifesto now. | ||
</Description> | ||
|
||
<div className="container py-32"> | ||
<div className="mx-auto mw-50rem"> | ||
<Markdown className={classNames("fs-5 lh-lg", styles.manifesto)}>{markdown}</Markdown> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} |
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,37 @@ | ||
import { IconAlertTriangle, IconBulb, TablerIcon } from "@tabler/icons-react"; | ||
import classNames from "classnames"; | ||
import { Children, cloneElement, createElement, isValidElement, JSX, PropsWithoutRef, ReactElement, ReactNode, useMemo } from "react"; | ||
import Anchor, { AnchorProps } from "~/components/Markdown/Anchor"; | ||
|
||
export type AlertProps = Overwrite<PropsWithoutRef<JSX.IntrinsicElements["div"]>, { | ||
variant: "primary" | "warning"; | ||
}>; | ||
|
||
const VariantIcons: Record<AlertProps["variant"], TablerIcon> = { | ||
primary: IconBulb, | ||
warning: IconAlertTriangle, | ||
}; | ||
|
||
export default function Alert({ children: childrenFromProps, className, variant = "primary", ...props }: AlertProps) { | ||
const children = useMemo<ReactNode>(() => { | ||
return Children.map(childrenFromProps, (child) => { | ||
if (isAnchor(child)) { | ||
return cloneElement(child, { ...child.props, className: classNames(child.props.className, "alert-link") }); | ||
} | ||
|
||
return child; | ||
}); | ||
}, [childrenFromProps]); | ||
|
||
return ( | ||
<div {...props} className={classNames("align-items-center alert d-flex flex-row gap-6 lh-base", `alert-${variant}`, className)}> | ||
{createElement(VariantIcons[variant], { className: "flex-shrink-0" })} | ||
|
||
<div>{Children.map(children, (child) => child)}</div> | ||
</div> | ||
); | ||
} | ||
|
||
function isAnchor(child: ReactNode): child is ReactElement<AnchorProps> { | ||
return isValidElement(child) && child.type === Anchor; | ||
} |
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,10 @@ | ||
import { JSX, PropsWithoutRef } from "react"; | ||
import { Link } from "wouter"; | ||
|
||
export type AnchorProps = PropsWithoutRef<JSX.IntrinsicElements["a"]>; | ||
|
||
export default function Anchor({ href, ...props }: AnchorProps) { | ||
return ( | ||
<Link target={href?.startsWith("http") ? "_blank" : undefined} to={href || ""} {...props} /> | ||
); | ||
} |
20 changes: 20 additions & 0 deletions
20
frontend/src/components/Markdown/Blockquote/Blockquote.module.scss
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,20 @@ | ||
@import "base"; | ||
|
||
.blockquote { | ||
&::before, &::after { | ||
background-color: var(--#{$prefix}primary); | ||
content: ""; | ||
height: calc(50% - 14px); | ||
left: 0; | ||
position: absolute; | ||
width: 4px; | ||
} | ||
|
||
&::before { | ||
top: 0; | ||
} | ||
|
||
&::after { | ||
bottom: 0; | ||
} | ||
} |
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,22 @@ | ||
import classNames from "classnames"; | ||
import { JSX, PropsWithoutRef } from "react"; | ||
import styles from "./Blockquote.module.scss"; | ||
|
||
export type BlockquoteProps = PropsWithoutRef<JSX.IntrinsicElements["blockquote"]>; | ||
|
||
export default function Blockquote({ children, className, ...props }: BlockquoteProps) { | ||
return ( | ||
<blockquote | ||
{...props} | ||
className={classNames( | ||
"font-serif fs-5 fst-italic fw-medium lh-base position-relative pe-8 ps-16 py-8", | ||
styles.blockquote, | ||
className, | ||
)} | ||
> | ||
<div className="fs-2 mt-3 position-absolute start-0 top-50 text-primary translate-middle">“</div> | ||
|
||
{children} | ||
</blockquote> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.