Skip to content

Commit 17ef8a6

Browse files
authored
ux: touch up tabs (#22774)
Reduce magins, add hover effect, add light background ![Frame 31](https://github.com/user-attachments/assets/1b028adf-3baf-4588-9161-329b272ffb8e)
1 parent e9e78a3 commit 17ef8a6

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

.vscode/docker.code-snippets

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
"prefix": ["admonition", "tabs"],
2424
"body": [
2525
"",
26-
"{{< tabs >}}",
27-
"{{< tab name=\"$1\">}}",
26+
"{{< tabs group=\"$1\" >}}",
27+
"{{< tab name=\"$2\">}}",
2828
"",
29-
"$2",
29+
"$3",
3030
"",
3131
"{{< /tab >}}",
32-
"{{< tab name=\"$3\">}}",
32+
"{{< tab name=\"$4\">}}",
3333
"",
34-
"$4",
34+
"$5",
3535
"",
3636
"{{< /tab >}}",
3737
"{{</tabs >}}",

assets/css/components.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,15 @@
101101
.summary-bar {
102102
@apply my-1 mt-4 flex flex-col rounded-sm border-1 border-gray-100 bg-gray-50 p-4 dark:border-gray-800 dark:bg-gray-900;
103103
}
104+
105+
.tabs {
106+
@apply bg-blue/2 rounded-sm p-2;
107+
}
108+
.tablist {
109+
@apply mb-1 border-b border-gray-100 dark:border-gray-800;
110+
}
111+
112+
.tab-item {
113+
@apply inline-block rounded-sm px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-900;
114+
@apply dark:text-gray-200;
115+
}

content/manuals/ai/model-runner/_index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ You can now use the `docker model` command in the CLI and view and interact with
8282

8383
Models are cached locally.
8484

85-
{{< tabs >}}
85+
{{< tabs group="release" >}}
8686
{{< tab name="From Docker Desktop">}}
8787

8888
1. Select **Models** and select the **Docker Hub** tab.
@@ -98,14 +98,14 @@ Use the [`docker model pull` command](/reference/cli/docker/).
9898

9999
## Run a model
100100

101-
{{< tabs >}}
101+
{{< tabs group="release" >}}
102102
{{< tab name="From Docker Desktop">}}
103103

104104
Select **Models** and select the **Local** tab and click the play button.
105105
The interactive chat screen opens.
106106

107107
{{< /tab >}}
108-
{{< tab name="From the Docker CLI">}}
108+
{{< tab name="From the Docker CLI" >}}
109109

110110
Use the [`docker model run` command](/reference/cli/docker/).
111111

@@ -116,7 +116,7 @@ Use the [`docker model run` command](/reference/cli/docker/).
116116

117117
To troubleshoot potential issues, display the logs:
118118

119-
{{< tabs >}}
119+
{{< tabs group="release" >}}
120120
{{< tab name="From Docker Desktop">}}
121121

122122
Select **Models** and select the **Logs** tab.

layouts/shortcodes/tabs.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77

88
<div
9+
class="tabs"
910
{{ with $group }}
1011
{{ if $persist }}
1112
x-data="{ selected: $persist('{{ $first }}').as('{{ $groupID }}') }"
@@ -19,10 +20,10 @@
1920
{{ end }}
2021
aria-role="tabpanel"
2122
>
22-
<div aria-role="tablist" class="space-x-2">
23+
<div aria-role="tablist" class="tablist">
2324
{{ range (.Store.Get "tabs") }}
2425
<button
25-
class="p-1"
26+
class="tab-item"
2627
:class="selected === '{{ .name | urlize }}' &&
2728
'border-blue border-b-4 dark:border-b-blue-600'"
2829
{{ if $group }}
@@ -36,7 +37,6 @@
3637
</button>
3738
{{ end }}
3839
</div>
39-
<hr class="!mt-0" />
4040
<div>
4141
{{ range (.Store.Get "tabs") }}
4242
<div
@@ -47,5 +47,4 @@
4747
</div>
4848
{{ end }}
4949
</div>
50-
<hr />
5150
</div>

0 commit comments

Comments
 (0)