-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autocomplete and Filter Cycling (#27)
* Initial autocomplete rework * Fix clear prompt glitch * Add command autocomplete * Add initial filter cycling through TAB key * Add basic filter cycling functionality * Improve filter cycling and autocomplete * Add config help to autocomplete * Bump version to v2.3.0 * Improve config help output with colors * Remove editor line highlight * Update README.md gif * Add theme names to autocomplete
- Loading branch information
Showing
22 changed files
with
331 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { use, useEffect, useState } from "react" | ||
import Link from "@/components/Link" | ||
import Search from "@/components/Search" | ||
import { useSettings } from "@/context/settings" | ||
|
||
const Section = ({ section, filter, selection }) => { | ||
const alignment = section.align || "left" | ||
return ( | ||
<div className={`mb-4 align-${alignment}`}> | ||
<h2 className={`text-title font-bold mt-0 mb-3 cursor-default text-${section.color}`}> | ||
{section.title} | ||
</h2> | ||
|
||
<ul> | ||
{section.links.map((link, index) => { | ||
{ | ||
return ( | ||
<Link | ||
className="font-normal" | ||
key={index} | ||
linkData={link} | ||
filter={filter} | ||
selection={selection} | ||
/> | ||
) | ||
} | ||
})} | ||
</ul> | ||
</div> | ||
) | ||
} | ||
|
||
const List = () => { | ||
const { settings } = useSettings() | ||
const [command, setCommand] = useState("") | ||
const [selection, setSelection] = useState("") | ||
|
||
const handleCommandChange = (str) => { | ||
setCommand(str) | ||
} | ||
|
||
const handleSelectionChange = (sel) => { | ||
setSelection(sel) | ||
} | ||
|
||
return ( | ||
<div id="list"> | ||
<div className="grid grid-cols-3 gap-4 px-3 py-2 mb-5"> | ||
{settings.sections.list.map((section, index) => { | ||
return ( | ||
<Section | ||
key={index} | ||
section={section} | ||
filter={command} | ||
selection={selection} | ||
/> | ||
) | ||
})} | ||
</div> | ||
<Search commandChange={handleCommandChange} selectionChange={handleSelectionChange} /> | ||
</div> | ||
) | ||
} | ||
|
||
export default List |
Oops, something went wrong.
46cef8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
start-page – ./
start-page-excalith.vercel.app
excalith-start-page.vercel.app
start-page-git-main-excalith.vercel.app