Initial commit
This commit is contained in:
7
app/components/error/ErrorView.tsx
Normal file
7
app/components/error/ErrorView.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
export function ErrorView() {
|
||||
return (
|
||||
<div>
|
||||
<p>Ups, an unexpected error occurred.</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
13
app/components/layout/Footer.tsx
Normal file
13
app/components/layout/Footer.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
export function Footer() {
|
||||
return (
|
||||
<footer className="max-w-6xl mx-auto px-4 py-12 border-t border-slate-200 mt-12">
|
||||
<div className="text-center">
|
||||
<p className="text-sm text-slate-500">
|
||||
Copyright © {new Date().getFullYear()} Brainster Next College.
|
||||
All rights reserved.<br />
|
||||
Icons by <a href="https://icons8.com/" target="_blank" rel="noopener noreferrer">Icons8</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
31
app/components/layout/Header.tsx
Normal file
31
app/components/layout/Header.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
export function Header() {
|
||||
return (
|
||||
<header className="bg-white border-b border-slate-200 sticky top-0 z-10">
|
||||
<div className="max-w-6xl mx-auto px-4 py-3 h-auto min-h-16 flex items-center justify-between">
|
||||
<div className="flex items-center space-x-3">
|
||||
<div className="bg-blue-600 p-2 rounded-lg shrink-0">
|
||||
<img
|
||||
src="https://img.icons8.com/ios-filled/50/ffffff/flash-on.png"
|
||||
className="w-5 h-5 object-contain"
|
||||
alt="logo"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="font-bold text-lg leading-tight">
|
||||
Distributed Systems and Blockchain
|
||||
</h1>
|
||||
<p className="text-xs text-slate-500">Brainster Next College</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center space-x-4">
|
||||
<p className="text-sm text-slate-500 hidden md:block">Chain: Next Testnet</p>
|
||||
|
||||
<button className="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-xl text-sm font-semibold transition-all shadow-sm">
|
||||
Connect Wallet
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
36
app/components/layout/Sidebar.tsx
Normal file
36
app/components/layout/Sidebar.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Link, useLocation } from "react-router";
|
||||
|
||||
const navItems = [{ route: "/", label: "Explorer", icon: "home" }];
|
||||
|
||||
export function Sidebar() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<aside className="lg:col-span-3">
|
||||
<nav className="space-y-1">
|
||||
{navItems.map((item) => (
|
||||
<Link
|
||||
key={item.route}
|
||||
to={item.route}
|
||||
className={`w-full flex items-center space-x-3 px-4 py-3 rounded-xl text-sm font-medium transition-colors ${
|
||||
location.pathname === item.route
|
||||
? "bg-blue-50 text-blue-700 border border-blue-100"
|
||||
: "text-slate-600 hover:bg-slate-100"
|
||||
}`}
|
||||
>
|
||||
<img
|
||||
src={
|
||||
location.pathname === item.route
|
||||
? `https://img.icons8.com/ios-filled/50/2563eb/${item.icon}.png`
|
||||
: `https://img.icons8.com/ios/50/64748b/${item.icon}.png`
|
||||
}
|
||||
className="w-5 h-5 shrink-0 object-contain"
|
||||
alt={item.label}
|
||||
/>
|
||||
<span>{item.label}</span>
|
||||
</Link>
|
||||
))}
|
||||
</nav>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
7
app/components/loading/LoadingView.tsx
Normal file
7
app/components/loading/LoadingView.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
export function LoadingView() {
|
||||
return (
|
||||
<div className="flex justify-center items-center">
|
||||
<p className="sr-only">Loading...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user