diff options
| author | Kartik <[email protected]> | 2024-06-16 13:14:28 +0530 |
|---|---|---|
| committer | Kartik <[email protected]> | 2024-06-16 13:14:28 +0530 |
| commit | 39ba65431d51964355d4075ad9cdbb50deeb8d5f (patch) | |
| tree | 48a41d6adfb8521681bfd041596f8d42767a3663 /apps | |
| parent | Merge branch 'codetorso' of https://github.com/Dhravya/supermemory into codet... (diff) | |
| download | supermemory-39ba65431d51964355d4075ad9cdbb50deeb8d5f.tar.xz supermemory-39ba65431d51964355d4075ad9cdbb50deeb8d5f.zip | |
improve: /home page
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/app/(dash)/dynamicisland.tsx | 2 | ||||
| -rw-r--r-- | apps/web/app/(dash)/header.tsx | 27 | ||||
| -rw-r--r-- | apps/web/app/(dash)/home/page.tsx | 2 | ||||
| -rw-r--r-- | apps/web/app/(dash)/home/queryinput.tsx | 3 | ||||
| -rw-r--r-- | apps/web/app/(dash)/layout.tsx | 11 | ||||
| -rw-r--r-- | apps/web/app/(dash)/menu.tsx | 4 | ||||
| -rw-r--r-- | apps/web/public/logo.svg | 2 |
7 files changed, 34 insertions, 17 deletions
diff --git a/apps/web/app/(dash)/dynamicisland.tsx b/apps/web/app/(dash)/dynamicisland.tsx index 31f76fda..c08f883a 100644 --- a/apps/web/app/(dash)/dynamicisland.tsx +++ b/apps/web/app/(dash)/dynamicisland.tsx @@ -38,7 +38,7 @@ export function DynamicIsland() { }); return ( - <div className="fixed z-40 left-1/2 -translate-x-1/2 top-12"> + <div className=""> <AnimatePresence mode="wait"> <motion.div initial={{ diff --git a/apps/web/app/(dash)/header.tsx b/apps/web/app/(dash)/header.tsx index 026cb080..4af5c569 100644 --- a/apps/web/app/(dash)/header.tsx +++ b/apps/web/app/(dash)/header.tsx @@ -2,29 +2,40 @@ import React from "react"; import Image from "next/image"; import Link from "next/link"; import Logo from "../../public/logo.svg"; -import { ChatIcon } from "@repo/ui/icons"; +import { AddIcon, ChatIcon } from "@repo/ui/icons"; import DynamicIsland from "./dynamicisland"; function Header() { return ( - <div> - <div className="fixed left-0 w-full flex items-center justify-between z-10"> - <Link className="px-5" href="/home"> + <div className="p-4 relative z-10 h-16 flex items-center"> + + <div className="w-full flex items-center justify-between"> + <Link className="" href="/home"> <Image src={Logo} alt="SuperMemory logo" - className="hover:brightness-75 brightness-50 duration-200" + className="hover:brightness-125 duration-200" /> </Link> - <DynamicIsland /> + <div className="fixed z-30 left-1/2 -translate-x-1/2 top-5"> + {/* <DynamicIsland /> */} + <button className="bg-secondary p-2 text-[#989EA4] rounded-full flex items-center justify-between gap-2 px-4 h-10 pr-5"> + <Image + src={AddIcon} + alt="add icon" + /> + Add content + </button> + </div> - <button className="flex shrink-0 duration-200 items-center gap-2 px-5 py-1.5 rounded-xl hover:bg-secondary"> - <Image src={ChatIcon} alt="Chat icon" /> + <button className="flex duration-200 items-center text-[#7D8994] hover:bg-[#1F2429] text-[13px] gap-2 px-3 py-2 rounded-xl"> + <Image src={ChatIcon} alt="Chat icon" className="w-5" /> Start new chat </button> </div> + </div> ); } diff --git a/apps/web/app/(dash)/home/page.tsx b/apps/web/app/(dash)/home/page.tsx index b4bafb38..c539673d 100644 --- a/apps/web/app/(dash)/home/page.tsx +++ b/apps/web/app/(dash)/home/page.tsx @@ -25,7 +25,7 @@ async function Page({ {/* all content goes here */} {/* <div className="">hi {firstTime ? 'first time' : ''}</div> */} - <div className="w-full h-96"> + <div className="w-full pb-20"> <QueryInput initialSpaces={spaces.data} /> </div> </div> diff --git a/apps/web/app/(dash)/home/queryinput.tsx b/apps/web/app/(dash)/home/queryinput.tsx index d0c27b8d..fbd537e3 100644 --- a/apps/web/app/(dash)/home/queryinput.tsx +++ b/apps/web/app/(dash)/home/queryinput.tsx @@ -63,7 +63,7 @@ function QueryInput({ name="q" cols={30} rows={4} - className="bg-transparent pt-2.5 text-base text-[#989EA4] focus:text-foreground duration-200 tracking-[3%] outline-none resize-none w-full p-4" + className="bg-transparent pt-2.5 text-base placeholder:text-[#5D6165] text-[#9DA0A4] focus:text-white duration-200 tracking-[3%] outline-none resize-none w-full p-4" placeholder="Ask your second brain..." onKeyDown={(e) => { if (e.key === "Enter") { @@ -78,6 +78,7 @@ function QueryInput({ <button type="submit" + onClick={e => e.preventDefault()} disabled={disabled} className="h-12 w-12 rounded-[14px] bg-[#21303D] all-center shrink-0 hover:brightness-125 duration-200 outline-none focus:outline focus:outline-primary active:scale-90" > diff --git a/apps/web/app/(dash)/layout.tsx b/apps/web/app/(dash)/layout.tsx index b879a2f5..4c787c9c 100644 --- a/apps/web/app/(dash)/layout.tsx +++ b/apps/web/app/(dash)/layout.tsx @@ -12,12 +12,17 @@ async function Layout({ children }: { children: React.ReactNode }) { } return ( - <main className="h-screen flex flex-col p-4 relative "> - <Header /> + <main className="h-screen flex flex-col"> + + <div className="fixed top-0 left-0 w-full"> + <Header /> + </div> <Menu /> - {children} + <div className="w-full h-full"> + {children} + </div> <Toaster /> </main> diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx index 5f26f545..035e8e3f 100644 --- a/apps/web/app/(dash)/menu.tsx +++ b/apps/web/app/(dash)/menu.tsx @@ -23,14 +23,14 @@ function Menu() { ]; return ( - <div className="fixed h-screen pb-[25vh] w-full p-4 flex items-end justify-end lg:justify-start lg:items-center top-0 left-0 pointer-events-none"> + <div className="fixed h-screen pb-20 w-full p-4 flex items-end justify-end lg:justify-start lg:items-center top-0 left-0 pointer-events-none"> <div className=""> <div className="pointer-events-auto group flex w-14 text-foreground-menu text-[15px] font-medium flex-col items-start gap-6 overflow-hidden rounded-[28px] bg-secondary px-3 py-4 duration-200 hover:w-40"> {menuItems.map((item) => ( <Link href={item.url} key={item.url} - className="flex w-full cursor-pointer items-center gap-3 px-1 duration-200 hover:scale-105 hover:brightness-150 active:scale-90 justify-end md:justify-start" + className="flex w-full text-[#777E87] brightness-75 hover:brightness-125 cursor-pointer items-center gap-3 px-1 duration-200 hover:scale-105 active:scale-90 justify-end md:justify-start" > <p className="md:hidden opacity-0 duration-200 group-hover:opacity-100"> {item.text} diff --git a/apps/web/public/logo.svg b/apps/web/public/logo.svg index 6081634d..add59158 100644 --- a/apps/web/public/logo.svg +++ b/apps/web/public/logo.svg @@ -1,4 +1,4 @@ <svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M19.0357 8C20.5531 8 21 9.27461 21 10.8438V16.3281H23.5536V14.2212C23.5536 13.1976 23.9468 12.216 24.6467 11.4922L25.0529 11.0721C24.9729 10.8772 24.9286 10.6627 24.9286 10.4375C24.9286 9.54004 25.6321 8.8125 26.5 8.8125C27.3679 8.8125 28.0714 9.54004 28.0714 10.4375C28.0714 11.335 27.3679 12.0625 26.5 12.0625C26.2822 12.0625 26.0748 12.0167 25.8863 11.9339L25.4801 12.354C25.0012 12.8492 24.7321 13.5209 24.7321 14.2212V16.3281H28.9714C29.2045 15.7326 29.7691 15.3125 30.4286 15.3125C31.2964 15.3125 32 16.04 32 16.9375C32 17.835 31.2964 18.5625 30.4286 18.5625C29.7691 18.5625 29.2045 18.1424 28.9714 17.5469H21V21.2031H25.0428C25.2759 20.6076 25.8405 20.1875 26.5 20.1875C27.3679 20.1875 28.0714 20.915 28.0714 21.8125C28.0714 22.71 27.3679 23.4375 26.5 23.4375C25.8405 23.4375 25.2759 23.0174 25.0428 22.4219H21V26.0781H24.4125C25.4023 26.0781 26.3516 26.4847 27.0515 27.2085L29.0292 29.2536C29.2177 29.1708 29.4251 29.125 29.6429 29.125C30.5107 29.125 31.2143 29.8525 31.2143 30.75C31.2143 31.6475 30.5107 32.375 29.6429 32.375C28.775 32.375 28.0714 31.6475 28.0714 30.75C28.0714 30.5248 28.1157 30.3103 28.1958 30.1154L26.2181 28.0703C25.7392 27.5751 25.0897 27.2969 24.4125 27.2969H21V31.1562C21 32.7254 20.5531 34 19.0357 34C17.6165 34 16.4478 32.8879 16.3004 31.4559C16.0451 31.527 15.775 31.5625 15.5 31.5625C13.7665 31.5625 12.3571 30.1051 12.3571 28.3125C12.3571 27.9367 12.421 27.5711 12.5339 27.2359C11.0509 26.657 10 25.1742 10 23.4375C10 21.8176 10.9183 20.416 12.2491 19.766C11.8219 19.2125 11.5714 18.5117 11.5714 17.75C11.5714 16.191 12.6321 14.891 14.0464 14.5711C13.9679 14.2918 13.9286 13.9922 13.9286 13.6875C13.9286 12.1691 14.9402 10.8895 16.3004 10.534C16.4478 9.11211 17.6165 8 19.0357 8Z" - fill="#fff"/> + fill="#545B62"/> </svg>
\ No newline at end of file |