Skip to content
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
Binary file modified README.md
Binary file not shown.
273 changes: 215 additions & 58 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.1.0",
"private": true,
"scripts": {
"postinstall": "prisma generate",
"dev": "next dev",
"build": "next build",
"build": "prisma generate && next build",
"start": "next start",
"lint": "next lint"
},
Expand All @@ -18,11 +19,16 @@
"firebase": "^10.13.1",
"next": "^14.2.11",
"next-auth": "^4.24.7",
"quill": "^2.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-error-boundary": "^4.0.13",
"react-icons": "^5.3.0",
"react-quill": "^2.0.0",
"remixicon": "^4.3.0",
"slate": "^0.103.0",
"slate-history": "^0.109.0",
"slate-react": "^0.110.1",
"sweetalert2": "^11.14.1",
"swr": "^2.2.5"
},
Expand Down
Binary file added public/fashion.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/mainfeature.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 19 additions & 14 deletions src/app/about/aboutpage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,39 @@

@media screen and (max-width:1025px) {

.title{
font-size: 25px;
}

.rightimg{
height:300px;
.imgContainer{
width: 100%;
}
.img{
height:600px;
}
}
@media screen and (max-width:756px){
.rightimg{
height: 200px;
.img{
height: 500px;
}
.description{
font-size: 18px;
}
}

@media screen and (max-width:640px) {
.container{
flex-direction: column;
.title{
font-size: 30px;
}
.img{
height: 400px;
}
.rightimg{
height: 350px;
.description{
font-size: 15px;
}

}

@media screen and (max-width:455px) {

.rightimg{
height: 250px;
.img{
height: 300px;
}

}
24 changes: 12 additions & 12 deletions src/app/about/page.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import Image from 'next/image'
import React from 'react'
import Image from 'next/image';
import React from 'react';
import styles from "./aboutpage.module.css"
import Link from 'next/link'
import Link from 'next/link';


const page = () => {
Expand All @@ -19,39 +19,39 @@ const page = () => {
Welcome to BlogHub - A World of Stories, Insights, and Ideas at Your Fingertips!<br />
<br />

At BlogHub, we believe that everyone has a story to tell, a perspective to share, and an idea that can inspire others. Whether you're an experienced blogger, a curious reader, or someone looking to dive into writing for the first time, BlogHub is your digital home for insightful, engaging, and thought-provoking content.<br />
At BlogHub, we believe that everyone has a story to tell, a perspective to share, and an idea that can inspire others. Whether you&apos;re an experienced blogger, a curious reader, or someone looking to dive into writing for the first time, BlogHub is your digital home for insightful, engaging, and thought-provoking content.<br />
<br />

<h3>Why BlogHub?</h3><br />
BlogHub is more than just a blogging platform—it's a community-driven space where passion meets purpose. We're committed to creating a vibrant ecosystem for writers and readers alike, fostering meaningful conversations across a variety of interests. From personal experiences to professional advice, trending topics to timeless tales, our platform is designed to bring diverse voices together in one place.<br />
BlogHub is more than just a blogging platform—it&apos;s a community-driven space where passion meets purpose. We&apos;re committed to creating a vibrant ecosystem for writers and readers alike, fostering meaningful conversations across a variety of interests. From personal experiences to professional advice, trending topics to timeless tales, our platform is designed to bring diverse voices together in one place.<br />
<br />

<h3>What You'll Find Here:</h3><br />
<h3>What You&apos;ll Find Here:</h3><br />

<b>Diverse Range of Topics:</b> Whether you're passionate about coding, fashion, culture, travel, food, or Style, BlogHub offers a vast array of topics to explore. Our writers come from all walks of life, sharing their unique perspectives and expertise on the subjects that matter most to them—and to you. <br />
<b>Diverse Range of Topics:</b> Whether you&apos;re passionate about coding, fashion, culture, travel, food, or Style, BlogHub offers a vast array of topics to explore. Our writers come from all walks of life, sharing their unique perspectives and expertise on the subjects that matter most to them—and to you. <br />
<br />
<b>Quality Content:</b> We prioritize well-researched, thought-out, and engaging content. Whether it's an in-depth tutorial, a heartfelt narrative, or a trending topic analysis, you'll find articles that are both informative and enjoyable to read.<br />
<b>Quality Content:</b> We prioritize well-researched, thought-out, and engaging content. Whether it&apos;s an in-depth tutorial, a heartfelt narrative, or a trending topic analysis, you&apos;ll find articles that are both informative and enjoyable to read.<br />
<br />
<b>Engaging and Interactive:</b> BlogHub is all about interaction and engagement. You can comment on posts, join discussions, and even reach out to your favorite bloggers directly. Our platform encourages the exchange of ideas, fostering a sense of community among readers and writers.<br />
<br />
<b>A Platform for Writers:</b> For aspiring bloggers or seasoned writers looking to grow their audience, BlogHub provides the perfect stage. Publish your content, connect with readers, and build your personal brand. Our user-friendly interface makes it easy to create beautiful, well-organized posts that captivate your audience.<br />
<br />

<b>Stay Inspired and Informed:</b> With fresh content uploaded regularly, BlogHub keeps you inspired with new ideas and perspectives. Whether youre learning a new skill, seeking advice, or simply browsing for inspiration, there's always something new to discover.<br />
<b>Stay Inspired and Informed:</b> With fresh content uploaded regularly, BlogHub keeps you inspired with new ideas and perspectives. Whether you&apos;re learning a new skill, seeking advice, or simply browsing for inspiration, there&apos;s always something new to discover.<br />
<br />
<h3>Our Mission:</h3><br />

At BlogHub, our mission is simple: to empower voices and connect people through stories and shared experiences. We believe in the power of words to educate, inspire, and bring people together. By creating a welcoming, inclusive space for bloggers and readers, we aim to cultivate a community that thrives on diversity, creativity, and authentic expression.<br />
<br />
<h3>Join Our Community:</h3><br />

BlogHub is more than just a place to read or write—it's a place to belong. When you join BlogHub, you're not just a reader or a writer; you become part of a global community of thinkers, creators, and learners. Whether you're sharing your latest travel adventure, offering advice on personal growth, or simply exploring what others have to say, you're contributing to a bigger conversation.<br />
BlogHub is more than just a place to read or write—it&apos;s a place to belong. When you join BlogHub, you&apos;re not just a reader or a writer; you become part of a global community of thinkers, creators, and learners. Whether you&apos;re sharing your latest travel adventure, offering advice on personal growth, or simply exploring what others have to say, you&apos;re contributing to a bigger conversation.<br />
<br />
<h3>Ready to Start Your Blogging Journey?</h3> <br />

If you're ready to dive into a world of content that educates, entertains, and connects, BlogHub is the place for you. Sign up today to start reading, writing, and interacting with a growing community of bloggers and readers. Whatever your passion, there's a place for it on BlogHub.<br />
If you&apos;re ready to dive into a world of content that educates, entertains, and connects, BlogHub is the place for you. Sign up today to start reading, writing, and interacting with a growing community of bloggers and readers. Whatever your passion, there&apos;s a place for it on BlogHub.<br />
<br />
So, whether you're here to read or to write, to learn or to share, welcome to BlogHub—the home of inspired content, meaningful conversations, and stories that matter.<br />
So, whether you&apos;re here to read or to write, to learn or to share, welcome to BlogHub—the home of inspired content, meaningful conversations, and stories that matter.<br />
</p>
</div>
</div>
Expand Down
34 changes: 30 additions & 4 deletions src/app/blog/blogPage.module.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
.title{
background-color: coral;
color: white;
color: orangered;
padding: 5px 10px;
text-align: center;
text-align: start;
text-transform: capitalize;
font-size: 80px;
}

.content{
display: flex;
gap: 50px;
}
}

@media screen and (max-width:1280px) {

.title {
font-size: 72px;
}
}

@media screen and (max-width:1024px) {

.title {
font-size: 65px;
}
}

@media screen and (max-width:768px) {
.title{
font-size: 54px;
}
}

@media screen and (max-width:640px) {
.title{
font-size: 44px;
}
}
4 changes: 2 additions & 2 deletions src/app/contact/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const ContactPage = () => {
<div className={styles.description}>
<h1 className={styles.heading}><b>Reach out to us !</b></h1>
<p className={styles.instructions}>
If you're experiencing any difficulties while using our platform, don't hesitate to reach out. Below are some common issues we can assist you with: <br />
If you are experiencing any difficulties while using our platform, do not hesitate to reach out. Below are some common issues we can assist you with: <br />
<br />

Account & Functionality Issues: <br />
Expand All @@ -75,7 +75,7 @@ const ContactPage = () => {
We take user experience seriously and are committed to ensuring a safe and smooth environment for all. Let us know how we can help resolve your issue.
<br />
<br />
Contact us today, and we'll get back to you promptly!
Contact us today, and we&apos;ll get back to you promptly!
<br />
</p>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/app/login/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {FaFacebookF } from "react-icons/fa";
import { useRouter } from 'next/navigation';
import Facebook from "next-auth/providers/facebook";

const page = () => {
const Page = () => {

const {data,status} = useSession()

Expand All @@ -24,12 +24,12 @@ const page = () => {
return (
<div className={styles.container}>
<div className={styles.wrapper}>
<div className={styles.socialButton} onClick={()=>signIn("google")}> <Image src="/google.png" className={styles.logo} width={20} height={20} /> Sign in with Google</div>
<div className={styles.socialButton} onClick={()=>signIn("github")}><Image src="/github.png" className={styles.logo} width={20} height={20} /> Sign in with Github</div>
<div className={styles.socialButton} onClick={()=>signIn("google")}> <Image src="/google.png" alt="google" className={styles.logo} width={20} height={20} /> Sign in with Google</div>
<div className={styles.socialButton} onClick={()=>signIn("github")}><Image src="/github.png" alt="google" className={styles.logo} width={20} height={20} /> Sign in with Github</div>
<div className={styles.socialButton} onClick={()=>signIn("facebook")}><FaFacebookF size={20} className={styles.logo} /> Sign in with Facebook</div>
</div>
</div>
)
}

export default page
export default Page;
110 changes: 55 additions & 55 deletions src/app/posts/[slug]/page.jsx
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@

// import Menu from "@/components/Menu/Menu";
// import styles from "./singlePage.module.css";
// import Image from "next/image";
// import Comments from "@/components/comments/Comments";
import Menu from "@/components/Menu/Menu";
import styles from "./singlePage.module.css";
import Image from "next/image";
import Comments from "@/components/comments/Comments";

// const getData = async (slug) => {
// const res = await fetch(`http://localhost:3000/api/posts/${slug}`, {
// cache: "no-store",
// });
const getData = async (slug) => {
const res = await fetch(`https://hub-blog.vercel.app/api/posts/${slug}`, {
cache: "no-store",
});

// if (!res.ok) {
// throw new Error("Failed");
// }
if (!res.ok) {
throw new Error("Failed");
}

// return res.json();
// };
return res.json();
};

// const SinglePage = async ({ params }) => {
// const { slug } = params;
const SinglePage = async ({ params }) => {
const { slug } = params;

// const data = await getData(slug);
const data = await getData(slug);

// return (
// <div className={styles.container}>
// <div className={styles.infoContainer}>
// <div className={styles.textContainer}>
// <h1 className={styles.title}>{data?.title}</h1>
// <div className={styles.user}>
// {data?.user?.image && (
// <div className={styles.userImageContainer}>
// <Image src={data.user.image} alt="" fill className={styles.avatar} />
// </div>
// )}
// <div className={styles.userTextContainer}>
// <span className={styles.username}>{data?.user.name}</span>
// <span className={styles.date}>{data?.createdAt.substring(0,10)}</span>
// </div>
// </div>
// </div>
// {data?.img && (
// <div className={styles.imageContainer}>
// <Image src={data.img} alt="" fill className={styles.image} />
// </div>
// )}
// </div>
// <div className={styles.content}>
// <div className={styles.post}>
// <div
// className={styles.description}
// dangerouslySetInnerHTML={{ __html: data?.desc }}
// />
// <div className={styles.comment}>
// <Comments postSlug={slug} />
// </div>
// </div>
// <Menu />
// </div>
// </div>
// );
// };
return (
<div className={styles.container}>
<div className={styles.infoContainer}>
<div className={styles.textContainer}>
<h1 className={styles.title}>{data?.title}</h1>
<div className={styles.user}>
{data?.user?.image && (
<div className={styles.userImageContainer}>
<Image src={data.user.image} alt="" fill className={styles.avatar} />
</div>
)}
<div className={styles.userTextContainer}>
<span className={styles.username}>{data?.user.name}</span>
<span className={styles.date}>{data?.createdAt.substring(0,10)}</span>
</div>
</div>
</div>
{data?.img && (
<div className={styles.imageContainer}>
<Image src={data.img} alt="" fill className={styles.image} />
</div>
)}
</div>
<div className={styles.content}>
<div className={styles.post}>
<div
className={styles.description}
dangerouslySetInnerHTML={{ __html: data?.desc }}
/>
<div className={styles.comment}>
<Comments postSlug={slug} />
</div>
</div>
<Menu />
</div>
</div>
);
};

// export default SinglePage;
export default SinglePage;



Loading