From 56c36f2a1e8bc92dd20bd49dcf2fd3049b2a0cd4 Mon Sep 17 00:00:00 2001 From: turtton Date: Tue, 7 Feb 2023 15:33:37 +0900 Subject: [PATCH] fix: footer behavior --- src/components/Footer.tsx | 9 +++++---- src/components/MDContentData.tsx | 26 +++++++++++++++----------- src/styles/style.css | 13 +++---------- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 294564a2..5feccf4e 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -2,16 +2,17 @@ import React, { CSSProperties } from "react"; const css: CSSProperties = { position: "absolute", + top: "auto", bottom: 0, - width: "93%", + width: "100%", + textAlign: "center", + backgroundColor: "rgb(231, 242, 250)", }; export default function Footer(): JSX.Element { return ( ); } diff --git a/src/components/MDContentData.tsx b/src/components/MDContentData.tsx index c82fb915..d3bdbcca 100644 --- a/src/components/MDContentData.tsx +++ b/src/components/MDContentData.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { CSSProperties } from "react"; // import Alert from '@mui/material/Alert'; // import AlertTitle from '@mui/material/AlertTitle'; import { useRouter } from "next/router"; @@ -39,6 +39,13 @@ export interface MDContentData { backLinks: CustomNode[]; } +const contentCss: CSSProperties = { + marginTop: "15px", + padding: "0 30px", + overflow: "hidden", + overflowY: "auto", +}; + function MDContent({ content, backLinks }: MDContentData): JSX.Element { // function handleInternalLinkClick() { // //Processing fetching @@ -51,16 +58,13 @@ function MDContent({ content, backLinks }: MDContentData): JSX.Element { return (
- {/* */} - {/* Want to know more? */} - {/* 🌱 Follow or DM me on Twitter at @tuancm */} - {/* */} -
- {/* */} - {/*
*/} -
- +
+
+ {/* */} + {/*
*/} +
+ +
diff --git a/src/styles/style.css b/src/styles/style.css index 3a8a9c1e..16856789 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -96,7 +96,9 @@ a:hover { .markdown-rendered { position: relative; - overflow: auto; + display: flex; + flex-direction: column; + overflow: hidden; font-size: 18px; line-height: 1.6em; width: 100%; @@ -104,7 +106,6 @@ a:hover { background-color: var(--background-primary); color: var(--text-normal); font-family: var(--default-font); - padding: 15px 30px; } .markdown-rendered code { @@ -223,14 +224,6 @@ a:hover { padding: 0 3em; } -footer { - margin-top: 2em; - text-align: center; - background-color: rgb(231, 242, 250); - border-radius: 8px; - padding: 4px; -} - footer ul li { margin: auto; text-align: center;