-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add blog routes and Categories(subfolders)
- Loading branch information
Showing
31 changed files
with
1,837 additions
and
463 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: "Data Structures & Algorithms Arrays" | ||
excerpt: "An Array is a linear data structure that collects elements of the same data type and stores them in contiguous and adjacent memory locations. In JavaScript and some other languages you can store any data types." | ||
category: "data-structures" | ||
coverImage: "/blog/data-structures/array-1.png" | ||
date: "2022-01-26T10:47:45.406Z" | ||
author: | ||
name: Mojib | ||
picture: "/blog/authors/mojib.png" | ||
ogImage: | ||
url: "/blog/data-structures/array-1.png" | ||
--- | ||
|
||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget. At imperdiet dui accumsan sit amet nulla facilities morbi tempus. Praesent elementum facilisis leo vel fringilla. Congue mauris rhoncus aenean vel. Egestas sed tempus urna et pharetra pharetra massa massa ultricies. | ||
|
||
## My First Post | ||
|
||
I **love** using [Next.js](https://nextjs.org/) | ||
|
||
```js | ||
const date = new Date(); | ||
const doc = getDocBySlug(params.slug); | ||
``` | ||
|
||
Venenatis cras sed felis eget velit. Consectetur libero id faucibus nisl tincidunt. Gravida in fermentum et sollicitudin ac orci phasellus egestas tellus. Volutpat consequat mauris nunc congue nisi vitae. Id aliquet risus feugiat in ante metus dictum at tempor. Sed blandit libero volutpat sed cras. Sed odio morbi quis commodo odio aenean sed adipiscing. Velit euismod in pellentesque massa placerat. Mi bibendum neque egestas congue quisque egestas diam in arcu. Nisi lacus sed viverra tellus in. Nibh cras pulvinar mattis nunc sed. Luctus accumsan tortor posuere ac ut consequat semper viverra. Fringilla ut morbi tincidunt augue interdum velit euismod. | ||
|
||
## Lorem Ipsum | ||
|
||
Tristique senectus et netus et malesuada fames ac turpis. Ridiculous mus mauris vitae ultricies leo integer malesuada nunc vel. In mollis nunc sed id semper. Egestas tellus rutrum tellus pellentesque. Phasellus vestibulum lorem sed risus ultricies tristique nulla. Quis blandit turpis cursus in hac habitasse platea dictumst quisque. Eros donec ac odio tempor orci dapibus ultrices. Aliquam sem et tortor consequat id porta nibh. Adipiscing elit duis tristique sollicitudin nibh sit amet commodo nulla. Diam vulputate ut pharetra sit amet. Ut tellus elementum sagittis vitae et leo. Arcu non odio euismod lacinia at quis risus sed vulputate. |
1 change: 1 addition & 0 deletions
1
_posts/dynamic-routing.md → _posts/front-end/dynamic-routing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { useRouter } from "next/router"; | ||
import Layout from "./Layout"; | ||
import Card from "./common/Card"; | ||
import Search from "./Search"; | ||
import Categories from "./Categories"; | ||
import SubNav from "./common/SubNav"; | ||
|
||
export default function BlogLanding({ | ||
posts, | ||
categories, | ||
query, | ||
onChange, | ||
onSubmit, | ||
}) { | ||
const router = useRouter(); | ||
return ( | ||
<Layout | ||
title="Mojib | Blog" | ||
description="This is my personal blog for my learning journey" | ||
> | ||
<main> | ||
<div className="py-[120px]"> | ||
<div className="container mx-w-xl"> | ||
{/* <SubNav router={router} /> */} | ||
<h1 className="font-bold text-5xl text-center mt-8 mb-16"> | ||
Trending Posts | ||
</h1> | ||
<div className="grid grid-cols-1 lg:grid-cols-[800px_minmax(200px,_1fr)] auto-rows-auto items-start gap-8 w-[100%]"> | ||
<div className="right-col w-[100%]"> | ||
{posts.map((post) => ( | ||
<Card key={post.title} item={post} /> | ||
))} | ||
</div> | ||
<div className="left-col flex flex-col items-center border border-gray p-4 w-[100%]"> | ||
<Search value={query} onChange={onChange} onSubmit={onSubmit} /> | ||
<Categories categories={categories} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
</Layout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Link from "next/link"; | ||
|
||
export default function Categories({ categories }) { | ||
return ( | ||
<div className="categories w-[100%]"> | ||
<div className="border border-gray my-4 p-2"> | ||
<h3 className="text-[1.6rem] font-bold">Categories</h3> | ||
<ul className="list-square ml-5"> | ||
{categories.map((category) => ( | ||
<li key={category} className="my-3"> | ||
<Link | ||
as={`/blog/categories/${category}`} | ||
href="/blog/categories/[category]" | ||
> | ||
<a className="text-[1.2rem] block hover:text-[#0070f3] hover:underline"> | ||
{category} | ||
</a> | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.