fix: link (#115)

* start

* .

* seeding connections

* .

* wip

* wip: learning state

* wip: notes section

* wip: many

* topics

* chore: update schema

* update package

* update sidebar

* update page section

* feat: profile

* fix: remove z index

* fix: wrong type

* add avatar

* add avatar

* wip

* .

* store page section key

* remove atom page section

* fix rerender

* fix rerender

* fix rerender

* fix rerender

* fix link

* search light/dark mode

* bubble menu ui

* .

* fix: remove unecessary code

* chore: mark as old for old schema

* chore: adapt new schema

* fix: add topic schema but null for now

* fix: add icon on personal link

* fix: list item

* fix: set url fetched when editing

* fix: remove image

* feat: add icon to link

* feat: custom url zod validation

* fix: metadata test

* chore: update utils

* fix: link

* fix: url fetcher

* .

* .

* fix: add link, section

* chore: seeder

* .

* .

* .

* .

* fix: change checkbox to learning state

* fix: click outside editing form

* feat: constant

* chore: move to master folder

* chore: adapt new schema

* chore: cli for new schema

* fix: new schema for dev seed

* fix: seeding

* update package

* chore: forcegraph seed

* bottombar

* if isEdit delete icon

* showCreate X button

* .

* options

* chore: implement topic from public global group

* chore: update learning state

* fix: change implementation for outside click

* chore: implement new form param

* chore: update env example

* feat: link form refs exception

* new page button layout, link topic search fixed

* chore: enable topic

* chore: update seed

* profile

* chore: move framer motion package from root to web and add nuqs

* chore: add LearningStateValue

* chore: implement active state

* profile

* chore: use fancy switch and update const

* feat: filter implementation

* dropdown menu

* .

* sidebar topics

* topic selected color

* feat: topic detail

* fix: collapsible page

* pages - sorted by, layout, visible mode

* .

* .

* .

* topic status sidebar

* topic button and count

* fix: topic

* page delete/topic buttons

* search ui

* selected topic for page

* selected topic status sidebar

* removed footer

* update package

* .

---------

Co-authored-by: Nikita <github@nikiv.dev>
Co-authored-by: marshennikovaolga <marshennikova@gmail.com>
Co-authored-by: Kisuyo <ig.intr3st@gmail.com>
This commit is contained in:
Aslam
2024-08-26 19:35:00 +07:00
committed by GitHub
parent 7cbfcc705b
commit 2d270706a5
77 changed files with 3002 additions and 1327 deletions

View File

@@ -10,9 +10,9 @@ interface ProfileTopicsProps {
const ProfileTopics: React.FC<ProfileTopicsProps> = ({ topic }) => {
return (
<div className="flex cursor-pointer flex-row items-center justify-between rounded-lg bg-[#121212] p-3">
<div className="bg-result flex cursor-pointer flex-row items-center justify-between rounded-lg p-3">
<p>{topic}</p>
<IoChevronForward className="text-white" size={20} />
<IoChevronForward className="text-black/50 dark:text-white" size={20} />
</div>
)
}
@@ -30,22 +30,24 @@ interface ProfileTitleProps {
const ProfileTitle: React.FC<ProfileTitleProps> = ({ topicTitle, spanNumber }) => {
return (
<p className="pb-3 pl-2 text-base font-light text-white/50">
{topicTitle} <span className="text-white">{spanNumber}</span>
<p className="pb-3 pl-2 text-base font-light text-black/50 dark:text-white/50">
{topicTitle} <span className="text-black dark:text-white">{spanNumber}</span>
</p>
)
}
const ProfileLinks: React.FC<ProfileLinksProps> = ({ linklabel, link, topic }) => {
return (
<div className="flex flex-row items-center justify-between rounded-lg bg-[#121212] p-3 text-white">
<div className="bg-result flex flex-row items-center justify-between rounded-lg p-3 text-black dark:text-white">
<div className="flex flex-row items-center space-x-3">
<p className="text-base text-white">{linklabel}</p>
<p className="text-base">{linklabel}</p>
<div className="flex cursor-pointer flex-row items-center gap-1">
<p className="text-md text-white/10 transition-colors duration-300 hover:text-white/30">{link}</p>
<p className="text-md opacity-50 transition-colors duration-300 hover:opacity-30">{link}</p>
</div>
</div>
<div className="cursor-default rounded-lg bg-[#1a1a1a] p-2 text-white/60">{topic}</div>
<div className="cursor-default rounded-lg bg-[#888888] p-2 text-white dark:bg-[#1a1a1a] dark:text-opacity-50">
{topic}
</div>
</div>
)
}
@@ -84,25 +86,33 @@ export const SearchWrapper = () => {
return (
<div className="flex h-full flex-auto flex-col overflow-hidden">
<div className="flex h-full w-full justify-center overflow-hidden">
<div className="w-full max-w-3xl px-4 sm:px-6 lg:px-8">
<div className="w-full max-w-[70%] sm:px-6 lg:px-8">
<div className="relative mb-2 mt-5 flex w-full flex-row items-center transition-colors duration-300 hover:text-white/60">
<IoSearch className="absolute left-3 text-white/30" size={20} />
<IoSearch className="absolute left-3 text-black/30 dark:text-white/30" size={20} />
<input
type="text"
autoFocus
value={searchText}
onChange={inputChange}
onKeyDown={handleKeyDown}
className="w-full rounded-[10px] bg-[#16181d] p-10 py-3 pl-10 pr-3 font-semibold tracking-wider text-white outline-none placeholder:font-light placeholder:text-white/30"
className="bg-input w-full rounded-[10px] p-10 py-3 pl-10 pr-3 font-semibold tracking-wider text-black/70 outline-none placeholder:font-light dark:text-white"
placeholder="Search..."
/>
{showAiPlaceholder && searchText && !showAiSearch && (
<div className="absolute right-10 text-sm text-white/30">press &quot;Enter&quot; for AI search</div>
<div className="absolute right-10 text-sm text-black/70 dark:text-white/30">
press &quot;Enter&quot; for AI search
</div>
)}
{searchText && (
<IoCloseOutline className="absolute right-3 cursor-pointer opacity-30" size={20} onClick={clearSearch} />
<IoCloseOutline
className="absolute right-3 cursor-pointer text-black/70 dark:text-white/30"
size={20}
onClick={clearSearch}
/>
)}
</div>
<div className="my-5 rounded-lg bg-blue-600 p-4 font-semibold text-white"> Ask AI</div>
{showAiSearch ? (
<div className="relative w-full">
<div className="absolute left-1/2 w-[110%] -translate-x-1/2">
@@ -115,7 +125,6 @@ export const SearchWrapper = () => {
<ProfileTitle topicTitle="Topics" spanNumber={1} />
<ProfileTopics topic="Figma" />
</div>
<div className="my-5 space-y-1">
<ProfileTitle topicTitle="Links" spanNumber={3} />
<ProfileLinks linklabel="Figma" link="https://figma.com" topic="Figma" />