Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions 8 components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,16 @@ export function FooterImpl() {
<div className={styles.copyright}>
Copyright {currentYear} {config.author}
</div>

<div className={styles.settings}>
{hasMounted && (
<a
<button
type="button"
className={styles.toggleDarkMode}
href='#'
role='button'
onClick={onToggleDarkMode}
title='Toggle dark mode'
>
{isDarkMode ? <IoMoonSharp /> : <IoSunnyOutline />}
</a>
</button>
)}
</div>

Expand Down
26 changes: 13 additions & 13 deletions 26 components/NotionPageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ function ToggleThemeButton() {
}, [toggleDarkMode])

return (
<div
<button
type="button"
className={cs('breadcrumb', 'button', !hasMounted && styles.hidden)}
onClick={onToggleTheme}
>
{hasMounted && isDarkMode ? <IoMoonSharp /> : <IoSunnyOutline />}
</div>
</button>
)
}

Expand Down Expand Up @@ -59,23 +60,22 @@ export function NotionPageHeader({
return (
<components.PageLink
href={mapPageUrl(link.pageId)}
key={index}
key={`nav-${link.pageId}-${link.title}`}
className={cs(styles.navLink, 'breadcrumb', 'button')}
>
{link.title}
</components.PageLink>
)
} else {
return (
<components.Link
href={link.url}
key={index}
className={cs(styles.navLink, 'breadcrumb', 'button')}
>
{link.title}
</components.Link>
)
}
return (
<components.Link
href={link.url}
key={`nav-${link.url}-${link.title}`}
className={cs(styles.navLink, 'breadcrumb', 'button')}
>
{link.title}
</components.Link>
)
})
.filter(Boolean)}

Expand Down
12 changes: 7 additions & 5 deletions 12 components/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
user-select: none;
}

.settings a,
.settings button,
.social a {
cursor: pointer;
font-size: 2em;
Expand All @@ -76,18 +76,20 @@
transition: color 250ms ease-out;
}

.settings a:last-of-type,
.settings button:last-of-type,
.social a:last-of-type {
margin-right: 0;
}

.settings a:hover,
.settings button:hover,
.social a:hover {
transition: color 50ms ease-out;
}

.toggleDarkMode:hover {
color: #2795e9;
.settings button {
/* Reset default button styles */
background: none;
border: none;
}

.twitter:hover {
Expand Down
8 changes: 4 additions & 4 deletions 8 lib/preview-images.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ky from 'ky'
import lqip from 'lqip-modern'
import {
type ExtendedRecordMap,
type PreviewImage,
type PreviewImageMap
import type {
ExtendedRecordMap,
PreviewImage,
PreviewImageMap
} from 'notion-types'
import { getPageImageUrls, normalizeUrl } from 'notion-utils'
import pMap from 'p-map'
Expand Down
4 changes: 2 additions & 2 deletions 4 styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
box-sizing: border-box;
}

a {
a, button {
color: inherit;
text-decoration: none;
}
Expand Down Expand Up @@ -57,6 +57,6 @@ body {
background-color: var(--fg-color-1);
}

::-webkit-scrollbar-track {
::-webkit-scrollbar-track {
background-color: var(--bg-color);
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.