Skip to content
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

Add new components into Home #14

Merged
merged 3 commits into from
Jul 18, 2024
Merged
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 added client/public/isotypeLinx.png
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 client/public/logotypeLinx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions client/src/components/Button-Outline.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import cn from 'classnames';
import type { ReactNode } from 'react';

export default function Button({
children,
type = 'button',
className,
onClick,
}: ButtonProps) {
return (
<button
type={type}
onClick={onClick}
className={cn(
'mt-4 px-4 py-2 border border-blue-500 text-blue-500 rounded hover:bg-blue-500 hover:text-white transition-colors',
className,
)}
>
{children}
</button>
);
}

interface ButtonProps {
children: ReactNode;
type?: 'submit' | 'button';
className?: string;
onClick?: () => void;
}
27 changes: 27 additions & 0 deletions client/src/components/Layout-Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import ButtonOutline from './Button-Outline';

export default function Layout() {
return (
<section className="pb-12 pt-12">
<div className="flex flex-col md:flex-row items-center md:items-start">
<div className="p-2 md:w-1/2 mb-4 md:mb-0">
<img
className="w-full md:w-[500px] object-contain"
src="../../public/isotypeLinx.png"
alt="Isotype Linx"
/>
</div>
<div className="p-2 md:pl-8">
<h1 className="text-slate-950 text-2xl font-bold mb-4">Linx</h1>
<p className="pb-2">
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Repellat
error corrupti vitae incidunt totam blanditiis, voluptatem ratione
eius consequuntur qui. Quae laborum quasi assumenda ea autem beatae,
sed corrupti atque!
</p>
<ButtonOutline type="button">Button</ButtonOutline>
</div>
</div>
</section>
);
}
30 changes: 30 additions & 0 deletions client/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default function Navbar() {
return (
<>
<nav className="p-4 border-b-2 border-blue-500">
<div className="container mx-auto flex justify-between items-center">
<div className="text-slate-950 text-2xl font-bold">
<img className="w-20" src="/logotypeLinx.png" alt="Logotype Linx" />
</div>
<ul className="flex space-x-4">
<li>
<a href="#product" className="text-slate-950 hover:text-blue-700">
Product
</a>
</li>
<li>
<a href="#login" className="text-slate-950 hover:text-blue-700">
Login
</a>
</li>
<li>
<a href="#signup" className="text-slate-950 hover:text-blue-700">
Sign Up
</a>
</li>
</ul>
</div>
</nav>
</>
);
}
5 changes: 4 additions & 1 deletion client/src/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import Layout from '../components/Layout-Home';
import Navbar from '../components/Navbar';
export default function Home() {
return (
<>
<h1 className="text-black text-4xl">Home</h1>
<Navbar />
<Layout />
</>
);
}
Loading