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

implement Hero #4

Merged
merged 10 commits into from
Dec 31, 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
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"postinstall": "lefthook install"
},
"dependencies": {
"modern-css-reset": "^1.4.0",
"next": "15.1.3",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Expand All @@ -25,8 +26,6 @@
"@types/react": "^19",
"@types/react-dom": "^19",
"lefthook": "1.10.1",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
}
803 changes: 9 additions & 794 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions postcss.config.mjs

This file was deleted.

1 change: 0 additions & 1 deletion public/file.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/globe.svg

This file was deleted.

Binary file added public/icon.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/next.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/vercel.svg

This file was deleted.

1 change: 0 additions & 1 deletion public/window.svg

This file was deleted.

Binary file removed src/app/favicon.ico
Binary file not shown.
27 changes: 15 additions & 12 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
--background: #ffffff;
--font-size: 12px;
--grid-gap: 1rem;
--background: linear-gradient(
15deg,
rgba(168, 202, 240, 1) 20%,
rgba(233, 240, 250, 1) 80%
);
--foreground: #171717;
}

@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}

body {
font-size: var(--font-size);
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}

main {
display: grid;
padding: 0 var(--grid-gap);
gap: var(--grid-gap);
grid-template-columns: repeat(12, 1fr);
}
22 changes: 5 additions & 17 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
import type { Metadata } from 'next'
import { Geist, Geist_Mono } from 'next/font/google'
import 'modern-css-reset'
import './globals.css'

const geistSans = Geist({
variable: '--font-geist-sans',
subsets: ['latin'],
})

const geistMono = Geist_Mono({
variable: '--font-geist-mono',
subsets: ['latin'],
})

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
title: 'しろね✨ | aqyuki.dev',
description: 'しろね✨のポートフォリとサイトです。',
}

export default function RootLayout({
Expand All @@ -24,10 +14,8 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
<body>
<main>{children}</main>
</body>
</html>
)
Expand Down
100 changes: 4 additions & 96 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,101 +1,9 @@
import Image from 'next/image'
import { Hero } from '@/feature/hero'

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-8 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 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2">
Get started by editing{' '}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
src/app/page.tsx
</code>
.
</li>
<li>Save and see your changes instantly.</li>
</ol>

<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] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
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 text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
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-6 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>
<>
<Hero />
</>
)
}
19 changes: 19 additions & 0 deletions src/feature/avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import Image from 'next/image'
import type { CSSProperties } from 'react'

const imageStyle: CSSProperties = {
borderRadius: '50%',
}

export function Avatar() {
return (
<Image
src="/icon.jpeg"
alt="icon image"
width={180}
height={180}
priority
style={imageStyle}
/>
)
}
48 changes: 48 additions & 0 deletions src/feature/hero.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { Andika, Sawarabi_Gothic } from 'next/font/google'
import type { CSSProperties } from 'react'
import { Avatar } from './avatar'

const heroStyle: CSSProperties = {
width: '100%',
height: '100vh',
display: 'grid',
placeItems: 'center',
gridColumnStart: 5,
gridColumnEnd: 9,
}

const heroCard: CSSProperties = {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '3rem',
}

const heroTitleGroup: CSSProperties = {
width: '100%',
textAlign: 'center',
}

const sawarabiGothic = Sawarabi_Gothic({
weight: '400',
subsets: ['latin'],
})

const andika = Andika({
weight: '400',
subsets: ['latin'],
})

export function Hero() {
return (
<div style={heroStyle}>
<div style={heroCard}>
<Avatar />
<div style={heroTitleGroup}>
<h1 className={sawarabiGothic.className}>しろね✨</h1>
<h1 className={andika.className}>Web Developer</h1>
</div>
</div>
</div>
)
}
18 changes: 0 additions & 18 deletions tailwind.config.ts

This file was deleted.

Loading