Skip to content

Commit 592835e

Browse files
committed
Create configOption component
1 parent aca9212 commit 592835e

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.config-option {
2+
padding: 2rem 0;
3+
}
4+
5+
.config-option + .config-option {
6+
box-shadow: inset 0 1px var(--colorBlack200);
7+
}
8+
9+
.config-option .config-option-name code {
10+
font-weight: 600;
11+
}
12+
13+
.config-option-type {
14+
color: var(--colorBlack600);
15+
padding-left: 1rem;
16+
}
17+
18+
.config-option-description,
19+
.config-option-default,
20+
.config-option-example {
21+
padding: 1rem 0.4em;
22+
}
23+
24+
.config-option-example code,
25+
.config-option-default code {
26+
margin-left: 0.4em;
27+
}
28+
29+
.config-option-example,
30+
.config-option-default {
31+
font-size: 0.9em;
32+
}

themes/opentermsarchive/assets/css/loader.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@
3535
@import "themes/opentermsarchive/assets/css/components/divider/divider.css";
3636
@import "themes/opentermsarchive/assets/css/components/textContent/textContent.css";
3737
@import "themes/opentermsarchive/assets/css/components/aside/aside.css";
38+
@import "themes/opentermsarchive/assets/css/components/configOption/configOption.css";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="config-option">
2+
<div class="config-option-name"><code>{{ .Get "name" }}</code><span class="config-option-type">{{ .Get "type" }}</span></div>
3+
<div class="config-option-description">{{ .Get "description" | markdownify }}</div>
4+
{{ if .Get "default" }}
5+
<div class="config-option-default"><span>Default:</span><code>{{ .Get "default" }}</code></div>
6+
{{ end }}
7+
{{ if .Get "example" }}
8+
<div class="config-option-example"><span>Example:</span><code>{{ .Get "example" }}</code></div>
9+
{{ end }}
10+
</div>

0 commit comments

Comments
 (0)