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 a.frontmatter.date < b.frontmatter.date ? 1 : -1
) )
.map((post) => ( .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> <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> <p>
<ReactMarkdown <ReactMarkdown
source={truncateSummary( source={truncateSummary(
@ -33,8 +35,8 @@ const BlogList = ({ posts }) => {
)} )}
/> />
</p> </p>
</div> </a>
</a> </div>
))} ))}
</div> </div>
); );

16
components/Layout.js

@ -3,27 +3,11 @@ import Header from "./Header";
import Footer from "./Footer"; import Footer from "./Footer";
import Meta from "./Meta"; 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({ export default function Layout({
siteTitle, siteTitle,
siteDescription, siteDescription,
children, children,
pathname,
}) { }) {
const [windowWidth, windowHeight] = useWindowSize();
return ( return (
<section className={`layout`}> <section className={`layout`}>
<Meta siteTitle={siteTitle} siteDescription={siteDescription} /> <Meta siteTitle={siteTitle} siteDescription={siteDescription} />

1
components/Page.js

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

9
content/index.md

@ -7,3 +7,12 @@ My interests include...
* Programming Language Design * Programming Language Design
* Minimalist Software * Minimalist Software
* Free 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