From 52db8059365a3d8301a61ccfcb25eb9d90066dc4 Mon Sep 17 00:00:00 2001 From: Hongzzz Date: Wed, 5 Apr 2023 13:57:19 +0800 Subject: [PATCH] fix: notion icon support base64 --- components/NotionIcon.js | 4 ++-- styles/notion.css | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/NotionIcon.js b/components/NotionIcon.js index d086fee0..79d1b270 100644 --- a/components/NotionIcon.js +++ b/components/NotionIcon.js @@ -8,10 +8,10 @@ const NotionIcon = ({ icon }) => { return <> } - if (icon.startsWith('http')) { + if (icon.startsWith('http') || icon.startsWith('data:')) { // return // eslint-disable-next-line @next/next/no-img-element - return + return } return {icon} diff --git a/styles/notion.css b/styles/notion.css index b316bcee..40d0e86c 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -1,5 +1,5 @@ :root { - --fg-color: rgb(0, 0, 0); + --fg-color: rgb(0, 0, 0); --fg-color-0: rgba(55, 53, 47, 0.09); --fg-color-1: rgba(55, 53, 47, 0.16); --fg-color-2: rgba(55, 53, 47, 0.4); @@ -714,6 +714,7 @@ svg.notion-page-icon { /* height: 100%; */ height: auto !important; max-height: 100%; + margin: auto; } .notion-asset-wrapper iframe { @@ -755,7 +756,7 @@ pre[class*='language-'] { code[class*='language-'] { background: unset !important; } - + .notion-code { padding: 30px 16px 30px 20px; border-bottom-right-radius: 0.5rem; @@ -1935,7 +1936,7 @@ svg + .notion-page-title-text { } ::selection { - @apply bg-blue-500 text-gray-50 !important; + @apply bg-blue-500 text-gray-50 !important; } .dark img{ @@ -2020,4 +2021,4 @@ code.language-mermaid { -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; -} \ No newline at end of file +}