diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index cd75fdf..51c71ba 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -1,5 +1,6 @@ import HorizontalLine from "components/HorizontalLine"; import InsetBox from "components/InsetBox"; +import ToolTip from "components/ToolTip"; import { useAppLayout } from "contexts/AppLayoutContext"; import Markdown from "markdown-to-jsx"; import { slugify } from "queries/helpers"; @@ -28,28 +29,60 @@ export default function Markdawn(props: ScenBreakProps): JSX.Element { children: React.ReactNode; }) => { return ( -

- {props.children} - - { - navigator.clipboard.writeText( - process.env.NEXT_PUBLIC_URL_SELF + - window.location.pathname + - "#" + - props.id - ); - }} - > - link - - -

+
+

+ {props.children} +

+ + + { + navigator.clipboard.writeText( + process.env.NEXT_PUBLIC_URL_SELF + + window.location.pathname + + "#" + + props.id + ); + }} + > + link + + + +
+ ); + }, + }, + h3: { + component: (props: { + id: string; + style: React.CSSProperties; + children: React.ReactNode; + }) => { + return ( +
+

+ {props.children} +

+ + + { + navigator.clipboard.writeText( + process.env.NEXT_PUBLIC_URL_SELF + + window.location.pathname + + "#" + + props.id + ); + }} + > + link + + + +
); }, }, @@ -82,7 +115,7 @@ export default function Markdawn(props: ScenBreakProps): JSX.Element { Transcript: { component: (props) => { return ( -
+
{props.children}
); @@ -92,7 +125,7 @@ export default function Markdawn(props: ScenBreakProps): JSX.Element { component: (props) => { return ( <> - + {props.name}

{props.children}

diff --git a/src/components/Markdown/TOC.tsx b/src/components/Markdown/TOC.tsx index b963ee1..ed2ce6b 100644 --- a/src/components/Markdown/TOC.tsx +++ b/src/components/Markdown/TOC.tsx @@ -15,8 +15,8 @@ export default function TOC(props: TOCProps): JSX.Element { return (

Table of content

-
    -
  1. +
      +
    1. router.replace(`#${toc.slug}`)}> {{toc.title}} diff --git a/src/components/RecorderChip.tsx b/src/components/RecorderChip.tsx index 2a61174..8135f9c 100644 --- a/src/components/RecorderChip.tsx +++ b/src/components/RecorderChip.tsx @@ -3,6 +3,7 @@ import { GetContentTextQuery, GetWebsiteInterfaceQuery, } from "graphql/operations-types"; +import Button from "./Button"; import Img, { ImageQuality } from "./Img"; import ToolTip from "./ToolTip"; @@ -19,38 +20,42 @@ export default function RecorderChip(props: RecorderChipProps): JSX.Element { return ( -
      +
      +
      {recorder.attributes.avatar.data && ( )} -

      {recorder.attributes.username}

      +
      +

      {recorder.attributes.username}

      + {recorder.attributes.languages.data.length > 0 && ( +
      +

      {langui.languages}:

      + {recorder.attributes.languages.data.map((language) => ( + + {language.attributes.code.toUpperCase()} + + ))} +
      + )} + {recorder.attributes.pronouns && ( +
      +

      {langui.pronouns}:

      + {recorder.attributes.pronouns} +
      + )} +
      - {recorder.attributes.languages.data.length > 0 && ( -
      -

      {langui.languages}:

      - {recorder.attributes.languages.data.map((language) => ( - - {language.attributes.code.toUpperCase()} - - ))} -
      + + {recorder.attributes.bio.length > 0 && ( +

      {recorder.attributes.bio[0].bio}

      )} - {recorder.attributes.pronouns && ( -
      -

      {langui.pronouns}:

      - {recorder.attributes.pronouns} -
      - )} -

      - {recorder.attributes.bio.length > 0 && - recorder.attributes.bio[0].bio} -

      + +
      } placement="top" diff --git a/src/components/ToolTip.tsx b/src/components/ToolTip.tsx index aafea75..77a22fb 100644 --- a/src/components/ToolTip.tsx +++ b/src/components/ToolTip.tsx @@ -12,7 +12,7 @@ export default function ToolTip(props: ToolTipProps): JSX.Element { if (newProps.animation === undefined) newProps.animation = "scale-subtle"; return ( - +
      {props.children}
      );