diff --git a/src/app/[slug]/page.jsx b/src/app/[slug]/page.jsx new file mode 100644 index 000000000..b83837ddb --- /dev/null +++ b/src/app/[slug]/page.jsx @@ -0,0 +1,48 @@ +import Menu from '@/component/menu/Menu' +import styles from './singlePage.module.css' +import Image from 'next/image' +import Comments from '@/component/comment/Comments' + +const SinglePage = () => { + return ( +
+
+
+

Lorem ipsum dolor sit amet consectetur.

+
+
+ +
+
+ John Doe + 01.01.2024 +
+
+
+
+ +
+
+
+
+
+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus alias beatae nihil magnam earum deleniti tempora ipsum numquam nam, facilis, voluptatem suscipit aperiam sapiente ipsa, ad recusandae magni! Nemo, dicta? +

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. +

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus alias beatae nihil magnam earum deleniti tempora ipsum numquam nam, facilis, voluptatem suscipit aperiam sapiente ipsa, ad recusandae magni! Nemo, dicta? +

+

Lorem ipsum dolor sit amet consectetur adipisicing elit. Repellendus alias beatae nihil magnam earum deleniti tempora ipsum numquam nam, facilis, voluptatem suscipit aperiam sapiente ipsa, ad recusandae magni! Nemo, dicta? +

+
+
+ . . +
+
+ +
+
+ ) +} + +export default SinglePage \ No newline at end of file diff --git a/src/app/[slug]/singlePage.module.css b/src/app/[slug]/singlePage.module.css new file mode 100644 index 000000000..92cfb2545 --- /dev/null +++ b/src/app/[slug]/singlePage.module.css @@ -0,0 +1,74 @@ +.container{ + +} + +.infoContainer{ + display: flex; + align-items: center; + gap: 50px; +} + +.textContainer{ + flex:1; +} + +.title{ + font-size: 64px; + margin-bottom: 50px; +} + +.user{ + display: flex; + align-items: center; + gap: 20px; +} + +.userImageContainer{ + height: 50px; + width: 50px; + position: relative; + +} + +.username{ + font-size: 20px; + font-weight: 500; +} + +.userTextContainer{ + display: flex; + flex-direction: column; + gap: 5px; + color: var(--softTextColor); +} + + .avatar{ + object-fit: cover; + border-radius: 50%; + } + +.imageContainer{ + flex:1; + position: relative; + height: 350px; +} + +.image{ + object-fit: cover; +} + +.content{ + display: flex; + gap: 50px; +} + +.post{ + flex: 5; + margin-top: 60px; +} + +.description p{ + font-size: 20px; + font-weight: 300; + margin-bottom: 20px; +} \ No newline at end of file diff --git a/src/app/about/aboutPage.module.css b/src/app/about/aboutPage.module.css new file mode 100644 index 000000000..b90efc2cd --- /dev/null +++ b/src/app/about/aboutPage.module.css @@ -0,0 +1,3 @@ +.container{ + +} \ No newline at end of file diff --git a/src/app/about/page.jsx b/src/app/about/page.jsx new file mode 100644 index 000000000..19ca31784 --- /dev/null +++ b/src/app/about/page.jsx @@ -0,0 +1,13 @@ +import React from 'react' +import styles from "./aboutPage.module.css" + + +const AboutPage = () => { + return ( +
+ About Page +
+ ) +} + +export default AboutPage diff --git a/src/app/blog/blogPage.module.css b/src/app/blog/blogPage.module.css new file mode 100644 index 000000000..5a38299f1 --- /dev/null +++ b/src/app/blog/blogPage.module.css @@ -0,0 +1,11 @@ +.title{ + background-color: coral; + color: white; + padding: 5px 10px; + text-align: center; +} + +.content{ + display: flex; + gap: 50px; +} \ No newline at end of file diff --git a/src/app/blog/page.jsx b/src/app/blog/page.jsx new file mode 100644 index 000000000..468a53539 --- /dev/null +++ b/src/app/blog/page.jsx @@ -0,0 +1,19 @@ +import React from 'react' +import styles from "./blogPage.module.css" +import CardList from '@/component/CardList/CardList' +import Menu from '@/component/menu/Menu' + +const BlogPage = () => { + return ( +
+

Style Blog

+
+ + +
+
+ ) +} + +export default BlogPage + diff --git a/src/app/contact/contactPage.module.css b/src/app/contact/contactPage.module.css new file mode 100644 index 000000000..b90efc2cd --- /dev/null +++ b/src/app/contact/contactPage.module.css @@ -0,0 +1,3 @@ +.container{ + +} \ No newline at end of file diff --git a/src/app/contact/page.jsx b/src/app/contact/page.jsx new file mode 100644 index 000000000..96c350148 --- /dev/null +++ b/src/app/contact/page.jsx @@ -0,0 +1,10 @@ +import React from 'react' +import styles from "./contactPage.module.css" + +const ContactPage = () => { + return ( +
ContactPage
+ ) +} + +export default ContactPage \ No newline at end of file diff --git a/src/app/globals.css b/src/app/globals.css index e69de29bb..07ed90807 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -0,0 +1,93 @@ +:root{ + --bg: white; + --textColor:black; + --softBg:#f0f0f0; + ---softTextColor: #626262 +} + +*{ + padding: 0; + margin: 0; + box-sizing: border-box; +} + +body{ + max-width: 100vw; + overflow-x: hidden; +} + +a{ + color: inherit; + text-decoration: none; +} + +.dark{ + --bg:#0f172a; + --textColor:#ddd; + --softBg:#1f273a; + --softTextColor:#a6a6a6; +} + +.light{ + --bg: white; + --textColor:black; + --softBg:#f0f0f0; + ---softTextColor: #626262 +} + +.container { + min-height: 100vh; + background-color: var(--bg); + color: var(--textColor); +} + +.wrapper{ + max-width: 1536px; + margin-left: auto; + margin-right: auto; + padding-left: 50px; + padding-right: 50px; + +} + +@media screen and (max-width: 1536px){ + .wrapper{ + max-width: 1280px; + padding-left: 10px; + padding-right: 10px; + } +} + +@media screen and (max-width: 1280px){ + .wrapper{ + max-width: 1024px; + + } +} + +@media screen and (max-width: 1024px){ + .wrapper{ + max-width: 768px; + padding-left: 20px; + padding-right: 20px; + } +} + +@media screen and (max-width: 768px){ + .wrapper{ + max-width: 640px; + } +} + +@media screen and (max-width: 640px){ + .wrapper{ + max-width: 475px; + } +} + + +@media screen and (max-width: 475px){ + .wrapper{ + max-width: 320px; + } +} diff --git a/src/app/homepage.module.css b/src/app/homepage.module.css index e69de29bb..73a472812 100644 --- a/src/app/homepage.module.css +++ b/src/app/homepage.module.css @@ -0,0 +1,4 @@ +.content{ + display: flex; + gap: 50px; +} \ No newline at end of file diff --git a/src/app/layout.js b/src/app/layout.js index 507fb0619..4ed518904 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -1,17 +1,33 @@ +import Navbar from '@/component/navbar/Navbar' import './globals.css' import { Inter } from 'next/font/google' +import Footer from '@/component/footer/Footer' +import { ThemeContextProvider } from '@/context/ThemeContext' +import ThemeProvider from '@/component/providers/ThemeProvider' const inter = Inter({ subsets: ['latin'] }) export const metadata = { - title: 'Blog App', + title: "David's Blog ", description: 'The best blog app!', } export default function RootLayout({ children }) { return ( - {children} + + + +
+
+ + {children} +
+
+
+
+ ) } diff --git a/src/app/page.jsx b/src/app/page.jsx index 02e8e8b92..5afd75318 100644 --- a/src/app/page.jsx +++ b/src/app/page.jsx @@ -1,5 +1,19 @@ +import Featured from "@/component/featured/Featured"; import styles from "./homepage.module.css"; +import CategoryList from "@/component/CategoryList/CategoryList"; +import CardList from "@/component/CardList/CardList"; +import Menu from "@/component/menu/Menu"; export default function Home() { - return
Hello
; + return ( +
+ + +
+ + +
+
+ ); } + diff --git a/src/component/CardList/CardList.jsx b/src/component/CardList/CardList.jsx new file mode 100644 index 000000000..4d00702d4 --- /dev/null +++ b/src/component/CardList/CardList.jsx @@ -0,0 +1,21 @@ +import React from 'react' +import styles from "./cardList.module.css" +import Pagination from '../pagination/Pagination' +import Card from '../card/Card' + +const CardList = () => { + return ( +
+

Recent Post

+
+ + + + +
+ +
+ ) +} + +export default CardList diff --git a/src/component/CardList/cardList.module.css b/src/component/CardList/cardList.module.css new file mode 100644 index 000000000..ea1315aae --- /dev/null +++ b/src/component/CardList/cardList.module.css @@ -0,0 +1,7 @@ +.container{ + flex: 5; +} + +.title{ + margin: 50px 0px; +} \ No newline at end of file diff --git a/src/component/CategoryList/CategoryList.jsx b/src/component/CategoryList/CategoryList.jsx new file mode 100644 index 000000000..997ee7fba --- /dev/null +++ b/src/component/CategoryList/CategoryList.jsx @@ -0,0 +1,82 @@ +import React from 'react' +import styles from "./categoryList.module.css" +import Link from 'next/link' +import Image from 'next/image' + + +const CategoryList = () => { + return ( +
+

Popular Categories

+
+ + + Style + + + + + Fashion + + + + + Food + + + + + Travel + + + + + Culture + + + + + Coding + +
+
+ ) +} + +export default CategoryList diff --git a/src/component/CategoryList/categoryList.module.css b/src/component/CategoryList/categoryList.module.css new file mode 100644 index 000000000..163c00432 --- /dev/null +++ b/src/component/CategoryList/categoryList.module.css @@ -0,0 +1,74 @@ +.container{ + + +} + +.title{ + margin: 50px 0px +} + +.categories{ + display: flex; + flex-wrap: wrap; + justify-content: space-between; + gap: 20px; +} + +.category{ + display: flex; + align-items: center; + gap: 10px; + text-transform: capitalize; + width: 15%; + height: 80px; + justify-content: center; + border-radius: 10px; + +} + +.category.style{ + background-color: #57c4ff31; +} +.category.fashion{ + background-color: #da85c731; +} +.category.food{ + background-color: #7fb88133; +} +.category.travel{ + background-color: #ff795736; +} +.category.culture{ + background-color: #ffb04f45; +} +.category.coding{ + background-color: #5e4fff31; +} + +.image{ + border-radius: 50%; +} + +@media screen and (max-width: 1280px) { + .category{ + width: 25%; + } +} + +@media screen and (max-width: 1024px) { + .category{ + width: 25%; + } +} + +@media screen and (max-width: 768px) { + .category{ + width: 45%; + } +} + +@media screen and (max-width: 640px) { + .category{ + width: 100%; + } +} \ No newline at end of file diff --git a/src/component/MenuPosts/MenuPost.jsx b/src/component/MenuPosts/MenuPost.jsx new file mode 100644 index 000000000..2babcaacc --- /dev/null +++ b/src/component/MenuPosts/MenuPost.jsx @@ -0,0 +1,80 @@ +import Link from 'next/link' +import Image from 'next/image' +import styles from './menuPost.module.css' + +const MenuPost = ({withImage}) => { + return ( + +
+ + + {withImage && ( +
+ +
+ )} +
+ Travel +

Lorem ipsum dolor sit amet consectetur .

+
+ John Doe + - 10.03.2023 +
+
+ + + + {withImage && ( +
+ +
+ )} +
+ Culture +

Lorem ipsum dolor sit amet consectetur .

+
+ John Doe + - 10.03.2023 +
+
+ + + + {withImage && ( +
+ +
+ )} +
+ Foods +

Lorem ipsum dolor sit amet consectetur .

+
+ John Doe + - 10.03.2023 +
+
+ + + + {withImage && ( +
+ +
+ )} +
+ Fashion +

Lorem ipsum dolor sit amet consectetur .

+
+ John Doe + - 10.03.2023 +
+
+ + +
+ + ); +}; + +export default MenuPost + diff --git a/src/component/MenuPosts/menuPost.module.css b/src/component/MenuPosts/menuPost.module.css new file mode 100644 index 000000000..03e0fc43b --- /dev/null +++ b/src/component/MenuPosts/menuPost.module.css @@ -0,0 +1,79 @@ +.items{ + margin-top: 35px; + margin-bottom: 60px; + display: flex; + flex-direction: column; + gap: 35px; + +} + +.item{ + display: flex; + align-items: center; + gap: 20px; +} + +.imageContainer{ + flex:1; + position: relative; + aspect-ratio: 1/1; +} + +.image{ + border: 3px solid lightgray; + border-radius: 50%; + object-fit: cover; +} + +.textContainer{ + flex:4; + display: flex; + flex-direction: column; + gap: 5px; +} + +.category{ + padding: 3px 8px; + border-radius: 10px; + font-size: 12px; + color: white; + width: max-content; +} + +.category.travel{ + background-color: #ff7857; +} + +.category.culture{ + background-color: #ffb14f; +} + +.category.food{ + background-color: #f7b881; +} + +.category.fashion{ + background-color: #ff7887; +} + +.category.coding{ + background-color: #775aec; +} + +.category.style{ + background-color: #789cff; +} + +.postTitle{ + font-size: 18px; + font-weight: 500; + color: var(--softTextColor) +} + +.detail{ + font-size: 12px; +} + +.date{ + color: gray; +} \ No newline at end of file diff --git a/src/component/authLinks/AuthLinks.jsx b/src/component/authLinks/AuthLinks.jsx new file mode 100644 index 000000000..ff7592d4e --- /dev/null +++ b/src/component/authLinks/AuthLinks.jsx @@ -0,0 +1,45 @@ +"use client" + +import React, { useState } from 'react' +import styles from "./authLinks.module.css" +import Link from 'next/link' + +const AuthLinks = () => { + const status = "notauthenticated" + + const [open, setOpen]= useState(false); + + return ( + <> { status === "notauthenticated" ? ( + Login + + ):( + <> Write + Logout + )} + +
setOpen(!open)}> +
+
+
+
+ + { open && ( +
+ Homepage + About + Contact + { status === "notauthenticated" ? ( + Login + ):(<> Write + Logout + )} +
+ + ) + } + + ); +}; + +export default AuthLinks diff --git a/src/component/authLinks/authLinks.module.css b/src/component/authLinks/authLinks.module.css new file mode 100644 index 000000000..45fe87d58 --- /dev/null +++ b/src/component/authLinks/authLinks.module.css @@ -0,0 +1,42 @@ +.link{ + cursor: pointer; +} + +.burger{ + width: 20px; + height: 16px; + display: none; + flex-direction: column; + justify-content: space-between; + cursor: pointer; +} + +.line{ + width: 100%; + height: 2px; + background-color: var(--textColor); +} + +.responsiveMenu{ + position: absolute; + top: 100px; + left:0; + background-color: var(--bg); + height: calc(100vh - 100px); + width: 100%; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + gap: 50px; + font-size: 36px; +} + +@media screen and (max-width: 640px){ + .burger{ + display: flex; + } + .link{ + display: none; + } +} \ No newline at end of file diff --git a/src/component/card/Card.jsx b/src/component/card/Card.jsx new file mode 100644 index 000000000..2f1697e44 --- /dev/null +++ b/src/component/card/Card.jsx @@ -0,0 +1,26 @@ +import Link from 'next/link'; +import styles from './card.module.css'; +import Image from 'next/image'; + +const Card = () => { + return ( +
+
+ +
+
+
+ 11.02.2023 - + CULTURE +
+ +

Lorem ipsum dolor sit amet.

+ +

Lorem ipsum, dolor sit amet consectetur adipisicing elit. Commodi, aperiam. Aliquam quod cum quam, quas nemo harum repudiandae odit officia saepe culpa ratione. Fugit corrupti quibusdam mollitia! Nisi, ea dolores.

+ Read More +
+
+ ) +} + +export default Card diff --git a/src/component/card/card.module.css b/src/component/card/card.module.css new file mode 100644 index 000000000..f90173a69 --- /dev/null +++ b/src/component/card/card.module.css @@ -0,0 +1,52 @@ +.container{ + margin-bottom: 50px; + display: flex; + align-items: center; + gap: 50px; +} + +.imageContainer{ + flex: 1; + position: relative; + height: 350px; + +} + + +.image{ + object-fit: cover; +} + +.textContainer{ + flex:1; + display: flex; + flex-direction: column; + gap: 30px; +} + +.date{ + color: gray; +} + +.category{ + font-weight: 500; + color: crimson; +} + +.desc{ + font-size: 18px; + font-weight: 300; + color: var(--softTextColor) +} + +.link{ + border-bottom: 1px solid crimson; + width: max-content; + padding: 2px 0px; +} + +@media screen and (max-width: 1280px) { + .imageContainer{ + display: none; + } +} \ No newline at end of file diff --git a/src/component/comment/Comments.jsx b/src/component/comment/Comments.jsx new file mode 100644 index 000000000..820f8bc10 --- /dev/null +++ b/src/component/comment/Comments.jsx @@ -0,0 +1,68 @@ +import styles from './comments.module.css' +import Link from 'next/link'; +import Image from 'next/image'; +// import { useState } from 'react'; + +const Comments = () => { + + // const [dec, setDesc] = useState(false); + + const isLoading = "false" + + const status = "authenticated" + + // const handleSubmit = () => { + + // } + + return ( +
+

Comments

+ + {status === "authenticated" ? ( +
+