Skip to content

Commit 75ca8c9

Browse files
committed
🎨 Format code with prettier
1 parent 4e07665 commit 75ca8c9

File tree

11 files changed

+94
-97
lines changed

11 files changed

+94
-97
lines changed

components/BlogCard.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@ const BlogCard: React.FC<Props> = ({ post }) => {
5858
<div className="overflow-hidden">
5959
<Link
6060
href={`/blog/posts/${slug}`}
61-
className="blog-title link inline-block outline-none dark:outline-none focus-within:underline">
62-
61+
className="blog-title link inline-block outline-none dark:outline-none focus-within:underline"
62+
>
6363
<h3 className="text-lg font-medium">{title}</h3>
64-
6564
</Link>
6665
</div>
6766
<div className="overflow-hidden">

components/BlogCardBox.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ const BlogCardBox: React.FC<Props> = ({
2828
>
2929
<div className="mb-2">
3030
<Link href={`/blog/posts/${slug}`} className="link inline-block">
31-
3231
<h3
3332
className={`${
3433
fullWH ? "text-lg sm:text-md" : "text-md"
3534
} font-medium`}
3635
>
3736
{title}
3837
</h3>
39-
4038
</Link>
4139
</div>
4240
<div className="italic text-sm mb-1 text-carddark dark:text-gray-300 flex items-center">

components/Header.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ const Header: React.FC = () => {
8585
<div className="w-full h-full mx-auto max-w-6xl flex items-center justify-between">
8686
<Link
8787
href="/"
88-
className="text-xl sm:text-2xl md:hover:text-marrsgreen dark:md:hover:text-carrigreen focus-visible:outline-marrsgreen dark:focus-visible:outline-carrigreen">
89-
SatNaing<span className="text-marrsgreen dark:text-carrigreen">.dev</span>
90-
88+
className="text-xl sm:text-2xl md:hover:text-marrsgreen dark:md:hover:text-carrigreen focus-visible:outline-marrsgreen dark:focus-visible:outline-carrigreen"
89+
>
90+
SatNaing
91+
<span className="text-marrsgreen dark:text-carrigreen">.dev</span>
9192
</Link>
9293
<div className="flex">
9394
<nav className="hidden md:block">

components/blog/BlogHeader.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ const BlogHeader: React.FC = () => {
3030
<div className="w-full h-full mx-auto max-w-6xl flex items-center justify-between">
3131
<Link
3232
href="/blog"
33-
className="after:content-['blog'] after:bg-bgdark dark:after:bg-bglight after:text-textlight dark:after:text-bgdark after:text-base after:px-2 after:inline-block after:rotate-12 after:absolute after:-right-12 hover:after:rotate-0 relative text-xl sm:text-2xl hover:text-marrsgreen dark:hover:text-carrigreen focus-visible:outline-marrsgreen dark:focus-visible:outline-carrigreen">
34-
SatNaing<span className="text-marrsgreen dark:text-carrigreen">.dev</span>
35-
33+
className="after:content-['blog'] after:bg-bgdark dark:after:bg-bglight after:text-textlight dark:after:text-bgdark after:text-base after:px-2 after:inline-block after:rotate-12 after:absolute after:-right-12 hover:after:rotate-0 relative text-xl sm:text-2xl hover:text-marrsgreen dark:hover:text-carrigreen focus-visible:outline-marrsgreen dark:focus-visible:outline-carrigreen"
34+
>
35+
SatNaing
36+
<span className="text-marrsgreen dark:text-carrigreen">.dev</span>
3637
</Link>
3738
<div className="flex">
3839
<nav className="hidden md:block">
@@ -47,10 +48,9 @@ const BlogHeader: React.FC = () => {
4748
${
4849
router.pathname === navLink.url &&
4950
"text-marrsgreen dark:text-carrigreen"
50-
}`}>
51-
51+
}`}
52+
>
5253
{navLink.text}
53-
5454
</Link>
5555
</li>
5656
))}

components/blog/HeadCategory.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ const HeadCategory: React.FC<Props> = ({ category }) => {
2525
</svg>{" "}
2626
<Link
2727
href={slug ? `/blog/categories/${slug}` : "uncategorized"}
28-
className="hover:text-marrsgreen dark:hover:text-carrigreen font-medium outline-marrsgreen dark:outline-carrigreen">
29-
28+
className="hover:text-marrsgreen dark:hover:text-carrigreen font-medium outline-marrsgreen dark:outline-carrigreen"
29+
>
3030
{category ? category : "uncategorized"}
31-
3231
</Link>
3332
</span>
3433
);

components/blog/Tag.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ type Props = {
88

99
const Tag: React.FC<Props> = ({ tag, size = "sm", count }) => {
1010
return (
11-
(<Link
11+
<Link
1212
href={`/blog/tags/${tag}`}
1313
key={tag}
1414
passHref
1515
className={`blog-tag link-outline group whitespace-nowrap dark:fill-bglight hover:bg-marrsgreen hover:text-bglight hover:fill-bglight dark:hover:bg-carrigreen dark:hover:text-bgdark dark:hover:fill-bgdark ${
1616
size === "lg"
1717
? "py-2 px-3 text-base mr-4 my-2"
1818
: "py-1 px-2 text-xs mr-2 my-1"
19-
} bg-gray-300 dark:bg-carddark rounded inline-block shadow hover:shadow-md cursor-pointer`}>
20-
19+
} bg-gray-300 dark:bg-carddark rounded inline-block shadow hover:shadow-md cursor-pointer`}
20+
>
2121
<svg
2222
xmlns="http://www.w3.org/2000/svg"
2323
width="24"
@@ -35,8 +35,7 @@ const Tag: React.FC<Props> = ({ tag, size = "sm", count }) => {
3535
{count}
3636
</span>
3737
)}
38-
39-
</Link>)
38+
</Link>
4039
);
4140
};
4241

pages/404.tsx

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,43 @@ import { meta } from "pages";
88
import Link from "next/link";
99

1010
const Home: NextPage = () => {
11-
return <>
12-
<AppHead
13-
title="Sat Naing - A Full-stack Developer"
14-
url={`${process.env.NEXT_PUBLIC_URL}`}
15-
meta={meta}
16-
/>
17-
<div className="bg-bglight dark:bg-bgdark overflow-hidden">
18-
<div className="h-screen flex flex-col justify-center selection:bg-marrsgreen selection:text-bglight dark:selection:bg-carrigreen dark:selection:text-bgdark">
19-
<div className="flex justify-center items-center flex-col mt-auto">
20-
<h1 className="text-8xl xs:text-9xl font-bold text-marrsgreen dark:text-carrigreen">
21-
404
22-
</h1>
23-
<div className="text-lg xs:text-2xl my-2">
24-
Page Not Found :&apos;&#40;
25-
</div>
26-
<div className="max-w-xs text-center mb-10">
27-
It seems the page you&apos;re looking for does not exist, or there
28-
might be a typo in the URL.
29-
</div>
30-
<div className="flex space-x-4">
31-
<LinkButton href="/" outline>
32-
Go back Home
33-
</LinkButton>
34-
<Link
35-
href="/blog"
36-
className="link flex items-center px-4 lg:text-xl hover:underline">
37-
11+
return (
12+
<>
13+
<AppHead
14+
title="Sat Naing - A Full-stack Developer"
15+
url={`${process.env.NEXT_PUBLIC_URL}`}
16+
meta={meta}
17+
/>
18+
<div className="bg-bglight dark:bg-bgdark overflow-hidden">
19+
<div className="h-screen flex flex-col justify-center selection:bg-marrsgreen selection:text-bglight dark:selection:bg-carrigreen dark:selection:text-bgdark">
20+
<div className="flex justify-center items-center flex-col mt-auto">
21+
<h1 className="text-8xl xs:text-9xl font-bold text-marrsgreen dark:text-carrigreen">
22+
404
23+
</h1>
24+
<div className="text-lg xs:text-2xl my-2">
25+
Page Not Found :&apos;&#40;
26+
</div>
27+
<div className="max-w-xs text-center mb-10">
28+
It seems the page you&apos;re looking for does not exist, or there
29+
might be a typo in the URL.
30+
</div>
31+
<div className="flex space-x-4">
32+
<LinkButton href="/" outline>
33+
Go back Home
34+
</LinkButton>
35+
<Link
36+
href="/blog"
37+
className="link flex items-center px-4 lg:text-xl hover:underline"
38+
>
3839
Go to Blog
39-
40-
</Link>
40+
</Link>
41+
</div>
4142
</div>
43+
<Footer noPadding />
4244
</div>
43-
<Footer noPadding />
4445
</div>
45-
</div>
46-
</>;
46+
</>
47+
);
4748
};
4849

4950
export default Home;

pages/api/hello.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2-
import type { NextApiRequest, NextApiResponse } from 'next'
2+
import type { NextApiRequest, NextApiResponse } from "next";
33

44
type Data = {
5-
name: string
6-
}
5+
name: string;
6+
};
77

88
export default function handler(
99
req: NextApiRequest,
1010
res: NextApiResponse<Data>
1111
) {
12-
res.status(200).json({ name: 'John Doe' })
12+
res.status(200).json({ name: "John Doe" });
1313
}

pages/blog/categories/index.tsx

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -61,45 +61,46 @@ const Blog: NextPage<Props> = ({ categories, categorizedPosts }) => {
6161
});
6262
}, []);
6363

64-
return <>
65-
<AppHead title="Blog - Sat Naing" />
66-
<Loader>Categories</Loader>
67-
<div ref={sectionRef} className="bg-bglight dark:bg-bgdark">
68-
<div className="selection:bg-marrsgreen selection:text-bglight dark:selection:bg-carrigreen dark:selection:text-bgdark">
69-
<SkipToMain />
70-
<BlogHeader />
71-
<SocialLinks />
72-
<main id="main" className="blog-main">
73-
<section className="blog-section">
74-
<h1 className="text-3xl lg:text-4xl font-bold mb-4">
75-
Categories
76-
</h1>
77-
{categories.map((category) => (
78-
<div key={category} className="my-4">
79-
<Link
80-
href={`/blog/categories/${slugify(category)}`}
81-
className="inline-block link-outline">
82-
83-
<h2 className="category-title overflow-hidden text-xl font-medium pl-2 border-l-4 hover:text-marrsgreen dark:hover:text-carrigreen border-marrsgreen dark:border-carrigreen">
84-
<span className="category-title-text inline-block">
85-
{category}
86-
</span>
87-
</h2>
88-
89-
</Link>
90-
<div className="flex space-x-4 overflow-x-auto overflow-y-hidden snap-x touch-auto">
91-
{categorizedPosts[category].map((post: any) => (
92-
<BlogCardBox post={post} key={post.slug} />
93-
))}
64+
return (
65+
<>
66+
<AppHead title="Blog - Sat Naing" />
67+
<Loader>Categories</Loader>
68+
<div ref={sectionRef} className="bg-bglight dark:bg-bgdark">
69+
<div className="selection:bg-marrsgreen selection:text-bglight dark:selection:bg-carrigreen dark:selection:text-bgdark">
70+
<SkipToMain />
71+
<BlogHeader />
72+
<SocialLinks />
73+
<main id="main" className="blog-main">
74+
<section className="blog-section">
75+
<h1 className="text-3xl lg:text-4xl font-bold mb-4">
76+
Categories
77+
</h1>
78+
{categories.map((category) => (
79+
<div key={category} className="my-4">
80+
<Link
81+
href={`/blog/categories/${slugify(category)}`}
82+
className="inline-block link-outline"
83+
>
84+
<h2 className="category-title overflow-hidden text-xl font-medium pl-2 border-l-4 hover:text-marrsgreen dark:hover:text-carrigreen border-marrsgreen dark:border-carrigreen">
85+
<span className="category-title-text inline-block">
86+
{category}
87+
</span>
88+
</h2>
89+
</Link>
90+
<div className="flex space-x-4 overflow-x-auto overflow-y-hidden snap-x touch-auto">
91+
{categorizedPosts[category].map((post: any) => (
92+
<BlogCardBox post={post} key={post.slug} />
93+
))}
94+
</div>
9495
</div>
95-
</div>
96-
))}
97-
</section>
98-
</main>
99-
<Footer />
96+
))}
97+
</section>
98+
</main>
99+
<Footer />
100+
</div>
100101
</div>
101-
</div>
102-
</>;
102+
</>
103+
);
103104
};
104105

105106
export const getStaticProps: GetStaticProps = async () => {

postcss.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ module.exports = {
33
tailwindcss: {},
44
autoprefixer: {},
55
},
6-
}
6+
};

sections/BlogSection.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ const BlogSection: React.FC<Props> = ({ posts }) => {
111111
d="M13 7l5 5m0 0l-5 5m5-5H6"
112112
/>
113113
</svg>
114-
115114
</Link>
116115
</div>
117116
</div>

0 commit comments

Comments
 (0)