Skip to content

Commit 583a1db

Browse files
authored
Merge branch 'main' into add-llmstxt-template
2 parents 24f7a13 + 8809bbc commit 583a1db

File tree

20 files changed

+896
-482
lines changed

20 files changed

+896
-482
lines changed

docs/syntax/admonitions.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,38 +150,53 @@ It can *span* multiple lines and supports inline formatting.
150150

151151
:::::
152152

153-
## Collapsible admonitions
153+
## Applies to information
154154

155-
:::{warning}
156-
Collapsible admonitions are deprecated. Do not use them. Use [dropdowns](./dropdowns.md) instead.
157-
:::
158-
159-
Use `:open: <bool>` to make an admonition collapsible.
155+
Admonitions support the `applies_to` property to indicate which products or versions the information applies to.
160156

161157
:::::{tab-set}
162158

163159
::::{tab-item} Output
164160

165161
:::{note}
166-
:open:
162+
:applies_to: stack: ga 9.1.0
163+
164+
This note applies to the Elastic Stack GA version 9.1.0.
165+
:::
167166

168-
Longer content can be collapsed to take less space.
167+
:::{warning}
168+
:applies_to: serverless: ga
169169

170-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
170+
This warning applies to serverless GA.
171171
:::
172172

173+
:::{tip}
174+
:applies_to: { ess:, ece: }
175+
176+
This tip applies to ECH and ECE.
177+
:::
173178

174179
::::
175180

176181
::::{tab-item} Markdown
177182

178183
```markdown
179184
:::{note}
180-
:open:
185+
:applies_to: stack: ga 9.1.0
186+
187+
This note applies to the Elastic Stack GA version 9.1.0.
188+
:::
189+
190+
:::{warning}
191+
:applies_to: serverless: ga
192+
193+
This warning applies to serverless GA.
194+
:::
181195

182-
Longer content can be collapsed to take less space.
196+
:::{tip}
197+
:applies_to: { ess:, ece: }
183198

184-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
199+
This tip applies to ECH and ECE.
185200
:::
186201
```
187202

docs/syntax/dropdowns.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,55 @@ Dropdown content
5050
::::
5151

5252
:::::
53+
54+
## With applies_to badge
55+
56+
You can add an applies_to badge to the dropdown title by specifying the `:applies_to:` option. This displays a badge indicating which deployment types, versions, or other applicability criteria the dropdown content applies to.
57+
58+
:::::{tab-set}
59+
60+
::::{tab-item} Output
61+
62+
:::{dropdown} Dropdown Title
63+
:applies_to: stack: ga 9.0
64+
Dropdown content for Stack GA 9.0
65+
:::
66+
67+
::::
68+
69+
::::{tab-item} Markdown
70+
```markdown
71+
:::{dropdown} Dropdown Title
72+
:applies_to: stack: ga 9.0
73+
Dropdown content for Stack GA 9.0
74+
:::
75+
```
76+
::::
77+
78+
:::::
79+
80+
## Multiple applies_to definitions
81+
82+
You can specify multiple `applies_to` definitions using YAML object notation with curly braces `{}`. This is useful when content applies to multiple deployment types or versions simultaneously.
83+
84+
:::::{tab-set}
85+
86+
::::{tab-item} Output
87+
88+
:::{dropdown} Dropdown Title
89+
:applies_to: { ece:, ess: }
90+
Dropdown content for ECE and ECH
91+
:::
92+
93+
::::
94+
95+
::::{tab-item} Markdown
96+
```markdown
97+
:::{dropdown} Dropdown Title
98+
:applies_to: { ece:, ess: }
99+
Dropdown content for ECE and ECH
100+
:::
101+
```
102+
::::
103+
104+
:::::

src/Elastic.Documentation.Site/Assets/markdown/admonition.css

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
.admonition {
33
@apply mt-4 rounded-sm border-1 pb-4;
44

5+
.admonition-header {
6+
@apply flex items-center gap-3 rounded-t-sm px-4 py-2 font-bold;
7+
}
8+
59
.admonition-title {
6-
@apply flex items-center gap-2 rounded-t-sm px-4 py-2 font-bold;
7-
svg {
8-
@apply size-6;
10+
@apply text-sm tracking-wider uppercase;
11+
}
12+
13+
.applies-admonition {
14+
@apply flex items-center gap-1 font-normal;
15+
.applicable-name,
16+
.applicable-meta {
17+
@apply text-xs;
18+
}
19+
.applicable-separator {
20+
mix-blend-mode: multiply;
921
}
1022
}
1123
.admonition-content {
@@ -18,39 +30,57 @@
1830

1931
&.note {
2032
@apply border-blue-elastic-40 bg-blue-elastic-10;
21-
.admonition-title {
33+
34+
.admonition-header {
2235
@apply text-blue-elastic-110 bg-blue-elastic-20;
36+
37+
.applicable-info {
38+
@apply border-blue-elastic-40;
39+
}
2340
}
2441
}
2542

2643
&.tip {
2744
@apply border-teal-40 bg-teal-10;
28-
.admonition-title {
45+
.admonition-header {
2946
@apply text-teal-110 bg-teal-20;
47+
48+
.applicable-info {
49+
@apply border-teal-40;
50+
}
3051
}
3152
}
3253

3354
&.warning {
3455
@apply border-yellow-40 bg-yellow-10;
3556

36-
.admonition-title {
57+
.admonition-header {
3758
@apply text-yellow-110 bg-yellow-20;
59+
.applicable-info {
60+
@apply border-yellow-40;
61+
}
3862
}
3963
}
4064

4165
&.important {
4266
@apply border-purple-40 bg-purple-10;
4367

44-
.admonition-title {
68+
.admonition-header {
4569
@apply text-purple-110 bg-purple-20;
70+
.applicable-info {
71+
@apply border-purple-40;
72+
}
4673
}
4774
}
4875

4976
&.plain {
5077
@apply border-grey-40 bg-grey-10;
5178

52-
.admonition-title {
79+
.admonition-header {
5380
@apply text-grey-110 bg-grey-20;
81+
.applicable-info {
82+
@apply border-grey-40;
83+
}
5484
}
5585
}
5686
}

src/Elastic.Documentation.Site/Assets/markdown/dropdown.css

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
details.dropdown {
88
@apply border-grey-20 mt-4 block rounded-sm border-1 shadow-xs;
99
summary.dropdown-title {
10-
@apply text-ink-dark flex cursor-pointer items-center justify-between px-4 py-2 font-sans font-bold;
10+
@apply text-ink-dark flex cursor-pointer items-stretch justify-between font-sans font-bold;
1111
}
1212

1313
&[open] .dropdown-title {
@@ -20,6 +20,37 @@
2020
.dropdown-content {
2121
@apply px-4 pb-4;
2222
}
23+
24+
.dropdown-title__container {
25+
@apply flex items-stretch;
26+
}
27+
28+
.dropdown-title__separator {
29+
@apply bg-grey-20 block w-[1px];
30+
}
31+
32+
.dropdown-title__icon {
33+
@apply flex items-center justify-center px-4 py-2;
34+
}
35+
36+
.dropdown-title__summary-text {
37+
@apply flex items-center px-4 py-2;
38+
}
39+
40+
.applies-dropdown {
41+
@apply flex cursor-pointer items-center gap-1 p-2 px-4 font-normal;
42+
.applicable-info {
43+
@apply cursor-pointer border-none bg-transparent p-0;
44+
&:not(:last-child):after {
45+
@apply text-sm;
46+
content: ',';
47+
}
48+
}
49+
.applicable-name,
50+
.applicable-meta {
51+
@apply text-sm;
52+
}
53+
}
2354
}
2455
}
2556
}

0 commit comments

Comments
 (0)