Skip to content

Commit

Permalink
fix: footer behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
turtton committed Feb 7, 2023
1 parent 124e691 commit 56c36f2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
9 changes: 5 additions & 4 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<footer style={css}>
<p>
Powered by <a href="https://github.com/turtton/volglass">Volglass</a>, © 2022
</p>
Powered by <a href="https://github.com/turtton/volglass">Volglass</a>, © 2023
</footer>
);
}
26 changes: 15 additions & 11 deletions src/components/MDContentData.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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
Expand All @@ -51,16 +58,13 @@ function MDContent({ content, backLinks }: MDContentData): JSX.Element {

return (
<div className="markdown-rendered">
{/* <Alert severity="info"> */}
{/* <AlertTitle>Want to know more?</AlertTitle> */}
{/* 🌱 <strong>Follow</strong> or <strong>DM</strong> me on Twitter at <span><a */}
{/* href="https://twitter.com/tuancm">@tuancm</a></span> */}
{/* </Alert> */}
<div dangerouslySetInnerHTML={{ __html: content.join("") }} />
{/* <button onClick={handleInternalLinkClick}>Click me</button> */}
{/* <hr/> */}
<div>
<BackLinks linkList={backLinks} />
<div style={contentCss}>
<div dangerouslySetInnerHTML={{ __html: content.join("") }} />
{/* <button onClick={handleInternalLinkClick}>Click me</button> */}
{/* <hr/> */}
<div style={{ marginBottom: "3em" }}>
<BackLinks linkList={backLinks} />
</div>
</div>
<Footer />
</div>
Expand Down
13 changes: 3 additions & 10 deletions src/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ a:hover {

.markdown-rendered {
position: relative;
overflow: auto;
display: flex;
flex-direction: column;
overflow: hidden;
font-size: 18px;
line-height: 1.6em;
width: 100%;
height: 100%;
background-color: var(--background-primary);
color: var(--text-normal);
font-family: var(--default-font);
padding: 15px 30px;
}

.markdown-rendered code {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 56c36f2

Please sign in to comment.