Skip to content

Commit

Permalink
Merge branch 'json-schema-org:main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
1p22geo authored May 30, 2024
2 parents f4a87eb + cb26cf6 commit ee057c5
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 17 deletions.
2 changes: 1 addition & 1 deletion components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export const DocsNav = ({
</div>
{/* Reference */}

<div className='mb-2 bg-slate-200 dark:bg-slate-900 p-2 rounded border border-white shadow-lg lg:border-hidden '>
<div className='mb-2 bg-slate-200 dark:bg-slate-900 p-2 rounded border border-white lg:border-hidden '>
<div
className='flex justify-between w-full items-center'
onClick={handleClickReference}
Expand Down
48 changes: 34 additions & 14 deletions components/StyledMarkdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,21 +540,41 @@ export function TableOfContentMarkdown({
);
},
},
h2: {
component: ({ children }) => {
const slug = slugifyMarkdownHeadline(children);
return (
<a
href={`#${slug}`}
className='block cursor-pointer mb-3 max-sm:text-sm text-slate-600 dark:text-slate-300 leading-4 -ml-[9px] max-sm:-ml-[7px] font-medium'
>
<span className='mr-1 text-blue-400 text-[1em]'>&#9679;</span>
{children}
</a>
);
},
},

/* eslint-disable */
h2:
depth === 0
? {
component: ({ children }) => {
const slug = slugifyMarkdownHeadline(children);
return (
<a
href={`#${slug}`}
className='block cursor-pointer mb-3 text-slate-600 dark:text-slate-300 leading-4 font-medium'
>
{children}
</a>
);
},
}
: depth >= 2
? {
component: ({ children }) => {
const slug = slugifyMarkdownHeadline(children);
return (
<a
href={`#${slug}`}
className='block cursor-pointer mb-3 max-sm:text-sm text-slate-600 dark:text-slate-300 leading-4 -ml-[9px] max-sm:-ml-[7px] font-medium'
>
<span className='mr-1 text-blue-400 text-[1em]'>
&#9679;
</span>
{children}
</a>
);
},
}
: { component: () => null },
h3:
depth >= 3
? {
Expand Down
2 changes: 1 addition & 1 deletion pages/blog/posts/[slug].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function StaticMarkdownPage({
},
)}
</div>
<div className='pt-4 pr-4 border-r border-slate-100 hidden lg:block w-full'>
<div className='pt-4 pr-4 hidden lg:block w-full'>
<div className='uppercase text-xs text-slate-400 mb-4'>
on this page
</div>
Expand Down
2 changes: 1 addition & 1 deletion pages/blog/posts/understanding-lexical-dynamic-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,6 @@ Schema](https://www.oreilly.com/library/view/unifying-business-data/978109814499
You can also connect with me on
[LinkedIn](https://www.linkedin.com/in/jviotti/).

***


*Image by [Christina Morillo](https://www.pexels.com/@divinetechygirl/) from [Pexels](https://www.pexels.com/photo/man-standing-infront-of-white-board-1181345/).*

0 comments on commit ee057c5

Please sign in to comment.