Browse Source

feat: add small about paragraph

develop
Garrit Franke 3 years ago
parent
commit
ddbdab3f26
Signed by: garrit
GPG Key ID: 65586C4DDA55EA2C
  1. 12
      components/BlogList.js
  2. 16
      components/Layout.js
  3. 1
      components/Page.js
  4. 9
      content/index.md

12
components/BlogList.js

@ -22,10 +22,12 @@ const BlogList = ({ posts }) => {
a.frontmatter.date < b.frontmatter.date ? 1 : -1
)
.map((post) => (
<a href={`/posts/${post.slug}`}>
<div className="blog__list__post">
<div className="blog__list__post">
<a href={`/posts/${post.slug}`}>
<h2>{post.frontmatter.title}</h2>
<h4 className="blog__list__post__date">{reformatDate(post.frontmatter.date)}</h4>
<h4 className="blog__list__post__date">
{reformatDate(post.frontmatter.date)}
</h4>
<p>
<ReactMarkdown
source={truncateSummary(
@ -33,8 +35,8 @@ const BlogList = ({ posts }) => {
)}
/>
</p>
</div>
</a>
</a>
</div>
))}
</div>
);

16
components/Layout.js

@ -3,27 +3,11 @@ import Header from "./Header";
import Footer from "./Footer";
import Meta from "./Meta";
function useWindowSize() {
const [size, setSize] = useState([0, 0]);
useLayoutEffect(() => {
function updateSize() {
setSize([window.innerWidth, window.innerHeight]);
}
window.addEventListener("resize", updateSize);
updateSize();
return () => window.removeEventListener("resize", updateSize);
}, []);
return size;
}
export default function Layout({
siteTitle,
siteDescription,
children,
pathname,
}) {
const [windowWidth, windowHeight] = useWindowSize();
return (
<section className={`layout`}>
<Meta siteTitle={siteTitle} siteDescription={siteDescription} />

1
components/Page.js

@ -2,7 +2,6 @@ import Layout from "./Layout";
export default function Page(props) {
const { title, date, siteTitle } = props;
console.log(props);
return (
<Layout siteTitle={siteTitle}>
<article className="page">

9
content/index.md

@ -7,3 +7,12 @@ My interests include...
* Programming Language Design
* Minimalist Software
* Free Software
&emsp;
On my [blog](/posts), I ramble about software and tech-related topics. Check
out my [todos](/todo) if you need inspiration for your next project.
I'm always up for a chat. Feel free to reach out via
[Email](mailto:garrit@slashdev.space) or
[Matrix](https://matrix.to/#/@garrit:matrix.slashdev.space).

Loading…
Cancel
Save