Skip to content

Commit

Permalink
블로그 기본 틀 추가, 테스트 글 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wish-jang committed Nov 6, 2023
1 parent 33054bd commit e528dbb
Show file tree
Hide file tree
Showing 13 changed files with 323 additions and 222 deletions.
7 changes: 7 additions & 0 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ const config: GatsbyConfig = {
},
__key: "pages",
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `posts`,
path: `${__dirname}/posts/`,
},
},
{
resolve: `gatsby-plugin-google-gtag`,
options: {
Expand Down
67 changes: 43 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions posts/test1/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "My First Post"
date: "2021-07-23"
slug: "my-first-post"
hero_image: "./michiel-annaert-qXdb_erAnqQ-unsplash.jpg"
hero_image_alt: "A gray pitbull relaxing on the sidewalk with its tongue hanging out"
hero_image_credit_text: "Christopher Ayme"
hero_image_credit_link: "https://unsplash.com/photos/ocZ-_Y7-Ptg"
---

This is my first blog post! Isn't it _great_?

Some of my **favorite** things are:

- Petting dogs
- Singing
- Eating potato-based foods
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions posts/test2/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Another Post"
date: "2021-07-24"
slug: "another-post"
hero_image: "./michiel-annaert-qXdb_erAnqQ-unsplash.jpg"
hero_image_alt: "A gray pitbull relaxing on the sidewalk with its tongue hanging out"
hero_image_credit_text: "Christopher Ayme"
hero_image_credit_link: "https://unsplash.com/photos/ocZ-_Y7-Ptg"
---

Here's another post! It's even better than the first one!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions src/components/GlobalStyles.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import * as React from "react";
import { Global, css } from "@emotion/react";
import { Link, type HeadFC, type PageProps } from "gatsby";

const globalStyles = css`
html {
font-size: 62.5%;
}
button {
background: none;
border: none;
}
a {
text-decoration: none;
font-size: 1.4rem;
}
@font-face {
font-family: "Pretendard-Regular";
src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff")
format("woff");
font-weight: 400;
font-style: normal;
}
body {
font-family: "Pretendard-Regular", -apple-system, Roboto, sans-serif, serif;
}
`;

const GlobalStyles: React.FC<PageProps> = () => {
return <Global styles={globalStyles} />;
};

export default GlobalStyles;
79 changes: 79 additions & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import * as React from "react";
import { Global, css } from "@emotion/react";
import { Link, useStaticQuery, graphql } from "gatsby";
import GlobalStyles from "./GlobalStyles";

const pageStyles = {
color: "#232129",
padding: 64,
height: "100%",
// fontFamily: "-apple-system, Roboto, sans-serif, serif",
};

const Layout = ({ children }) => {
const data = useStaticQuery(graphql`
query {
site {
siteMetadata {
title
}
}
}
`);

return (
<div style={pageStyles}>
<GlobalStyles />
<div>
<header
css={css`
display: flex;
justify-content: space-between;
flex: 1;
`}
>
<div
css={css`
font-weight: bold;
`}
>
{data.site.siteMetadata.title}
</div>
<nav
css={css`
justify-content: space-between;
`}
>
<Link
to="/"
css={css`
font-weight: bold;
`}
>
Home
</Link>
<button
css={css`
font-weight: bold;
`}
>
Post
</button>
<Link
to="/resume"
css={css`
font-weight: bold;
`}
>
Resume
</Link>
</nav>
</header>
</div>
<main>{children}</main>
<footer>{/* Add your footer content here */}</footer>
</div>
);
};

export default Layout;
Empty file added src/components/Seo.tsx
Empty file.
Loading

0 comments on commit e528dbb

Please sign in to comment.