Skip to content

Commit

Permalink
Fixed files formatting (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
karelklima authored Oct 5, 2022
1 parent 86a335f commit c467488
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 10 additions & 9 deletions www/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,20 @@ const baseLinkClass =
"flex flex-row p-4 border-b-2 hover:border-black dark:hover:border-red-700 dark:hover:text-white";

function MenuItem({ title, url, activeLink }: MenuItemProps) {
const linkClass =
url === activeLink
? `${baseLinkClass} border-black dark:border-red-700 bg-gray-50 dark:bg-gray-800`
: `${baseLinkClass} border-transparent`;
const linkClass = url === activeLink
? `${baseLinkClass} border-black dark:border-red-700 bg-gray-50 dark:bg-gray-800`
: `${baseLinkClass} border-transparent`;
return (
<li>
<a href={url} class={linkClass}>
<span>{title}</span>
{url.startsWith("http") ? (
<span class="ml-1 mt-1 w-2 h-2 text-gray-400">
<IconExternalLink />
</span>
) : null}
{url.startsWith("http")
? (
<span class="ml-1 mt-1 w-2 h-2 text-gray-400">
<IconExternalLink />
</span>
)
: null}
</a>
</li>
);
Expand Down
3 changes: 2 additions & 1 deletion www/routes/docs/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ function Content(props: { page: Page }) {
data-light-theme="light"
data-dark-theme="dark"
dangerouslySetInnerHTML={{ __html: html }}
></article>
>
</article>
<ForwardBackButtons slug={props.page.slug} />
</div>
);
Expand Down

0 comments on commit c467488

Please sign in to comment.