mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-23 07:26:47 +00:00
@@ -33,6 +33,7 @@ const NotionPage = ({ post }) => {
|
|||||||
const zoom = isBrowser() && mediumZoom({
|
const zoom = isBrowser() && mediumZoom({
|
||||||
container: '.notion-viewport',
|
container: '.notion-viewport',
|
||||||
background: 'rgba(0, 0, 0, 0.2)',
|
background: 'rgba(0, 0, 0, 0.2)',
|
||||||
|
scrollOffset: 200,
|
||||||
margin: getMediumZoomMargin()
|
margin: getMediumZoomMargin()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -58,15 +59,14 @@ const NotionPage = ({ post }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 相册中的url替换成可点击
|
||||||
const cards = document.getElementsByClassName('notion-collection-card')
|
const cards = document.getElementsByClassName('notion-collection-card')
|
||||||
for (const e of cards) {
|
for (const e of cards) {
|
||||||
e.removeAttribute('href')
|
e.removeAttribute('href')
|
||||||
const links = e.querySelectorAll('.notion-link')
|
const links = e.querySelectorAll('.notion-link')
|
||||||
if (links && links.length > 0) {
|
if (links && links.length > 0) {
|
||||||
for (const l of links) {
|
for (const l of links) {
|
||||||
l.onclick = function() {
|
l.parentElement.innerHTML = `<a href='${l.innerText}' rel='noreferrer' target='_blank'>${l.innerText}</a>`
|
||||||
window.open('http://' + l.innerText)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ const NotionPage = ({ post }) => {
|
|||||||
}, 800)
|
}, 800)
|
||||||
|
|
||||||
addWatch4Dom()
|
addWatch4Dom()
|
||||||
})
|
}, [])
|
||||||
|
|
||||||
return <div id='container' className='max-w-4xl mx-auto'>
|
return <div id='container' className='max-w-4xl mx-auto'>
|
||||||
<NotionRenderer
|
<NotionRenderer
|
||||||
|
|||||||
@@ -156,10 +156,6 @@ nav {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.medium-zoom-image--opened{
|
|
||||||
/* width: auto !important; */
|
|
||||||
}
|
|
||||||
|
|
||||||
[data-waline] p {
|
[data-waline] p {
|
||||||
color: var(--waline-color);
|
color: var(--waline-color);
|
||||||
@apply dark:text-gray-200 !important
|
@apply dark:text-gray-200 !important
|
||||||
|
|||||||
@@ -207,6 +207,20 @@
|
|||||||
|
|
||||||
.medium-zoom-image--opened {
|
.medium-zoom-image--opened {
|
||||||
z-index: 301;
|
z-index: 301;
|
||||||
|
/* width: auto !important; */
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px){
|
||||||
|
.medium-zoom-image--opened {
|
||||||
|
object-fit: fill !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px){
|
||||||
|
.medium-zoom-image--opened {
|
||||||
|
object-fit: scale-down !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.notion-frame {
|
.notion-frame {
|
||||||
|
|||||||
Reference in New Issue
Block a user