|
@ -1,4 +1,4 @@ |
|
|
import { css } from "@emotion/css"; |
|
|
import { css, cx } from "@emotion/css"; |
|
|
import React, { useEffect, useState } from "react"; |
|
|
import React, { useEffect, useState } from "react"; |
|
|
import { Link, useLocation, useNavigate } from "react-router-dom"; |
|
|
import { Link, useLocation, useNavigate } from "react-router-dom"; |
|
|
import { Spacer } from "../../components/Spacer"; |
|
|
import { Spacer } from "../../components/Spacer"; |
|
@ -6,7 +6,6 @@ import { ArticleSubHeader } from "./components/ArticleSubHeader"; |
|
|
import { BlogPost } from "./components/BlogContent"; |
|
|
import { BlogPost } from "./components/BlogContent"; |
|
|
import { articles, getBlogPath } from "../../data"; |
|
|
import { articles, getBlogPath } from "../../data"; |
|
|
import { ReactComponent as DrawClose } from "../../assets/arrow-thin.svg"; |
|
|
import { ReactComponent as DrawClose } from "../../assets/arrow-thin.svg"; |
|
|
import classNames from "classnames"; |
|
|
|
|
|
|
|
|
|
|
|
const Header: React.FC = () => { |
|
|
const Header: React.FC = () => { |
|
|
return ( |
|
|
return ( |
|
@ -84,7 +83,7 @@ const BlogHome: React.FC = () => { |
|
|
<div |
|
|
<div |
|
|
data-home |
|
|
data-home |
|
|
key="blog-home" |
|
|
key="blog-home" |
|
|
className={classNames( |
|
|
className={cx( |
|
|
{ "article-open": isArticleOpen, "aside-closed": isAsideClosed }, |
|
|
{ "article-open": isArticleOpen, "aside-closed": isAsideClosed }, |
|
|
css` |
|
|
css` |
|
|
display: flex; |
|
|
display: flex; |
|
@ -132,7 +131,7 @@ const BlogHome: React.FC = () => { |
|
|
)}> |
|
|
)}> |
|
|
<button |
|
|
<button |
|
|
onClick={() => setAsideClosed(closed => !closed)} |
|
|
onClick={() => setAsideClosed(closed => !closed)} |
|
|
className={classNames( |
|
|
className={cx( |
|
|
"draw-ctl", |
|
|
"draw-ctl", |
|
|
css` |
|
|
css` |
|
|
border: none; |
|
|
border: none; |
|
@ -160,7 +159,7 @@ const BlogHome: React.FC = () => { |
|
|
)}> |
|
|
)}> |
|
|
<DrawClose |
|
|
<DrawClose |
|
|
style={{ width: "2.6rem", height: "1rem" }} |
|
|
style={{ width: "2.6rem", height: "1rem" }} |
|
|
className={classNames( |
|
|
className={cx( |
|
|
css` |
|
|
css` |
|
|
transform: rotate(180deg); |
|
|
transform: rotate(180deg); |
|
|
transition: transform 100ms; |
|
|
transition: transform 100ms; |
|
@ -182,7 +181,7 @@ const BlogHome: React.FC = () => { |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
`}>
|
|
|
`}>
|
|
|
<div |
|
|
<div |
|
|
className={classNames( |
|
|
className={cx( |
|
|
"blog-list", |
|
|
"blog-list", |
|
|
css` |
|
|
css` |
|
|
width: 100%; |
|
|
width: 100%; |
|
@ -240,7 +239,7 @@ const BlogHome: React.FC = () => { |
|
|
</div> |
|
|
</div> |
|
|
</aside> |
|
|
</aside> |
|
|
<article |
|
|
<article |
|
|
className={classNames( |
|
|
className={cx( |
|
|
{ "article-open": isArticleOpen }, |
|
|
{ "article-open": isArticleOpen }, |
|
|
css` |
|
|
css` |
|
|
height: 100%; |
|
|
height: 100%; |
|
@ -259,7 +258,7 @@ const BlogHome: React.FC = () => { |
|
|
)}> |
|
|
)}> |
|
|
<div |
|
|
<div |
|
|
key="blog-content" |
|
|
key="blog-content" |
|
|
className={classNames( |
|
|
className={cx( |
|
|
css` |
|
|
css` |
|
|
background: #111111; |
|
|
background: #111111; |
|
|
position: absolute; |
|
|
position: absolute; |
|
|