Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiehe99 committed Dec 31, 2023
2 parents f06ae73 + 0e40674 commit 30d8074
Show file tree
Hide file tree
Showing 8 changed files with 269 additions and 304 deletions.
3 changes: 2 additions & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import styles from './styles.module.css'
export const FooterImpl: React.FC = () => {
const [hasMounted, setHasMounted] = React.useState(false)
const { isDarkMode, toggleDarkMode } = useDarkMode()
const currentYear = new Date().getFullYear()

const onToggleDarkMode = React.useCallback(
(e) => {
Expand All @@ -35,7 +36,7 @@ export const FooterImpl: React.FC = () => {

return (
<footer className={styles.footer}>
<div className={styles.copyright}>Copyright 2022 {config.author}</div>
<div className={styles.copyright}>Copyright {currentYear} {config.author}</div>

<div className={styles.settings}>
{hasMounted && (
Expand Down
8 changes: 7 additions & 1 deletion components/PageHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ export const PageHead: React.FC<
<meta httpEquiv='Content-Type' content='text/html; charset=utf-8' />
<meta
name='viewport'
content='width=device-width, initial-scale=1, shrink-to-fit=no'
content='width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover'
/>

<meta name='apple-mobile-web-app-capable' content='yes' />
<meta
name='apple-mobile-web-app-status-bar-style'
content='black'
/>

<meta name="theme-color" media="(prefers-color-scheme: light)" content="#fefffe" key="theme-color-light"/>
Expand Down
1 change: 1 addition & 0 deletions components/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
caret-color: rgb(55, 53, 47);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica,
'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol';
background-color: var(--bg-color);
}

.loadingIcon {
Expand Down
7 changes: 6 additions & 1 deletion lib/get-site-map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getAllPagesInSpace, uuidToId } from 'notion-utils'
import { getAllPagesInSpace, uuidToId, getPageProperty } from 'notion-utils'
import pMemoize from 'p-memoize'

import * as config from './config'
Expand Down Expand Up @@ -47,6 +47,11 @@ async function getAllPagesImpl(
throw new Error(`Error loading page "${pageId}"`)
}

const block = recordMap.block[pageId]?.value
if (!(getPageProperty<boolean|null>('Public', block, recordMap) ?? true)) {
return map
}

const canonicalPageId = getCanonicalPageId(pageId, recordMap, {
uuid
})
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"fathom-client": "^3.4.1",
"got": "^12.0.3",
"isomorphic-unfetch": "^3.1.0",
"lqip-modern": "^1.2.0",
"next": "^12.3.1",
"lqip-modern": "^2.0.0",
"next": "12",
"notion-client": "^6.15.6",
"notion-types": "^6.15.6",
"notion-utils": "^6.15.6",
Expand All @@ -49,7 +49,7 @@
"react-dom": "^18.2.0",
"react-notion-x": "^6.15.6",
"react-tweet-embed": "^2.0.0",
"react-use": "^17.3.2",
"react-use": "^17.4.2",
"rss": "^1.2.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions site.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default siteConfig({
// social usernames (optional)
twitter: 'eddiehe99',
github: 'eddiehe99',
// linkedin: 'fisch2',
// linkedin: 'fisch2',
mastodon: 'https://mastodon.world/@eddiehe99', // optional mastodon profile URL, provides link verification
newsletter: 'https://paragraph.xyz/@eddiehe', // optional newsletter URL
// youtube: '#', // optional youtube channel name or `channel/UCGbXXXXXXXXXXXXXXXXXXXXXX`
Expand Down Expand Up @@ -49,8 +49,8 @@ export default siteConfig({
pageUrlOverrides: null,

// whether to use the default notion navigation style or a custom one with links to
// important pages
// navigationStyle: 'default'
// important pages. To use `navigationLinks`, set `navigationStyle` to `custom`.
// navigationStyle: 'default'
navigationStyle: 'custom',
navigationLinks: [
{
Expand Down
19 changes: 18 additions & 1 deletion styles/notion.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
.notion-header .notion-nav-header {
max-width: 1100px;
margin: 0 auto;
overflow-x: auto;
}

.notion-nav-header-rhs {
Expand Down Expand Up @@ -364,7 +365,7 @@
.dark-mode .notion-header {
background: transparent;
box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.1);
backdrop-filter: saturate(180%) blur(8px);
backdrop-filter: saturate(180%) blur(20px);
}

/* Workaround for Firefox not supporting backdrop-filter yet */
Expand All @@ -386,3 +387,19 @@
.notion-block-260baa77f1e1428b97fb14ac99c7c385 {
display: none;
}

.notion-search .searchBar {
box-shadow: var(--fg-color-0) 0px 1px 0px;
}

.notion-search .noResults {
color: var(--fg-color-3);
}

.notion-search .noResultsDetail {
color: var(--fg-color-2);
}

.notion-equation.notion-equation-block{
align-items: center;
}
Loading

1 comment on commit 30d8074

@vercel
Copy link

@vercel vercel bot commented on 30d8074 Dec 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.