add my account page

This commit is contained in:
osmannyildiz 2023-12-16 09:58:31 +03:00
parent 18bcc0315d
commit 5fe6d25933
6 changed files with 87 additions and 7 deletions

View File

@ -26,13 +26,10 @@ a {
} }
.btn { .btn {
color: white;
background-color: var(--color-accent);
border: none;
border-radius: var(--border-radius); border-radius: var(--border-radius);
padding: 0.75rem 1rem; padding: 0.75rem 1rem;
font-size: 1rem; font-size: 1rem;
font-weight: 700; font-weight: 600;
cursor: pointer; cursor: pointer;
transition: transform 0.125s; transition: transform 0.125s;
} }
@ -42,6 +39,33 @@ a {
.btn:active { .btn:active {
transform: scale(0.95); transform: scale(0.95);
} }
.btn-primary {
color: white;
background-color: var(--color-accent);
border: none;
}
.btn-flat {
color: white;
background-color: transparent;
border: none;
}
.input {
padding: 0.75rem;
border: none;
border-radius: var(--border-radius);
}
.input-group {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.page-title {
font-size: 2.5rem;
font-weight: 300;
}
.fg-accent { .fg-accent {
color: var(--color-accent); color: var(--color-accent);

33
src/app/hesabim/page.jsx Normal file
View File

@ -0,0 +1,33 @@
import Container from "@/components/Container";
import styles from "./page.module.css";
export default function MyAccountPage() {
return (
<main className={styles.root}>
<Container>
<h1 className="page-title">Hesabım</h1>
<form className={styles.form}>
<div className="input-group">
<label htmlFor="first-name">Ad</label>
<input className="input" type="text" id="first-name" />
</div>
<div className="input-group">
<label htmlFor="last-name">Soyad</label>
<input className="input" type="text" id="last-name" />
</div>
<div className="input-group">
<label htmlFor="email">E-posta adresi</label>
<input className="input" type="email" id="email" />
</div>
<button className="btn btn-primary" type="submit">
Kaydet
</button>
</form>
</Container>
</main>
);
}

View File

@ -0,0 +1,9 @@
.root {
margin-top: 3rem;
}
.form {
display: flex;
flex-direction: column;
gap: 1.5rem;
}

View File

@ -18,7 +18,7 @@ export default function CourseDetailPage({ params }) {
<div> <div>
<h1>{course.name}</h1> <h1>{course.name}</h1>
<div>{course.instructor.name}</div> <div>{course.instructor.name}</div>
<button className={cn(styles.buyButton, "btn")}> <button className={cn(styles.buyButton, "btn btn-primary")}>
Satın Al: {formatPrice(course.price)} Satın Al: {formatPrice(course.price)}
</button> </button>
</div> </div>

View File

@ -1,14 +1,22 @@
import { ConnectButton } from "@rainbow-me/rainbowkit"; import { ConnectButton } from "@rainbow-me/rainbowkit";
import Link from "next/link";
import styles from "./Header.module.css"; import styles from "./Header.module.css";
export default function Header() { export default function Header() {
return ( return (
<header className={styles.root}> <header className={styles.root}>
<div className={styles.brand}> <Link className={styles.brand} href="/">
<span>Cub</span> <span>Cub</span>
<span className="fg-accent">Learn</span> <span className="fg-accent">Learn</span>
</Link>
<div className={styles.nav}>
<Link href="/hesabim" className="btn btn-flat">
Hesabım
</Link>
<ConnectButton />
</div> </div>
<ConnectButton />
</header> </header>
); );
} }

View File

@ -12,3 +12,9 @@
font-size: 2rem; font-size: 2rem;
font-weight: 300; font-weight: 300;
} }
.nav {
display: flex;
align-items: center;
gap: 2.5rem;
}