فهرست منبع

refactor share link page

Yuki Takei 2 سال پیش
والد
کامیت
79c99f6050

+ 9 - 0
apps/app/src/components/Navbar/GrowiContextualSubNavigation.module.scss

@@ -1,4 +1,13 @@
 @use '~/styles/mixins';
+@use '@growi/core/scss/bootstrap/init' as bs;
+
+.grw-contextual-sub-navigation {
+  @include bs.media-breakpoint-down(md) {
+    // set min-height to keep the height
+    //  even if the item is empty on the share link page
+    min-height: 46px;
+  }
+}
 
 @include mixins.editing() {
   .grw-contextual-sub-navigation {

+ 0 - 5
apps/app/src/pages/share/[[...path]].module.scss

@@ -1,5 +0,0 @@
-@use '~/styles/variables' as var;
-
-.subnavigation-top-block {
-  height: var.$grw-sidebar-nav-width;
-}

+ 1 - 8
apps/app/src/pages/share/[[...path]].page.tsx

@@ -32,10 +32,6 @@ import {
   getServerSideCommonProps, generateCustomTitleForPage, getNextI18NextConfig, skipSSR, addActivity,
 } from '../utils/commons';
 
-import styles from './[[...path]].module.scss';
-
-const subnavigationTopBlockClass = styles['subnavigation-top-block'];
-
 
 const logger = loggerFactory('growi:next-page:share');
 
@@ -126,10 +122,7 @@ const SharedPage: NextPageWithLayout<Props> = (props: Props) => {
 
       <div className="dynamic-layout-root justify-content-between">
 
-        <div className={`${subnavigationTopBlockClass} d-block d-md-none border-bottom`}></div>
-        <nav className="sticky-top">
-          <GrowiContextualSubNavigationForSharedPage page={currentPage ?? props.shareLinkRelatedPage} isLinkSharingDisabled={props.disableLinkSharing} />
-        </nav>
+        <GrowiContextualSubNavigationForSharedPage page={currentPage ?? props.shareLinkRelatedPage} isLinkSharingDisabled={props.disableLinkSharing} />
 
         <ShareLinkPageView
           pagePath={pagePath}