Skip to content

Commit

Permalink
fix: ui
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitm001 committed Aug 25, 2024
1 parent 01d1646 commit d3cf3fb
Show file tree
Hide file tree
Showing 24 changed files with 274 additions and 126 deletions.
1 change: 0 additions & 1 deletion app/blogs/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CustomMDX } from '@/components/mdx'
import { formatDate, getBlogPosts } from '@/blogs/utils'
import { baseUrl } from '@/sitemap'
import Footer from '@/components/footer'
import Header from '@/components/header'
import Link from 'next/link'

export async function generateStaticParams() {
Expand Down
11 changes: 9 additions & 2 deletions app/blogs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import Footer from "@/components/footer"
import Header from "@/components/header"
import { BlogPosts } from "@/components/posts"
import { Metadata } from "next"


export const metadata: Metadata = {
title: 'Blogs'
}

const Page = () => {
return (
<div className="min-w-full px-2 text-center w-[95%] md:w-[90%] lg:w-[80%]">
<>
<Header/>
{/* article */}
<article className={'prose-lg prose-p:text-xl max-w-5xl mx-auto max-md:pt-8 pt-12 ink-300'}>
Expand All @@ -14,7 +21,7 @@ const Page = () => {
<div className="max-w-5xl mx-auto px-2 sm:px-4 md:px-8 lg:px-14">
<Footer/>
</div>
</div>
</>
)
}

Expand Down
34 changes: 17 additions & 17 deletions app/components/@ui/blog-post/index.tsx
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
import Link from "next/link"
import Image from "next/image"
import { formatDate } from "@/blogs/utils"
import Link from "next/link";
import Image from "next/image";
import { formatDate } from "@/blogs/utils";
import { canela_th, canela_regu } from "@/lib/fonts";

interface TBlogPost {
slug: string
title: string
publishedAt?: string
summary?: string
slug: string;
title: string;
publishedAt?: string;
summary?: string;
}

const BlogPost = ({ slug, title, publishedAt, summary }: TBlogPost) => {
return (
<Link
key={slug}
className="flex gap-4 px-5 py-4 lg:py-6 flex-wrap sm:px-6 md:px-8 lg:px-10 shadow-lg hover:shadow-xl transition-shadow duration-300 ease-in-out bg-white rounded-md"
className={`${canela_th.className} flex gap-4 px-5 py-4 text-grey hover:text-tealBright lg:py-6 flex-wrap sm:px-6 md:px-8 lg:px-10 hover:scale-105 hover:shadow-shadowSm border-titledCream border-[1px] transition-shadow duration-500 ease-in-out bg-white rounded-md`}
href={`/blogs/${slug}`}
>
<div className="w-full flex items-center flex-wrap my-2 relative">
<div className="text-neutral-600 tracking-tight w-full">
<div className="tracking-tight w-full">
<div className="flex items-center px-4 justify-between max-sm:flex-wrap max-md:py-4 max-sm:py-4">
<div className="flex gap-4 flex-col max-sm:gap-2 max-sm:max-w-[100%] w-full max-w-[70%]">
<div className="text-neutral-900 tracking-tight text-xl font-semibold">
<div className={`${canela_regu.className} text-black tracking-tight text-xl font-semibold`}>
{title}
</div>
<div className="text-neutral-400 text-sm">
<div className="text-sm text-grey">
{formatDate(publishedAt, false)}
</div>
<div className="text-left mt-3 pr-16 max-sm:pr-0 text-neutral-700">
<div className="text-left mt-3 pr-16 max-sm:pr-0">
{summary}
</div>
</div>

<Image
src={`/blogs/thumbnails/${slug}.png`}
alt={`${slug}`}
alt={title}
height={80}
width={290}
priority
Expand All @@ -43,7 +43,7 @@ const BlogPost = ({ slug, title, publishedAt, summary }: TBlogPost) => {
</div>
</div>
</Link>
)
}
);
};

export default BlogPost
export default BlogPost;
17 changes: 17 additions & 0 deletions app/components/@ui/menu-link/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Link from "next/link"
import { lato } from "@/lib/fonts"
type TMenuLink = {
href: string
value: string
postText?: string
}

const MenuLink = ( {href, value, postText}: TMenuLink ) => {
return (
<Link className={`${lato.className} text-[1.1rem] hover:text-tealBright hover:pb-1 text-black relative text-center after:absolute after:left-[10%] after:top-[100%] hover:after:h-[2px] after:h-0 after:w-[80%] after:bg-black`} href={ href }>
<span> {value} {postText && <b className="text-tealBright px-1">{postText}</b>} </span>
</Link>
)
}

export default MenuLink
18 changes: 18 additions & 0 deletions app/components/@ui/page/hero/header/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { canela } from "@/lib/fonts";

type HeroHeaderProps = {
text: string;
postText?: string | null;
};

const HeroHeader: React.FC<HeroHeaderProps> = ({ text, postText = null }) => {
return (
<header
className={`${canela.className} text-left sm:px-4 md:px-8 lg:px-14 text-grey leading-tight lg:text-7xl md:text-6xl text-5xl w-[100%] mx-auto py-6 md:py-6 lg:py-8`}
>
{text} {postText && <b className="text-tealBright">{postText}</b>}
</header>
);
};

export default HeroHeader;
31 changes: 31 additions & 0 deletions app/components/article/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from "react"
import Header from "@/components/header"
import Footer from "@/components/footer"
import HeroHeader from "@/components/@ui/page/hero/header"

type TMetaData = {
children: React.ReactNode
heroHeaderText: string
postText?: string
}

const Article = ( { children, heroHeaderText, postText }: TMetaData ) => {
return (
<>
<Header />
<div className="min-w-full px-2 text-center">
<article className={'prose-lg lg:text-xl text-[16px] max-w-5xl mx-auto px-4'}>
<HeroHeader text={ heroHeaderText } postText={postText}/>
{/* Here goes rest of content */}
<div className="text-left px-2 sm:px-4 md:px-8 lg:px-14 pt:10 md:pt-12 lg:pt-16">
{ children }
</div>
</article>

<Footer />
</div>
</>
)
}

export default Article
9 changes: 5 additions & 4 deletions app/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import { canela_th } from "@/lib/fonts";
import Link from "next/link";

const Footer = () => {
return (
<div className={'flex justify-between max-w-5xl mx-auto items-center max-md:h-20 h-32 max-md:px-8 px-6'}>
<div className={` ${canela_th.className} text-black flex justify-between max-w-5xl mx-auto items-center max-md:h-20 h-32 max-md:px-8 px-6`}>
{/* left */}
<div className={'flex gap-2'}>
<span>©</span>
<span>2024</span>
<Link className={'underline'} href={'/'}>SUMITSO</Link>
<Link className={'hover:text-tealBright'} href={'/'}>SUMITSO</Link>
</div>
{/* right */}
<div>
<Link href={'#site-header'}>
<span className="max-md:hidden flex">To the top</span>
<span className="max-md:flex hidden">Up</span>
<span className="max-md:hidden flex hover:text-tealBright">To the top</span>
<span className="max-md:flex hidden hover:text-tealBright">Up</span>
</Link>
</div>
</div>
Expand Down
78 changes: 41 additions & 37 deletions app/components/header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"use client"
import Link from "next/link";
import { Abel } from 'next/font/google';
import Image from "next/image";
import { amstelvar } from "@/lib/fonts";
// import Image from "next/image";
import { amstelvar, canela } from "@/lib/fonts";
import { useState } from "react";
import MenuLink from "../@ui/menu-link";

const acme = Abel({
subsets: ['latin'],
Expand All @@ -20,45 +21,47 @@ const Header = () => {
}

return (
<header id="site-header" className={`text-lg max-md:py-[1.5px] py-3 ${acme.className} bg-white flex flex-col justify-center text-xl items-center gap-[18px] `}>
<header id="site-header" className={`text-lg max-md:py-[1.5px] py-3 ${acme.className} flex flex-col justify-center text-xl items-center gap-[18px] `}>
{/* for large image */}
<div className=" w-full max-md:hidden flex items-center justify-between px-4 bg-white">
<div className=" w-full max-md:hidden flex items-center justify-between px-4">
{/* icon */}
<div className="flex gap-2 items-center">
<Image
src={'/icon/icon.png'}
alt="home png"
height={67}
width={55}
style={{width: 'auto'}}
/>
<div className={`text-gray-600 ${amstelvar.className}`}>welcome to my internet home</div>
<Link href="/" className="inline-block transition-transform duration-800 hover:text-tealBright text-grey hover:animate-shrinkAndExpand">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="w-12 h-12">
<text x="10" y="70" fontSize="70" fill="currentColor" fontWeight={800} fontFamily={canela.className}>S</text>
</svg>
</Link>
</div>
{/* links */}
<div className={`${amstelvar.className} flex items-center`}>
<Link className={` px-3 text-center`} href={'/'}> Home </Link>
<Link className={` px-3 text-center`} href={'/blogs'}> Blogs </Link>
<Link className={` px-3 text-center`} href={'/contact'}> Contact </Link>
<Link className={` px-3 text-center`} href={'https://youtube.com/@howdevyou'} target="_blank">
<div className="bg-[#f6f5f1] flex items-center justify-center rounded-lg px-2 py-1 border-2 border-gray-100">
<svg xmlns="http://www.w3.org/2000/svg" width="38" height="38" fill="whitesmoke" viewBox="0 0 16 16">
<path fill="grey" d="M8.051 1.999h.089c.822.003 4.987.033 6.11.335a2.01 2.01 0 0 1 1.415 1.42c.101.38.172.883.22 1.402l.01.104.022.26.008.104c.065.914.073 1.77.074 1.957v.075c-.001.194-.01 1.108-.082 2.06l-.008.105-.009.104c-.05.572-.124 1.14-.235 1.558a2.01 2.01 0 0 1-1.415 1.42c-1.16.312-5.569.334-6.18.335h-.142c-.309 0-1.587-.006-2.927-.052l-.17-.006-.087-.004-.171-.007-.171-.007c-1.11-.049-2.167-.128-2.654-.26a2.01 2.01 0 0 1-1.415-1.419c-.111-.417-.185-.986-.235-1.558L.09 9.82l-.008-.104A31 31 0 0 1 0 7.68v-.123c.002-.215.01-.958.064-1.778l.007-.103.003-.052.008-.104.022-.26.01-.104c.048-.519.119-1.023.22-1.402a2.01 2.01 0 0 1 1.415-1.42c.487-.13 1.544-.21 2.654-.26l.17-.007.172-.006.086-.003.171-.007A100 100 0 0 1 7.858 2zM6.4 5.209v4.818l4.157-2.408z"/>
</svg>
</div>
</Link>
<div className={`${amstelvar.className} flex items-center gap-4`}>
<MenuLink
href="/"
value="Home"
/>
<MenuLink
href="/explora"
value="Explora"
postText="+"
/>
<MenuLink
href="/blogs"
value="Blogs"
/>
<MenuLink
href="/contact"
value="Contact"
/>
</div>
</div>
<div className="hidden max-md:flex justify-between relative w-[100%] px-4 bg-white">
<div className="hidden max-md:flex justify-between relative w-[100%] px-4">
{/* icon */}

<div className="flex gap-2 items-center">
<Image
src={'/icon/icon.png'}
alt="home png"
height={64}
width={48}
style={{width: 'auto'}}
/>
<Link href="/" className="inline-block transition-transform duration-800 hover:text-tealBright text-teal hover:animate-shrinkAndExpand">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="w-12 h-12">
<text x="10" y="70" fontSize="70" fill="currentColor" fontWeight={800} fontFamily={canela.className}>S</text>
</svg>
</Link>
</div>

{/* menu */}
Expand All @@ -73,13 +76,14 @@ const Header = () => {

</div>
{isMenuClicked && (
<div className="md:hidden w-full flex flex-col">
<Link className={` px-3 text-center py-2`} href={'/'}> Home </Link>
<Link className={` px-3 text-center py-2`} href={'/blogs'}> Blogs </Link>
<Link className={` px-3 text-center py-2`} href={'/contact'}> Contact </Link>
<Link className={` px-3 text-center py-2`} href={'https://youtube.com/@howdevyou'} target="_blank"> Youtube </Link>
<div className="fixed hidden max-md:flex inset-0 bg-white z-50 flex-col justify-center items-center overflow-y-hidden">
<div className={`cursor-pointer absolute top-3 w-[90%] py-2 text-right`} onClick={toggleMenuButton}>x <b>close</b></div>
<Link className={`px-3 text-center text-grey py-2`} href={'/'} onClick={toggleMenuButton}> Home </Link>
<Link className={`px-3 text-center text-grey py-2`} href={'/blogs'} onClick={toggleMenuButton}> Blogs </Link>
<Link className={`px-3 text-center text-grey py-2`} href={'/contact'} onClick={toggleMenuButton}> Contact </Link>
<Link className={`px-3 text-center text-grey py-2`} href={'https://youtube.com/@howdevyou'} target="_blank" onClick={toggleMenuButton}> Youtube </Link>
</div>
)}
)}
</header>
);
}
Expand Down
42 changes: 15 additions & 27 deletions app/contact/page.tsx
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
import React from "react"
import { Metadata } from "next"
import { amstelvar400, amstelvar } from "../lib/fonts"
import Header from "@/components/header"
import Footer from "@/components/footer"
import { canela_th } from "../lib/fonts"
import Article from "@/components/article"

export const metadata: Metadata = {
title: 'Sumit So | Contact'
title: 'Contact'
}

const Page = () => {
return (
<div className="min-w-full px-2 text-center">
<Header />

{/* header */}
<header className={`${amstelvar400.className} leading-4 lg:text-7xl md:text-6xl text-5xl w-[100%] px-6 sm:px-16 md:px-32 lg:px-40 mx-auto bg-white py-16`}>
Contact
</header>

{/* article */}
<article className={'prose-lg lg:text-xl text-[16px] max-w-5xl mx-auto'}>
<div className={'text-left py-1 pt-16'}>
<div className={`text-left ${amstelvar.className}`}>
<p>
The best way to reach me is through email, as I always keep a browser tab open dedicated to my email workspace at <strong className="font-bold">[email protected]</strong>. If that doesn't work for you, feel free to send me a direct message on either <a className={'underline'} target="_blank" href="https://www.linkedin.com/in/sumit-so-1415881a1">LinkedIn</a> or <a className={'underline'} target="_blank" href="https://instagram.com/_qumit">Instagram</a>.
</p>
<p>
If I had an OnlyFans account, I would definitely consider giving out free access as a unique way to connect. Alas, that's not a venture I've explored, so we'll have to stick to more traditional means of communication for now.
</p>
</div>
</div>
</article>
<Footer />
</div>
<>
<Article heroHeaderText="Contact">
<div className={`${canela_th.className} text-black`}>
<p>
The best way to reach me is through email, as I always keep a browser tab open dedicated to my email workspace at <strong className="font-bold">[email protected]</strong>. If that doesn't work for you, feel free to send me a direct message on either <a className={'underline'} target="_blank" href="https://www.linkedin.com/in/sumit-so-1415881a1">LinkedIn</a> or <a className={'underline'} target="_blank" href="https://instagram.com/_qumit">Instagram</a>.
</p>
<p>
If I had an OnlyFans account, I would definitely consider giving out free access as a unique way to connect. Alas, that's not a venture I've explored, so we'll have to stick to more traditional means of communication for now.
</p>
</div>
</Article>
</>
)
}

Expand Down
25 changes: 25 additions & 0 deletions app/explora/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Article from "@/components/article"
import { Metadata } from "next"
import { canela_sub, canela_th } from "@/lib/fonts"


export const metadata: Metadata = {
title: 'Explora +'
}

const Page = () => {
return (
<>
<Article heroHeaderText="Explora">
<p className={`${canela_sub.className} text-4xl leading-[1] mt-0 text-grey`}>
Honest takes on tech I’m still figuring out, one step at a time.
</p>
<p className={`${canela_th.className} text-grey py-0`}>
This page is a reflection of the time and effort I’ve invested in understanding tech more deeply. I’ve poured countless hours into learning these topics, and I’m committed to preserving and sharing that knowledge. Here, you’ll find insights on the areas I’ve dedicated myself to mastering.
</p>
</Article>
</>
)
}

export default Page
Binary file added app/fonts/CanelaDeck-Thin-Trial.otf
Binary file not shown.
Binary file added app/fonts/CanelaText-Bold-Trial.otf
Binary file not shown.
Binary file added app/fonts/CanelaText-Medium-Trial.otf
Binary file not shown.
Binary file added app/fonts/CanelaText-Regular-Trial.otf
Binary file not shown.
Binary file added app/fonts/CanelaText-Thin-Trial.otf
Binary file not shown.
Loading

0 comments on commit d3cf3fb

Please sign in to comment.