BlogList updated
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import Link from 'next/link'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import Link from "next/link"
|
||||
import ReactMarkdown from "react-markdown"
|
||||
import styles from "../styles/BlogList.module.css"
|
||||
import Image from "next/image";
|
||||
|
||||
@@ -30,7 +30,7 @@ const BlogList = ({ allBlogs }) => {
|
||||
<div className={styles.blog__info}>
|
||||
<h2>{post.frontmatter.title}</h2>
|
||||
<h3>{reformatDate(post.frontmatter.date)}</h3>
|
||||
<ReactMarkdown disallowedElements={['a']}>{truncateSummary(post.markdownBody)}</ReactMarkdown>
|
||||
<ReactMarkdown disallowedElements={["a"]}>{truncateSummary(post.markdownBody)}</ReactMarkdown>
|
||||
</div>
|
||||
</Link>
|
||||
</li>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Link from "next/link";
|
||||
import styles from '../styles/Header.module.css'
|
||||
import styles from "../styles/Header.module.css"
|
||||
|
||||
export default function Header(props) {
|
||||
const isInfoPage = typeof window !== "undefined" && window.location.pathname === "/info"
|
||||
@@ -15,8 +15,8 @@ export default function Header(props) {
|
||||
<h1>{props.siteTitle}</h1>
|
||||
</Link>
|
||||
<div>
|
||||
<Link href={isInfoPage ? '/' : '/info'}>
|
||||
<h1>{isInfoPage ? 'close' : 'info'}</h1>
|
||||
<Link href={isInfoPage ? "/" : "/info"}>
|
||||
<h1>{isInfoPage ? "close" : "info"}</h1>
|
||||
</Link>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Header from "./Header";
|
||||
import Meta from './Meta'
|
||||
import styles from '../styles/Layout.module.css'
|
||||
import Meta from "./Meta"
|
||||
import styles from "../styles/Layout.module.css"
|
||||
|
||||
export default function Layout(props) {
|
||||
return (
|
||||
@@ -8,7 +8,7 @@ export default function Layout(props) {
|
||||
className={styles.layout}
|
||||
style={{
|
||||
backgroundColor: `${props.bgColor && props.bgColor}`,
|
||||
color: props.pathname === "info" ? 'white' : undefined
|
||||
color: props.pathname === "info" ? "white" : undefined
|
||||
}}
|
||||
>
|
||||
<Meta
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Head from 'next/head'
|
||||
import Head from "next/head"
|
||||
|
||||
export default function Meta(props) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user