Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bbf015b

Browse files
committed
Stick the navbar to the top and change the logo
1 parent bd18b3f commit bbf015b

File tree

7 files changed

+155
-1968
lines changed

7 files changed

+155
-1968
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"faunadb": "4.0.0",
2525
"luxon": "1.25.0",
2626
"markdown-to-jsx": "7.1.1",
27-
"next": "10.0.4",
27+
"next": "10.0.7",
2828
"next-auth": "3.2.0",
2929
"phosphor-react": "1.1.2",
3030
"react": "17.0.1",

public/logo.png

81.4 KB
Loading

src/components/HomePageFeed.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default function HomePageFeed({
224224
const [session] = useSession()
225225
return (
226226
<div className="min-h-screen bg-gray-100 flex flex-col">
227-
<header className="bg-white shadow-sm lg:static lg:overflow-y-visible">
227+
<header className="bg-white shadow-sm sticky top-0 z-10">
228228
<AppNavBar />
229229
</header>
230230
<div className="py-10 flex-1">

src/components/Logo.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export default function Logo({
1111
}) {
1212
return (
1313
<A href="/" className="flex items-center cursor-pointer">
14-
<Image src="/logo.svg" width={size} height={size} alt="Coderplex Logo" />
15-
<span className={classNames('ml-2 text-xl font-semibold', className)}>
16-
Coderplex
14+
<Image src="/logo.png" width={size} height={size} alt="Coderplex Logo" />
15+
<span className={classNames('ml-2 text-xl font-medium', className)}>
16+
Coderplex Community
1717
</span>
1818
</A>
1919
)

src/components/ui/navbar/NavBar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ const NavBar = ({
2222
}: NavBarProps) => {
2323
const [isNavBarOpen, setIsNavBarOpen] = useState(false)
2424
return (
25-
<nav className={classNames('bg-white shadow', className)} {...rest}>
25+
<nav
26+
className={classNames('bg-white shadow sticky top-0 z-10', className)}
27+
{...rest}
28+
>
2629
<div className="px-4 mx-auto max-w-7xl sm:px-6 lg:px-8">
2730
<div className="flex justify-between h-16">
2831
<div className="flex">

src/pages/_document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class MyDocument extends Document {
5555
></script>
5656
<script src="https://unpkg.com/phosphor-icons" defer></script>
5757
</Head>
58-
<body className="overflow-auto bg-gray-50">
58+
<body className="bg-gray-50">
5959
<Main />
6060
<NextScript />
6161
</body>

yarn.lock

Lines changed: 145 additions & 1961 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)