Skip to content

Commit

Permalink
Fix CSS bug in search, update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sergi0g committed Oct 11, 2024
1 parent ea3738c commit d70cfb2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cup"
version = "2.3.1"
version = "2.4.0"
edition = "2021"

[dependencies]
Expand Down
5 changes: 3 additions & 2 deletions docs/pages/docs/configuration.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Steps, Callout, Card, Cards } from "nextra-theme-docs";
import { IconPaint, IconLockOpen, IconKey } from '@tabler/icons-react';
import { IconPaint, IconLockOpen, IconKey, IconPlug } from '@tabler/icons-react';

# Configuration

Expand All @@ -13,7 +13,8 @@ For example, if using Podman, you might do
$ cup -s /run/user/1000/podman/podman.sock check
```

This option will hopefully be moved to the configuration file soon.
This option is also available in the configuration file and it's best to put it there.
<Card icon={<IconPlug />} title="Custom Docker socket" href="/docs/configuration/socket" />

## Configuration file

Expand Down
10 changes: 10 additions & 0 deletions docs/pages/docs/configuration/socket.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Socket

If you need to specify a custom Docker socket (e.g. because you're using Podman), you can use the `socket` option. Here's an example:

```json
{
"socket": "/run/user/1000/podman/podman.sock"
// Other options
}
```
6 changes: 3 additions & 3 deletions web/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ export default function Search({
return (
<div className={`w-full px-6 text-${theme}-500`}>
<div
className={`flex items-center w-full rounded-md border border-${theme}-200 dark:border-${theme}-700 px-2 gap-1 bg-${theme}-800 flex-nowrap peer`}
className={`flex items-center w-full rounded-md border border-${theme}-300 dark:border-${theme}-700 px-2 gap-1 bg-${theme}-200 dark:bg-${theme}-800 flex-nowrap peer`}
>
<IconSearch className="size-5" />
<div className="w-full">
<input
className={`w-full h-10 text-sm text-${theme}-400 focus:outline-none peer bg-transparent placeholder:text-${theme}-500`}
className={`w-full h-10 text-sm text-${theme}-600 dark:text-${theme}-400 focus:outline-none peer bg-transparent placeholder:text-${theme}-500`}
placeholder="Search"
onChange={handleChange}
value={searchQuery}
></input>
</div>
{showClear && (
<button onClick={handleClear} className={`hover:text-${theme}-400`}>
<button onClick={handleClear} className={`hover:text-${theme}-600 dark:hover:text-${theme}-400`}>
<IconX className="size-5" />
</button>
)}
Expand Down
10 changes: 7 additions & 3 deletions web/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,16 @@ export default {
},
{
pattern: /bg-(gray|neutral)-800/,
variants: ["before:dark", "after:dark"],
variants: ["before:dark", "after:dark", "dark"],
},
{
pattern: /text-(gray|neutral)-400/,
pattern: /text-(gray|neutral)-600/,
variants: ["hover"]
},
{
pattern: /text-(gray|neutral)-400/,
variants: ["hover", "dark", "dark:hover"]
},
{
pattern: /text-(gray|neutral)-500/,
variants: ["dark", "placeholder"],
Expand All @@ -35,7 +39,7 @@ export default {
variants: ["dark"],
},
{
pattern: /border-(gray|neutral)-200/,
pattern: /border-(gray|neutral)-300/,
},
{
pattern: /border-(gray|neutral)-700/,
Expand Down

0 comments on commit d70cfb2

Please sign in to comment.