Skip to content

Commit eb7faf5

Browse files
committed
feat(search): add current version display
1 parent 0760b49 commit eb7faf5

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

assets/scss/components/_search.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@
5252
}
5353
}
5454

55-
&-version {}
55+
&-keyboard {
56+
color: var(--color-text);
57+
58+
code {
59+
margin-left: .5rem;
60+
background: var(--bg-inset);
61+
padding: .25em .5em;
62+
}
63+
}
5664

5765
&-icon {
5866
flex: none;

i18n/en.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,7 @@ other = "Table of contents toogle"
5959
other = "A list of all hosted documents for all available versions"
6060

6161
[to_close]
62-
other = "to close"
62+
other = "to close"
63+
64+
[current_version]
65+
other = "Current version"

i18n/es.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,7 @@ other = "Mostrar/Ocultar tabla de contenidos"
5959
other = "Una lista de todos los documentos alojados para todas las versiones disponibles"
6060

6161
[to_close]
62-
other = "para cerrar"
62+
other = "para cerrar"
63+
64+
[current_version]
65+
other = "Versión actual"

layouts/partials/search.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
<div class="search-results">
1111
<div class="search-list" id="search-results"></div>
1212
</div>
13-
<div class="search-footer flex items-center">
13+
<div class="search-footer flex items-center justify-between">
1414
<span class="search-keyboard">
1515
<kbd>ESC</kbd>
1616
{{ i18n "to_close" }}
1717
</span>
18+
{{- with .Section -}}
19+
<span class="search-keyboard">{{ i18n "current_version" }} <code>{{ . }}</code></span>
20+
{{- end -}}
1821
</div>
1922
</div>
2023
</div>

0 commit comments

Comments
 (0)