Skip to content

Abhishek1 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions pages/blog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import 'tailwindcss/tailwind.css';

const Blog = () => {
const posts = [
{ id: 1, title: 'First Post', content: 'This is the content of the first post.' },
{ id: 2, title: 'Second Post', content: 'This is the content of the second post.' },
{ id: 3, title: 'Third Post', content: 'This is the content of the third post.' },
];

return (
<div>
<h1 className='text-3xl'>Blog</h1>
<br/>
{posts.map(post => (
<div key={post.id}>
<h2 className='text-2xl'>{post.title}</h2>
<p>{post.content}</p>
<br/>
</div>
))}
</div>
);
};

export default Blog;
9 changes: 9 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Image from "next/image";
import localFont from "next/font/local";
import Blog from "./blog";

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
Expand Down Expand Up @@ -61,6 +62,14 @@ export default function Home() {
>
Read our docs
</a>
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
href="/blog"
target="_blank"
rel="noopener noreferrer"
>
Blogs
</a>
</div>
</main>
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
Expand Down
14 changes: 14 additions & 0 deletions public/myPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Link from 'next/link';

export default function Home() {
return (
<div className="flex flex-col items-center justify-center min-h-screen p-8">
<h1 className="text-4xl font-bold text-blue-600">Pokemon</h1>
<Link href="/myPage">
<a className="mt-4 px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600">
Catch them all
</a>
</Link>
</div>
);
}
Loading