Skip to content

Commit

Permalink
Added footer and style for nav and link hover
Browse files Browse the repository at this point in the history
  • Loading branch information
travisvn committed May 4, 2024
1 parent bc18b3f commit c075b4f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
26 changes: 26 additions & 0 deletions components/layout/footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use client'

import { cn } from '@/lib/utils'


const Footer = () => {
return (
<footer
className={cn(
'flex flex-row mx-auto space-x-8 w-full mt-8',
'text-gray-500',
'place-content-center',
)}
>
<a
href='https://github.com/travisvn/next-mdx-template'
className='hover:ring-2 rounded-md px-2 py-1 duration-150 active:scale-95 active:duration-0'
target='_blank'
>
View on GitHub
</a>
</footer>
)
}

export default Footer
3 changes: 3 additions & 0 deletions components/layout/main-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { cn } from '@/lib/utils'
import NavBar from '@/components/layout/navbar'
import Footer from '@/components/layout/footer'

type Props = {
children?: React.ReactNode
}


const MainLayout = ({ children }: Props) => {
return (
<>
Expand All @@ -18,6 +20,7 @@ const MainLayout = ({ children }: Props) => {
)}>
<NavBar />
{children}
<Footer />
</div>
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion components/layout/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const NavBar = () => {
<Link
key={path}
href={path}
className="transition-all hover:text-neutral-800 dark:hover:text-neutral-200 flex align-middle relative py-1 px-2 m-1"
className='hover:ring-2 rounded-md px-2 py-1 duration-150 active:scale-95 active:duration-0'
>
{name}
</Link>
Expand Down
1 change: 1 addition & 0 deletions components/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { postUrl } from '@/config/site'
import { formatDate, getBlogPosts } from '@/utils/mdx-utils'
import Link from 'next/link'


const BlogPosts = () => {
let allBlogs = getBlogPosts()

Expand Down

0 comments on commit c075b4f

Please sign in to comment.