Skip to content

Commit d86b61a

Browse files
committed
navbar config
1 parent 5a7e06e commit d86b61a

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed

lazyweb/components/shared/NavBar/NavBar.tsx

+43-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,30 @@ import { useLoginModal } from '@/hooks/Zustand';
99
import { Fragment } from 'react';
1010
import { useRouter } from 'next/router';
1111
import { event } from 'nextjs-google-analytics';
12+
import ReactTooltip from 'react-tooltip';
1213

1314
type Props = {}
1415

16+
const IconWithToolTip = ({img, title, path}:{
17+
img:string
18+
title:string
19+
path:string
20+
})=>{
21+
const router = useRouter()
22+
return (
23+
<>
24+
<a data-tip data-for={title.toLocaleLowerCase().replaceAll(' ', '-')}>
25+
<img onClick={()=>{
26+
router.push(path)
27+
}} src={img} className='h-[1.5rem] cursor-pointer'/>
28+
</a>
29+
<ReactTooltip className='bg-gray' type='warning' id={title.toLocaleLowerCase().replaceAll(' ', '-')} place='bottom'>
30+
{title}
31+
</ReactTooltip>
32+
</>
33+
)
34+
}
35+
1536
const NavBar = (props: Props) => {
1637
// const [isOpen, setIsOpen] = useState(false)
1738
const {isLoginModalOpen:isOpen, setIsLoginModalOpen:setIsOpen} = useLoginModal()
@@ -45,7 +66,11 @@ const NavBar = (props: Props) => {
4566
</div>
4667
<div className='flex gap-[1rem] mr-[2rem] items-center'>
4768
<div className='h-[2.5rem] md:flex hidden w-[2px] bg-[#5e5f60]'/>
48-
<Menu as="div" className="relative inline-block text-left">
69+
<IconWithToolTip img='/assets/playfavicon.ico' path='/playground' title='JS Playground'/>
70+
<IconWithToolTip img='/assets/snipfavicon.ico' path='/snipshots' title='SnipShots'/>
71+
<IconWithToolTip img='/assets/notesfav.ico' path='/notes' title='LazyNotes'/>
72+
73+
{/* <Menu as="div" className="relative inline-block text-left">
4974
<Menu.Button title={
5075
'Amazing Tools'
5176
}>
@@ -97,14 +122,30 @@ const NavBar = (props: Props) => {
97122
<img src='/assets/snipfavicon.ico' className='h-[1.5rem] mr-[0.5rem]'/>
98123
SnipShots
99124
</button>
125+
<button
126+
onClick={()=>{
127+
event('go-to-notes', {
128+
category: 'notes',
129+
action: 'go-to-notes',
130+
label: 'notes'
131+
})
132+
router.push('/notes')
133+
}}
134+
className={`${
135+
active ? 'bg-altGray text-white' : 'text-white bg-gray'
136+
} group flex w-full transition-all duration-300 items-center rounded-md px-2 py-2 text-sm`}
137+
>
138+
<img src='/assets/notesfav.ico' className='h-[1.5rem] mr-[0.5rem]'/>
139+
LazyNotes
140+
</button>
100141
</>
101142
)}
102143
</Menu.Item>
103144
</div>
104145
105146
</Menu.Items>
106147
</Transition>
107-
</Menu>
148+
</Menu> */}
108149
{session && <CreateResource/>}
109150
<ProfileIcon onClick={()=>{
110151
event('open-login-modal', {

lazyweb/pages/notes.tsx

+31
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,42 @@
11
import NoteComponent from '@/components/Notes'
2+
import Head from 'next/head'
23
import React from 'react'
34

45
type Props = {}
56

67
const Notes = (props: Props) => {
78
return (
9+
<>
10+
<Head>
11+
<meta charSet="UTF-8" />
12+
<title>LazyWeb: Notes</title>
13+
<meta name="description" content={
14+
"Elevate your note-taking with AI-powered writing and Notion-style organization. Capture and refine ideas effortlessly."
15+
} />
16+
<meta name="keywords" content="Notion, Notes, LazyWeb" />
17+
<meta name="author" content="Dishant Sharma" />
18+
19+
<meta property="og:title" content="LazyWeb: Notes" />
20+
<meta property="og:description" content={
21+
"Elevate your note-taking with AI-powered writing and Notion-style organization. Capture and refine ideas effortlessly."
22+
} />
23+
<meta property="og:type" content="website" />
24+
<meta property="og:url" content="https://app.lazyweb.rocks/playground" />
25+
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/dishant0406/images-repo@master/lazynotes.png" />
26+
27+
<meta name="twitter:card" content="summary_large_image" />
28+
<meta name="twitter:title" content="LazyWeb: Notes" />
29+
<meta name="twitter:description" content={
30+
"Elevate your note-taking with AI-powered writing and Notion-style organization. Capture and refine ideas effortlessly."
31+
} />
32+
<meta name="twitter:image" content="https://cdn.jsdelivr.net/gh/dishant0406/images-repo@master/lazynotes.png" />
33+
<meta name="twitter:site" content="@dishant0406" />
34+
<meta name="twitter:creator" content="@dishant0406" />
35+
36+
<link rel="icon" href="/assets/notesfav.ico" type="image/x-icon" />
37+
</Head>
838
<NoteComponent />
39+
</>
940
)
1041
}
1142

lazyweb/public/assets/notesfav.ico

15 KB
Binary file not shown.

0 commit comments

Comments
 (0)