Skip to content

Commit 153d162

Browse files
authored
Better styling for expand shortcode (Velocidex#1234)
1 parent c2cb7fb commit 153d162

4 files changed

Lines changed: 51 additions & 10 deletions

File tree

content/rss/_index.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,48 @@ This site has a the following RSS feeds that you can follow.
1616
<i class="fas fa-newspaper"></i>
1717
Blog Posts
1818

19-
[{{< baseurl >}}blog/index.xml]({{< baseurl >}}blog/index.xml)
19+
<a href="{{< baseurl >}}blog/index.xml" class="redirected">
20+
{{< baseurl >}}blog/index.xml
21+
</a>
2022

2123
<i class="fas fa-book"></i>
2224
Built-in artifacts
2325

24-
[{{< baseurl >}}artifact_references/index.xml]({{< baseurl >}}artifact_references/index.xml)
26+
<a href="{{< baseurl >}}artifact_references/index.xml">
27+
{{< baseurl >}}artifact_references/index.xml
28+
</a>
2529

2630
<i class="fas fa-code"></i>
2731
Community Exchange Artifacts
2832

29-
[{{< baseurl >}}exchange/index.xml]({{< baseurl >}}exchange/index.xml)
33+
<a href="{{< baseurl >}}exchange/index.xml" class="redirected">
34+
{{< baseurl >}}exchange/index.xml
35+
</a>
3036

3137
<i class="fas fa-brain"></i>
3238
Knowledge Base articles
3339

34-
[{{< baseurl >}}knowledge_base/index.xml]({{< baseurl >}}knowledge_base/index.xml)
40+
<a href="{{< baseurl >}}knowledge_base/index.xml" class="redirected">
41+
{{< baseurl >}}knowledge_base/index.xml
42+
</a>
3543

3644
<i class="fas fa-play"></i>
3745
Playbooks
3846

39-
[{{< baseurl >}}training/playbooks/index.xml]({{< baseurl >}}training/playbooks/index.xml)
47+
<a href="{{< baseurl >}}training/playbooks/index.xml" class="redirected">
48+
{{< baseurl >}}training/playbooks/index.xml
49+
</a>
4050

4151
<i class="fas fa-exclamation-triangle"></i>
4252
Security Advisories
4353

44-
[{{< baseurl >}}announcements/advisories/index.xml]({{< baseurl >}}announcements/advisories/index.xml)
54+
<a href="{{< baseurl >}}announcements/advisories/index.xml" class="redirected">
55+
{{< baseurl >}}announcements/advisories/index.xml
56+
</a>
4557

4658
<i class="fas fa-code"></i>
4759
GitHub Release Tags - Get notified for new releases
4860

49-
[https://github.com/Velocidex/velociraptor/tags.atom](https://github.com/Velocidex/velociraptor/tags.atom)
61+
<a href="https://github.com/Velocidex/velociraptor/tags.atom">
62+
https://github.com/Velocidex/velociraptor/tags.atom
63+
</a>

layouts/shortcodes/expand.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ $_hugo_config := `{ "version": 1 }` }}
2+
<details>
3+
<summary>{{ .Get 0 }}</summary>
4+
{{.Inner | safeHTML}}
5+
</details>

layouts/shortcodes/reference.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
</div>
1111
</div>
1212

13-
<div class="search_results"></div>
13+
<div class="search_results" style="padding-top: 0px;"></div>
1414

1515
<script>
1616
initVQLReference();
1717

18-
$("#top-bar").addClass("hidden");
18+
$("#top-bar").addClass("hidden");
1919
$("#body-inner").addClass("offset");
2020
</script>

static/css/theme-mine.css

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ figcaption {
880880
details > summary:first-of-type {
881881
display: list-item;
882882
counter-increment: list-item 0;
883-
list-style: inside disclosure-closed;
883+
884884
}
885885

886886
#body-inner table {
@@ -1239,3 +1239,25 @@ div.search_results {
12391239
#body-inner.offset {
12401240
margin-top: 80px;
12411241
}
1242+
1243+
1244+
1245+
details {
1246+
padding: 10px;
1247+
background: var(--MENU-SECTIONS-BG-color);
1248+
border-radius: 15px;
1249+
}
1250+
1251+
details summary {
1252+
cursor: pointer;
1253+
color: var(--MAIN-TITLES-TEXT-color);
1254+
}
1255+
1256+
details[open] > summary {
1257+
color: var(--MAIN-TEXT-color);
1258+
opacity: 0.5;
1259+
}
1260+
1261+
details[open] {
1262+
background: var(--MENU-SECTIONS-BG-color);
1263+
}

0 commit comments

Comments
 (0)