|
1 | 1 | {{ define "head" }}
|
| 2 | + <script src='{{ relURL "js/cli.js" }}' defer></script> |
2 | 3 | <script src='{{ relURL "js/codetabs.js" }}' defer></script>
|
3 | 4 | {{ end }}
|
4 | 5 |
|
5 | 6 | {{ define "main" }}
|
6 | 7 | <main class="docs w-full max-w-[1920px] mx-auto px-5 flex flex-col md:flex-row overflow-hidden">
|
7 | 8 | {{ partial "docs-nav.html" . }}
|
8 |
| - <div class="py-12 md:pl-4 xl:px-16 overflow-hidden"> |
| 9 | + <div class="w-full py-12 md:pl-4 xl:px-16 overflow-hidden"> |
9 | 10 | {{ partial "breadcrumbs" . }}
|
10 | 11 | <section class="prose w-full py-12 max-w-none">
|
11 | 12 | <h1>
|
|
34 | 35 | {{ end }}
|
35 | 36 | {{ end }}
|
36 | 37 |
|
| 38 | + <!-- Responsive CLI Display Block as Table --> |
| 39 | + <div class="overflow-x-auto"> |
| 40 | + <table class="w-full border-collapse md:table"> |
| 41 | + <thead> |
| 42 | + <tr> |
| 43 | + <th class="p-4 text-left">Try these Redis commands</th> |
| 44 | + <th class="p-4 text-left hidden md:table-cell">Redis CLI</th> |
| 45 | + </tr> |
| 46 | + </thead> |
| 47 | + <tbody> |
| 48 | + <tr class="flex flex-col md:table-row"> |
| 49 | + <td class="align-top p-4 w-full md:w-[40%] text-base font-mono"> |
| 50 | + <code><a href="/commands/ping">PING</a></code></br> |
| 51 | + <code><a href="/commands/hset">HSET</a> user:1 name antirez vocation artist</code></br> |
| 52 | + <code><a href="/commands/hgetall">HGETALL</a> user:1</code></br> |
| 53 | + <code><a href="/commands/set">SET</a> e 2.71</code></br> |
| 54 | + <code><a href="/commands/incrbyfloat">INCRBYFLOAT</a> e 0.43</code></br> |
| 55 | + <code><a href="/commands/rename">RENAME</a> e pi</code></br> |
| 56 | + <code><a href="/commands/get">GET</a> pi</code> |
| 57 | + </td> |
| 58 | + <td class="align-top p-4 w-full md:w-[60%]"> |
| 59 | + <div class="bg-slate-900 rounded-xl shadow-lg shadow-slate-900/10 h-60 overflow-y-auto"> |
| 60 | + <div class="border-b border-slate-700 rounded-t-xl px-4 py-3 w-full flex"> |
| 61 | + {{ partial "icons/cli-circle" (dict "class" "shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50") }} |
| 62 | + {{ partial "icons/cli-triangle" (dict "class" "shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50") }} |
| 63 | + {{ partial "icons/cli-star" (dict "class" "shrink-0 h-[1.0625rem] w-[1.0625rem] fill-slate-50") }} |
| 64 | + </div> |
| 65 | + <form class="redis-cli" typewriter> |
| 66 | + <pre tabindex="0" class="whitespace-pre"> |
| 67 | +PING |
| 68 | + </pre> |
| 69 | + </form> |
| 70 | + </div> |
| 71 | + </td> |
| 72 | + </tr> |
| 73 | + </tbody> |
| 74 | + </table> |
| 75 | + </div> |
| 76 | + |
37 | 77 | {{ .Content }}
|
38 | 78 | {{ if not .Params.hideListLinks }}
|
39 | 79 | <nav>
|
|
0 commit comments