From 81ff604c0daded0fc7b9f022c027ca9768247dd0 Mon Sep 17 00:00:00 2001 From: tlyong1992 Date: Wed, 8 Jun 2022 12:57:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=85=A7=E7=89=87=E9=9B=86?= =?UTF-8?q?=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/NotionPage.js | 1 + styles/notion.css | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/components/NotionPage.js b/components/NotionPage.js index 7c25f2dc..cad7fcf1 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -33,6 +33,7 @@ const NotionPage = ({ post }) => { const zoom = isBrowser() && mediumZoom({ container: '.notion-viewport', background: 'rgba(0, 0, 0, 0.2)', + scrollOffset: 200, margin: getMediumZoomMargin() }) diff --git a/styles/notion.css b/styles/notion.css index a43bfcc1..a6361d76 100644 --- a/styles/notion.css +++ b/styles/notion.css @@ -207,6 +207,20 @@ .medium-zoom-image--opened { 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 {