Skip to content

Commit

Permalink
feat(header): replace signature by a styled name
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Mar 4, 2024
1 parent d90609b commit 26e3c3b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
20 changes: 5 additions & 15 deletions src/app/_components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

import React, { useEffect, useState } from 'react'
import Link from 'next/link'
import Image from 'next/image'
import { usePathname } from 'next/navigation'

import { ToggleTheme } from './toggle-theme'
import { MobileMenu } from './mobile-menu'
import { Search } from './search'

import signatureDark from './signature-dark.png'
import signatureLight from './signature-light.png'

const MenuItem: React.FC<{ name: string; path: string }> = ({ name, path }) => {
const pathname = usePathname()
const isHome = path === '/'
Expand Down Expand Up @@ -67,17 +63,11 @@ export function Header() {
>
<div className="content-container m-auto flex flex-wrap items-center justify-between">
<div className="md:hidden" />
<Link href="/">
<Image
src={signatureDark}
alt="Mateus Felipe"
className="w-16 dark:hidden"
/>
<Image
src={signatureLight}
alt="Mateus Felipe"
className="hidden w-16 dark:block"
/>
<Link
href="/"
className="font-handwrite text-2xl font-bold drop-shadow-lg"
>
Mateus F.
</Link>
<div className="hidden flex-wrap items-center justify-center gap-8 md:flex">
<nav className="flex flex-wrap items-center justify-center gap-5">
Expand Down
Binary file removed src/app/_components/header/signature-dark.png
Binary file not shown.
Binary file removed src/app/_components/header/signature-light.png
Binary file not shown.
13 changes: 11 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Metadata, Viewport } from 'next'
import Script from 'next/script'
import { Inter } from 'next/font/google'
import { Inter, Caveat } from 'next/font/google'

import { config } from 'global-config'
import { Header } from './_components/header'
Expand Down Expand Up @@ -71,6 +71,13 @@ const inter = Inter({
display: 'swap'
})

const dancingScript = Caveat({
subsets: ['latin'],
weight: ['700'],
variable: '--font-caveat',
display: 'swap'
})

export default function RootLayout({
children
}: {
Expand All @@ -85,7 +92,9 @@ export default function RootLayout({
data-website-id={process.env.UMAMI_WEBSITE_ID}
/>
</head>
<body className={`scroll-smooth ${inter.variable}`}>
<body
className={`scroll-smooth ${inter.variable} ${dancingScript.variable}`}
>
<Providers>
<Header />
<div>{children}</div>
Expand Down
3 changes: 2 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const config: Config = {
20: '20deg'
},
fontFamily: {
sans: 'var(--font-inter)'
sans: 'var(--font-inter)',
handwrite: 'var(--font-caveat)'
},
colors: {
neutral: {
Expand Down

0 comments on commit 26e3c3b

Please sign in to comment.