Skip to content

Commit f41c08f

Browse files
authored
Revert "Revert "kapa ai 🤖""
1 parent 8d2de74 commit f41c08f

File tree

6 files changed

+134
-53
lines changed

6 files changed

+134
-53
lines changed

‎assets/css/code.css‎

Lines changed: 69 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,80 @@
11
@layer components {
2-
.highlight,
3-
:not(pre) > code {
4-
font-size: 0.875em;
5-
border: 1px solid;
6-
border-radius: theme("spacing.1");
7-
background: theme("colors.white");
8-
border-color: theme("colors.gray.light.300");
9-
.dark & {
10-
background: theme("colors.gray.dark.200");
11-
border-color: theme("colors.gray.dark.300");
2+
.prose {
3+
.highlight,
4+
:not(pre) > code {
5+
font-size: 0.875em;
6+
border: 1px solid;
7+
border-radius: theme("spacing.1");
8+
background: theme("colors.white");
9+
border-color: theme("colors.gray.light.300");
10+
.dark & {
11+
background: theme("colors.gray.dark.200");
12+
border-color: theme("colors.gray.dark.300");
13+
}
1214
}
13-
}
1415

15-
:not(pre) > code {
16-
background: theme("colors.gray.light.200");
17-
display: inline-block;
18-
margin: 0;
19-
font-weight: 400;
20-
overflow-wrap: anywhere;
21-
padding: 0 4px;
22-
table & {
23-
overflow-wrap: unset;
16+
:not(pre) > code {
17+
background: theme("colors.gray.light.200");
18+
display: inline-block;
19+
margin: 0;
20+
font-weight: 400;
21+
overflow-wrap: anywhere;
22+
padding: 0 4px;
23+
table & {
24+
overflow-wrap: unset;
25+
}
2426
}
25-
}
2627

27-
/* Indented code blocks */
28-
:not(.highlight) > pre {
29-
@apply my-4 overflow-x-auto p-3;
30-
font-size: 0.875em;
31-
border: 1px solid;
32-
border-radius: theme("spacing.1");
33-
background: theme("colors.white");
34-
border-color: theme("colors.gray.light.300");
35-
.dark & {
36-
background: theme("colors.gray.dark.200");
37-
border-color: theme("colors.gray.dark.300");
28+
/* Indented code blocks */
29+
:not(.highlight) > pre {
30+
@apply my-4 overflow-x-auto p-3;
31+
font-size: 0.875em;
32+
border: 1px solid;
33+
border-radius: theme("spacing.1");
34+
background: theme("colors.white");
35+
border-color: theme("colors.gray.light.300");
36+
.dark & {
37+
background: theme("colors.gray.dark.200");
38+
border-color: theme("colors.gray.dark.300");
39+
}
3840
}
39-
}
4041

41-
.highlight {
42-
@apply my-4 overflow-x-auto p-3;
42+
.highlight {
43+
@apply my-4 overflow-x-auto p-3;
4344

44-
/* LineTableTD */
45-
.lntd {
46-
vertical-align: top;
47-
padding: 0;
48-
margin: 0;
49-
border: 0;
50-
}
51-
/* LineTable */
52-
.lntable {
53-
display: table;
54-
width: 100%;
55-
border-spacing: 0;
56-
padding: 0;
57-
margin: 0;
58-
border: 0;
59-
/* LineNumberColumnHighlight */
60-
.lntd:first-child .hl {
61-
display: block;
45+
/* LineTableTD */
46+
.lntd {
47+
vertical-align: top;
48+
padding: 0;
49+
margin: 0;
50+
white-space: nowrap;
51+
font-weight: 400;
52+
padding: 0 4px;
53+
}
54+
55+
.highlight {
56+
@apply my-4 overflow-x-auto p-3;
57+
58+
/* LineTableTD */
59+
.lntd {
60+
vertical-align: top;
61+
padding: 0;
62+
margin: 0;
63+
border: 0;
64+
}
65+
/* LineTable */
66+
.lntable {
67+
display: table;
68+
width: 100%;
69+
border-spacing: 0;
70+
padding: 0;
71+
margin: 0;
72+
border: 0;
73+
/* LineNumberColumnHighlight */
74+
.lntd:first-child .hl {
75+
display: block;
76+
}
77+
}
6278
}
6379
}
6480
}

‎assets/css/kapa.css‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.mantine-Modal-root {
2+
ol {
3+
list-style-type: decimal;
4+
}
5+
6+
.mantine-List-root {
7+
min-width: 100%;
8+
}
9+
10+
.mantine-List-itemWrapper {
11+
max-width: 100%;
12+
}
13+
14+
.mantine-Prism-copy {
15+
background-color: rgb(20, 21, 23)
16+
}
17+
}

‎assets/css/styles.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@import "/assets/css/code";
1111
@import "/assets/css/toc";
1212
@import "/assets/css/callouts";
13+
@import "/assets/css/kapa";
1314

1415
@import "tailwindcss/utilities";
1516
@import "/assets/css/syntax-light";

‎hugo.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ languages:
8080
languageName: English
8181

8282
params:
83+
kapa:
84+
id: ba5c2cbc-6535-4334-a72e-050f7a681c8a
8385
analytics:
8486
hotjar:
8587
prod: 3169877

‎layouts/partials/head.html‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,32 @@
3636
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
3737
</script>
3838
{{ end }}
39+
{{ if hugo.IsProduction }}
40+
{{/* kapa.ai widget */}}
41+
<script>
42+
document.addEventListener("DOMContentLoaded", function () {
43+
var script = document.createElement('script');
44+
script.src = 'https://widget.kapa.ai/kapa-widget.bundle.js';
45+
script.setAttribute('data-website-id', '{{ site.Params.kapa.id }}');
46+
script.setAttribute('data-project-name', 'Docker');
47+
script.setAttribute('data-button-image-height', '29px');
48+
script.setAttribute('data-button-image-width', '40px');
49+
script.setAttribute('data-modal-image-height', '29px');
50+
script.setAttribute('data-modal-image-width', '40px');
51+
script.setAttribute('data-modal-title-color', '#fff');
52+
script.setAttribute('data-project-color', '#086dd7');
53+
script.setAttribute('data-modal-header-bg-color', '#086dd7');
54+
script.setAttribute('data-project-logo', '/assets/images/logo-icon-white.svg');
55+
script.setAttribute('data-font-family', 'Roboto Flex,sans-serif');
56+
script.setAttribute('data-modal-disclaimer', 'This is a custom LLM for answering questions about Docker. Answers are based on the contents of the documentation. This feature is experimental - rate the answers to let us know what you think!');
57+
script.setAttribute('data-modal-disclaimer-bg-color', '#e5f2fc');
58+
script.setAttribute('data-modal-disclaimer-text-color', '#086dd7');
59+
script.setAttribute('data-modal-example-questions','What is a volume?,How do I build multi-platform images?,Can I configure Docker to use a proxy?,What does a Docker subscription include?');
60+
script.async = true;
61+
document.body.appendChild(script);
62+
});
63+
</script>
64+
{{ end }}
3965
{{/* preload Roboto Flex as it's a critical font: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preload */}}
4066
<link href="/assets/fonts/RobotoFlex.woff2" rel="preload" as="font" type="font/woff2" crossorigin />
4167
{{ partialCached "utils/css.html" "-" }}
Lines changed: 19 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)