File tree Expand file tree Collapse file tree 4 files changed +27
-27
lines changed Expand file tree Collapse file tree 4 files changed +27
-27
lines changed Original file line number Diff line number Diff line change @@ -38,18 +38,16 @@ export function FooterImpl() {
3838 < div className = { styles . copyright } >
3939 Copyright { currentYear } { config . author }
4040 </ div >
41-
4241 < div className = { styles . settings } >
4342 { hasMounted && (
44- < a
43+ < button
44+ type = "button"
4545 className = { styles . toggleDarkMode }
46- href = '#'
47- role = 'button'
4846 onClick = { onToggleDarkMode }
4947 title = 'Toggle dark mode'
5048 >
5149 { isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
52- </ a >
50+ </ button >
5351 ) }
5452 </ div >
5553
Original file line number Diff line number Diff line change @@ -23,12 +23,13 @@ function ToggleThemeButton() {
2323 } , [ toggleDarkMode ] )
2424
2525 return (
26- < div
26+ < button
27+ type = "button"
2728 className = { cs ( 'breadcrumb' , 'button' , ! hasMounted && styles . hidden ) }
2829 onClick = { onToggleTheme }
2930 >
3031 { hasMounted && isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
31- </ div >
32+ </ button >
3233 )
3334}
3435
@@ -59,23 +60,22 @@ export function NotionPageHeader({
5960 return (
6061 < components . PageLink
6162 href = { mapPageUrl ( link . pageId ) }
62- key = { index }
63+ key = { `nav- ${ link . pageId } - ${ link . title } ` }
6364 className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
6465 >
6566 { link . title }
6667 </ components . PageLink >
6768 )
68- } else {
69- return (
70- < components . Link
71- href = { link . url }
72- key = { index }
73- className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
74- >
75- { link . title }
76- </ components . Link >
77- )
7869 }
70+ return (
71+ < components . Link
72+ href = { link . url }
73+ key = { `nav-${ link . url } -${ link . title } ` }
74+ className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
75+ >
76+ { link . title }
77+ </ components . Link >
78+ )
7979 } )
8080 . filter ( Boolean ) }
8181
Original file line number Diff line number Diff line change 6666 user-select : none;
6767}
6868
69- .settings a ,
69+ .settings button ,
7070.social a {
7171 cursor : pointer;
7272 font-size : 2em ;
7676 transition : color 250ms ease-out;
7777}
7878
79- .settings a : last-of-type ,
79+ .settings button : last-of-type ,
8080.social a : last-of-type {
8181 margin-right : 0 ;
8282}
8383
84- .settings a : hover ,
84+ .settings button : hover ,
8585.social a : hover {
8686 transition : color 50ms ease-out;
8787}
8888
89- .toggleDarkMode : hover {
90- color : # 2795e9 ;
89+ .settings button {
90+ /* Reset default button styles */
91+ background : none;
92+ border : none;
9193}
9294
9395.twitter : hover {
Original file line number Diff line number Diff line change 11import ky from 'ky'
22import lqip from 'lqip-modern'
3- import {
4- type ExtendedRecordMap ,
5- type PreviewImage ,
6- type PreviewImageMap
3+ import type {
4+ ExtendedRecordMap ,
5+ PreviewImage ,
6+ PreviewImageMap
77} from 'notion-types'
88import { getPageImageUrls , normalizeUrl } from 'notion-utils'
99import pMap from 'p-map'
You can’t perform that action at this time.
0 commit comments