Skip to content

Commit 6a940f3

Browse files
authored
1 parent 28e68f6 commit 6a940f3

File tree

4 files changed

+77
-54
lines changed

4 files changed

+77
-54
lines changed

.vscode/docker.code-snippets

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@
3939
],
4040
"description": "Insert a Hugo tabs block with two tabs and snippet stops for names and content",
4141
},
42+
"Insert Hugo code block (no title)": {
43+
"prefix": ["codeblock", "block"],
44+
"body": ["```${1:json}", "$2", "```", ""],
45+
"description": "Insert a Hugo code block with an optional title",
46+
},
47+
"Insert Hugo code block (with title)": {
48+
"prefix": ["codeblock", "codettl", "block"],
49+
"body": ["```${1:json} {title=\"$2\"}", "$3", "```", ""],
50+
"description": "Insert a Hugo code block with an optional title",
51+
},
4252
"Insert a Button": {
4353
"prefix": ["button"],
4454
"body": ["{{< button url=\"$1\" text=\"$2\" >}}"],

assets/css/utilities.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,8 @@
144144
font-size: 0.875em;
145145
border: 1px solid;
146146
border-radius: 0.25rem; /* theme("spacing.1") fallback */
147-
background: var(--color-white-main);
148-
border-color: var(--color-gray-300);
149-
.dark & {
150-
background: var(--color-gray-200);
151-
border-color: var(--color-gray-400);
152-
}
147+
border: none;
148+
background: transparent;
153149
&::before,
154150
&::after {
155151
content: none !important;
@@ -185,7 +181,7 @@
185181
}
186182

187183
.highlight {
188-
@apply my-4 overflow-x-auto p-3;
184+
@apply my-0 overflow-x-auto p-2;
189185

190186
/* LineTableTD */
191187
.lntd {

hugo_stats.json

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"-mr-8",
99
"-mt-0.5",
1010
"-mt-8",
11+
"-top-10",
1112
"-top-16",
1213
"-v",
1314
"-z-10",
@@ -116,7 +117,6 @@
116117
"Using-the-GUI",
117118
"Using-the-MCP-Toolkit-Recommended",
118119
"VS-Code",
119-
"Via-Docker-Desktop-Recommended",
120120
"Vue",
121121
"WSL-2-backend-Arm-Early-Access",
122122
"WSL-2-backend-x86_64",
@@ -155,9 +155,7 @@
155155
"bg-blue-500",
156156
"bg-gradient-to-br",
157157
"bg-gradient-to-r",
158-
"bg-gray-00",
159158
"bg-gray-100",
160-
"bg-gray-200",
161159
"bg-gray-400",
162160
"bg-gray-50",
163161
"bg-gray-700",
@@ -190,6 +188,7 @@
190188
"border-white",
191189
"bottom-0",
192190
"build-push-action",
191+
"button",
193192
"card",
194193
"card-content",
195194
"card-description",
@@ -198,32 +197,29 @@
198197
"card-img",
199198
"card-link",
200199
"card-title",
200+
"chip",
201201
"chroma",
202202
"cls-1",
203203
"cls-2",
204204
"col-start-2",
205205
"containerd-image-store",
206206
"cursor-pointer",
207-
"dark:bg-amber-300",
207+
"dark:bg-amber-400",
208208
"dark:bg-background-dark",
209209
"dark:bg-background-toc",
210210
"dark:bg-blue",
211-
"dark:bg-blue-300",
212211
"dark:bg-blue-400",
213212
"dark:bg-blue-500",
214213
"dark:bg-blue-800",
215214
"dark:bg-gray-300",
216-
"dark:bg-gray-400",
217215
"dark:bg-gray-500",
218216
"dark:bg-gray-800",
219217
"dark:bg-gray-900",
220218
"dark:bg-gray-950",
221-
"dark:bg-green-300",
222219
"dark:bg-green-700",
223220
"dark:bg-green-dark-400",
224221
"dark:bg-navbar-bg-dark",
225-
"dark:bg-red-300",
226-
"dark:bg-violet-300",
222+
"dark:bg-red-400",
227223
"dark:bg-violet-400",
228224
"dark:block",
229225
"dark:border-b-blue-600",
@@ -242,10 +238,11 @@
242238
"dark:hover:bg-blue-400",
243239
"dark:hover:bg-blue-500",
244240
"dark:hover:bg-blue-700",
245-
"dark:hover:bg-gray-500",
241+
"dark:hover:bg-gray-600",
246242
"dark:hover:bg-gray-800",
247243
"dark:hover:bg-gray-900",
248244
"dark:hover:text-blue",
245+
"dark:outline-gray-800",
249246
"dark:prose-invert",
250247
"dark:ring-3-blue-dark-400",
251248
"dark:ring-3-gray-dark-400",
@@ -259,7 +256,6 @@
259256
"dark:text-gray-300",
260257
"dark:text-gray-400",
261258
"dark:text-gray-500",
262-
"dark:text-gray-900",
263259
"dark:text-magenta-dark",
264260
"dark:text-white",
265261
"dark:to-blue-400",
@@ -284,6 +280,7 @@
284280
"focus:ring-3-blue-light",
285281
"font-bold",
286282
"font-medium",
283+
"font-normal",
287284
"font-semibold",
288285
"footnote-backref",
289286
"footnote-ref",
@@ -295,6 +292,7 @@
295292
"gap-10",
296293
"gap-12",
297294
"gap-2",
295+
"gap-2.5",
298296
"gap-20",
299297
"gap-3",
300298
"gap-4",
@@ -331,7 +329,6 @@
331329
"hover:border-white/20",
332330
"hover:dark:bg-blue-500",
333331
"hover:dark:bg-gray-300",
334-
"hover:dark:bg-gray-700",
335332
"hover:dark:bg-gray-800",
336333
"hover:dark:text-blue-400",
337334
"hover:dark:text-blue-700",
@@ -375,7 +372,6 @@
375372
"lntable",
376373
"lntd",
377374
"m-2",
378-
"m-4",
379375
"macOS",
380376
"max-h-full",
381377
"max-w-4xl",
@@ -386,8 +382,8 @@
386382
"max-w-none",
387383
"max-w-xl",
388384
"mb-1",
385+
"mb-1.5",
389386
"mb-2",
390-
"mb-3",
391387
"mb-4",
392388
"mb-6",
393389
"mb-8",
@@ -406,6 +402,7 @@
406402
"md:text-sm",
407403
"md:top-16",
408404
"md:w-[300px]",
405+
"md:w-[320px]",
409406
"md:z-auto",
410407
"min-h-screen",
411408
"min-w-0",
@@ -416,6 +413,7 @@
416413
"ml-4",
417414
"ml-auto",
418415
"mt-1",
416+
"mt-1.5",
419417
"mt-2",
420418
"mt-20",
421419
"mt-4",
@@ -425,7 +423,10 @@
425423
"my-0",
426424
"my-4",
427425
"my-6",
426+
"navbar-entry-background-current",
427+
"navbar-entry-margin",
428428
"navbar-font",
429+
"navbar-group",
429430
"navbar-group-font-title",
430431
"no-underline",
431432
"no-wrap",
@@ -436,14 +437,19 @@
436437
"origin-bottom-right",
437438
"origin-top-right",
438439
"ot-sdk-show-settings",
440+
"outline",
441+
"outline-1",
442+
"outline-gray-200",
439443
"outline-hidden",
444+
"outline-offset-[-1px]",
440445
"overflow-clip",
441446
"overflow-hidden",
442447
"overflow-x-auto",
443448
"overflow-x-hidden",
444449
"overflow-y-auto",
445450
"p-1",
446451
"p-2",
452+
"p-3",
447453
"p-4",
448454
"p-6",
449455
"p-8",
@@ -467,28 +473,28 @@
467473
"pt-10",
468474
"pt-2",
469475
"pt-4",
470-
"pt-5",
471476
"px-1",
472477
"px-2",
473478
"px-4",
474479
"px-6",
480+
"py-0.5",
475481
"py-1",
476482
"py-2",
477483
"py-20",
478484
"py-4",
479485
"py-8",
480486
"relative",
481487
"right-0",
482-
"right-3",
488+
"right-2",
483489
"right-8",
484490
"ring-3-2",
485491
"ring-3-[1.5px]",
486492
"ring-3-blue-light-400",
487493
"ring-3-gray-light-200",
488494
"rotate-45",
495+
"rounded",
489496
"rounded-full",
490497
"rounded-sm",
491-
"rounded-sm-b-lg",
492498
"scale-50",
493499
"scale-75",
494500
"scroll-mt-2",
@@ -526,11 +532,11 @@
526532
"text-blue-light",
527533
"text-divider-light",
528534
"text-gray",
529-
"text-gray-100",
530535
"text-gray-200",
536+
"text-gray-300",
531537
"text-gray-400",
538+
"text-gray-500",
532539
"text-gray-600",
533-
"text-gray-800",
534540
"text-left",
535541
"text-lg",
536542
"text-magenta-light",
@@ -543,8 +549,8 @@
543549
"to-blue-500",
544550
"toc",
545551
"top-0",
552+
"top-1",
546553
"top-16",
547-
"top-3",
548554
"top-6",
549555
"top-full",
550556
"transition",

layouts/_default/_markup/render-codeblock.html

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,47 @@
1-
<div data-pagefind-ignore class="scroll-mt-2" x-data x-ref="root">
1+
<div
2+
data-pagefind-ignore
3+
x-data
4+
x-ref="root"
5+
class="group mt-2 mb-4 flex w-full scroll-mt-2 flex-col items-start gap-4 rounded bg-gray-50 p-2 outline outline-1 outline-offset-[-1px] outline-gray-200 dark:bg-gray-900 dark:outline-gray-800"
6+
>
27
{{ with .Attributes.title }}
3-
<div
4-
class="mb-0 rounded-sm bg-gray-100 p-2 text-sm text-gray-900 dark:bg-gray-900 dark:text-gray-200"
5-
>
6-
{{ . }}
8+
<div class="flex w-full items-center gap-2">
9+
<div
10+
class="flex items-center gap-2.5 rounded bg-gray-100 px-2 py-0.5 dark:bg-gray-800"
11+
>
12+
<div class="font-normal text-gray-500 dark:text-gray-200">
13+
{{ . }}
14+
</div>
15+
</div>
716
</div>
817
{{ end }}
9-
<div class="group relative">
10-
<!-- copy button -->
11-
<button
12-
x-data="{ code: '{{ encoding.Base64Encode .Inner }}', copying: false }"
13-
class="absolute top-3 right-3 z-10 text-gray-200 dark:text-gray-500"
14-
title="copy"
15-
@click="window.navigator.clipboard.writeText(atob(code).replaceAll(/^[\$>]\s+/gm, ''));
16-
copying = true;
17-
setTimeout(() => copying = false, 2000);"
18-
>
19-
<span :class="{ 'group-hover:block' : !copying }" class="icon-svg hidden"
20-
>{{ partialCached "icon" "content_copy" "content_copy" }}</span
21-
>
22-
<span :class="{ 'group-hover:block' : copying }" class="icon-svg hidden"
23-
>{{ partialCached "icon" "check_circle" "check_circle" }}</span
24-
>
25-
</button>
18+
<div class="relative w-full">
2619
{{ $lang := .Type | default "text" }}
2720
{{ $result := transform.Highlight .Inner
2821
$lang .Options
2922
}}
30-
<div class="syntax-light dark:syntax-dark not-prose">
23+
<div class="syntax-light dark:syntax-dark not-prose w-full">
24+
<button
25+
x-data="{ code: '{{ encoding.Base64Encode .Inner }}', copying: false }"
26+
class="{{ if .Attributes.title }}
27+
-top-10
28+
{{ else }}
29+
top-1
30+
{{ end }} absolute right-2 z-10 text-gray-300 dark:text-gray-500"
31+
title="copy"
32+
@click="window.navigator.clipboard.writeText(atob(code).replaceAll(/^[\$>]\s+/gm, ''));
33+
copying = true;
34+
setTimeout(() => copying = false, 2000);"
35+
>
36+
<span
37+
:class="{ 'group-hover:block' : !copying }"
38+
class="icon-svg hidden"
39+
>{{ partialCached "icon" "content_copy" "content_copy" }}</span
40+
>
41+
<span :class="{ 'group-hover:block' : copying }" class="icon-svg hidden"
42+
>{{ partialCached "icon" "check_circle" "check_circle" }}</span
43+
>
44+
</button>
3145
{{ with .Attributes.collapse }}
3246
<div
3347
x-data="{ collapse: true }"
@@ -38,10 +52,7 @@
3852
x-show="collapse"
3953
class="absolute z-10 flex h-32 w-full flex-col-reverse items-center overflow-clip pb-4"
4054
>
41-
<button
42-
@click="collapse = false"
43-
class="bg-blue flex items-center rounded-full px-2 text-sm text-white dark:bg-blue-500"
44-
>
55+
<button @click="collapse = false" class="chip">
4556
<span>Show more</span>
4657
<span class="icon-svg"
4758
>{{ partialCached "icon" "arrow_drop_down" "arrow_drop_down" }}</span

0 commit comments

Comments
 (0)