File tree Expand file tree Collapse file tree 5 files changed +34
-34
lines changed Expand file tree Collapse file tree 5 files changed +34
-34
lines changed Original file line number Diff line number Diff line change @@ -39,22 +39,20 @@ export function FooterImpl() {
3939
4040 < div className = { cs ( styles . settings , styles . toggleDarkModeContainer ) } >
4141 { hasMounted && (
42- < a
43- className = { styles . toggleDarkMode }
44- href = '#'
45- role = 'button'
46- onClick = { onToggleDarkMode }
47- title = 'Toggle dark mode'
48- >
49- { isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
50- </ a >
42+ < button
43+ type = "button"
44+ className = { styles . toggleDarkMode }
45+ onClick = { onToggleDarkMode }
46+ title = 'Toggle dark mode'
47+ >
48+ { isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
49+ </ button >
5150 ) }
5251 </ div >
5352 < div className = { styles . social } >
5453 < PageSocialButtons iconSize = { 32 } />
5554 </ div >
5655 </ div >
57-
5856 < div className = "SiteInfo" >
5957 < div className = { styles . siteInfoLinks } >
6058 { footerLinks
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
@@ -60,23 +61,22 @@ export function NotionPageHeader({
6061 return (
6162 < components . PageLink
6263 href = { mapPageUrl ( link . pageId ) }
63- key = { index }
64+ key = { `nav- ${ link . pageId } - ${ link . title } ` }
6465 className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
6566 >
6667 { link . title }
6768 </ components . PageLink >
6869 )
69- } else {
70- return (
71- < components . Link
72- href = { link . url }
73- key = { index }
74- className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
75- >
76- { link . title }
77- </ components . Link >
78- )
7970 }
71+ return (
72+ < components . Link
73+ href = { link . url }
74+ key = { `nav-${ link . url } -${ link . title } ` }
75+ className = { cs ( styles . navLink , 'breadcrumb' , 'button' ) }
76+ >
77+ { link . title }
78+ </ components . Link >
79+ )
8080 } )
8181 . filter ( Boolean ) }
8282
Original file line number Diff line number Diff line change 8181 user-select : none;
8282}
8383
84- .settings a ,
84+ .settings button ,
8585.social a {
8686 cursor : pointer;
8787 font-size : 2em ;
9191 transition : color 250ms ease-out;
9292}
9393
94- .settings a : last-of-type ,
94+ .settings button : last-of-type ,
9595.social a : last-of-type {
9696 margin-right : 0 ;
9797}
9898
99- .settings a : hover ,
99+ .settings button : hover ,
100100.social a : hover {
101101 transition : color 50ms ease-out;
102102}
103103
104- .toggleDarkMode : hover {
105- color : # 2795e9 ;
104+ .settings button {
105+ /* Reset default button styles */
106+ background : none;
107+ border : none;
106108}
107109
108110.comments {
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'
Original file line number Diff line number Diff line change 22 box-sizing : border-box;
33}
44
5- a {
5+ a , button {
66 color : inherit;
77 text-decoration : none;
88}
5757 background-color : var (--fg-color-1 );
5858}
5959
60- ::-webkit-scrollbar-track {
60+ ::-webkit-scrollbar-track {
6161 background-color : var (--bg-color );
6262}
You can’t perform that action at this time.
0 commit comments