mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
feat: basic design
This commit is contained in:
parent
44b3e493aa
commit
7f78c9ecc4
7 changed files with 262 additions and 150 deletions
34
src/app/components/header.tsx
Normal file
34
src/app/components/header.tsx
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import Link from "next/link";
|
||||
import SearchBar from "./search-bar";
|
||||
|
||||
import { Icon } from "@iconify/react";
|
||||
|
||||
export default function Header() {
|
||||
return (
|
||||
<div className="fixed w-full p-4 flex justify-between items-center bg-amber-100 border-b-2 border-amber-200">
|
||||
<Link href={"/"} className="font-black text-3xl">
|
||||
TomodachiShare
|
||||
</Link>
|
||||
|
||||
<SearchBar />
|
||||
|
||||
<ul className="flex gap-2 items-center">
|
||||
<li>
|
||||
<Link href={"/login"} className="flex justify-center items-center p-0.5 bg-orange-400 border-2 rounded">
|
||||
<Icon icon="ri:dice-fill" fontSize={32} />
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href={"/login"} className="flex justify-center items-center px-4 py-1.5 bg-orange-400 border-2 rounded">
|
||||
Submit
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link href={"/login"} className="flex justify-center items-center px-4 py-1.5 bg-orange-400 border-2 rounded">
|
||||
Login
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
14
src/app/components/search-bar.tsx
Normal file
14
src/app/components/search-bar.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
"use client";
|
||||
|
||||
import { Icon } from "@iconify/react";
|
||||
|
||||
export default function SearchBar() {
|
||||
return (
|
||||
<div className="max-w-md w-full flex rounded-xlfocus-within:ring-4 ring-orange-400/50 transition">
|
||||
<input type="text" placeholder="Search..." className="bg-orange-200 border-2 border-orange-400 py-2 px-3 rounded-l-xl outline-0 w-full" />
|
||||
<button className="bg-orange-400 p-2 w-12 rounded-r-xl flex justify-center items-center">
|
||||
<Icon icon="ic:baseline-search" fontSize={24} />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,26 +1,13 @@
|
|||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
--background: #ffffff;
|
||||
--foreground: #171717;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: var(--font-geist-sans);
|
||||
--font-mono: var(--font-geist-mono);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
@apply bg-amber-50;
|
||||
|
||||
--color1: var(--color-amber-50);
|
||||
--color2: var(--color-amber-100);
|
||||
|
||||
background-image: repeating-linear-gradient(45deg, var(--color1) 25%, transparent 25%, transparent 75%, var(--color1) 75%, var(--color1)),
|
||||
repeating-linear-gradient(45deg, var(--color1) 25%, var(--color2) 25%, var(--color2) 75%, var(--color1) 75%, var(--color1));
|
||||
background-position: 0 0, 10px 10px;
|
||||
background-size: 20px 20px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,29 @@
|
|||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { Inter } from "next/font/google";
|
||||
|
||||
import "./globals.css";
|
||||
import Header from "./components/header";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono",
|
||||
subsets: ["latin"],
|
||||
const inter = Inter({
|
||||
subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
title: "TomodachiShare",
|
||||
description: "Share your Tomodachi Life Miis",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
return (
|
||||
<html lang="en">
|
||||
<body className={`${inter.className} antialiased flex flex-col items-center`}>
|
||||
<Header />
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
135
src/app/page.tsx
135
src/app/page.tsx
|
|
@ -1,103 +1,38 @@
|
|||
import Image from "next/image";
|
||||
export default function Page() {
|
||||
return (
|
||||
<div className="max-w-5xl grid grid-cols-3 gap-4 py-32">
|
||||
<div className="bg-zinc-50 rounded-2xl border-2 border-zinc-200">
|
||||
<img src="https://placehold.co/600x400" alt="mii" className="rounded-t-xl" />
|
||||
<div className="p-4 border-t-2 border-zinc-200">
|
||||
<h3 className="font-bold text-2xl">Frieren</h3>
|
||||
<div id="tags" className="flex gap-1 mt-1 *:px-1.5 *:py-1 *:bg-orange-400 *:rounded *:text-xs">
|
||||
<span>Anime</span>
|
||||
<span>Test</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/next.svg"
|
||||
alt="Next.js logo"
|
||||
width={180}
|
||||
height={38}
|
||||
priority
|
||||
/>
|
||||
<ol className="list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
|
||||
<li className="mb-2 tracking-[-.01em]">
|
||||
Get started by editing{" "}
|
||||
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
|
||||
src/app/page.tsx
|
||||
</code>
|
||||
.
|
||||
</li>
|
||||
<li className="tracking-[-.01em]">
|
||||
Save and see your changes instantly.
|
||||
</li>
|
||||
</ol>
|
||||
<div className="bg-zinc-50 rounded-2xl border-2 border-zinc-200">
|
||||
<img src="https://placehold.co/600x400" alt="mii" className="rounded-t-xl" />
|
||||
<div className="p-4 border-t-2 border-zinc-200">
|
||||
<h3 className="font-bold text-2xl">Frieren</h3>
|
||||
<div id="tags" className="flex gap-1 mt-1 *:px-1.5 *:py-1 *:bg-orange-400 *:rounded *:text-xs">
|
||||
<span>Anime</span>
|
||||
<span>Test</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-4 items-center flex-col sm:flex-row">
|
||||
<a
|
||||
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto"
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/vercel.svg"
|
||||
alt="Vercel logomark"
|
||||
width={20}
|
||||
height={20}
|
||||
/>
|
||||
Deploy now
|
||||
</a>
|
||||
<a
|
||||
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]"
|
||||
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Read our docs
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
<footer className="row-start-3 flex gap-[24px] flex-wrap items-center justify-center">
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/file.svg"
|
||||
alt="File icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Learn
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/window.svg"
|
||||
alt="Window icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Examples
|
||||
</a>
|
||||
<a
|
||||
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
|
||||
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
aria-hidden
|
||||
src="/globe.svg"
|
||||
alt="Globe icon"
|
||||
width={16}
|
||||
height={16}
|
||||
/>
|
||||
Go to nextjs.org →
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
<div className="bg-zinc-50 rounded-2xl border-2 border-zinc-200">
|
||||
<img src="https://placehold.co/600x400" alt="mii" className="rounded-t-xl" />
|
||||
<div className="p-4 border-t-2 border-zinc-200">
|
||||
<h3 className="font-bold text-2xl">Frieren</h3>
|
||||
<div id="tags" className="flex gap-1 mt-1 *:px-1.5 *:py-1 *:bg-orange-400 *:rounded *:text-xs">
|
||||
<span>Anime</span>
|
||||
<span>Test</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue