Skip to content

Commit c79cf37

Browse files
committed
Content item: Boxes that can switch between summary/details
1 parent 6d63ee6 commit c79cf37

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

docs/_static/arrow_down.svg

Lines changed: 9 additions & 0 deletions
Loading

docs/_static/custom.css

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
a {
23
color: #679c5b;
34
}
@@ -14,6 +15,58 @@ body {
1415
border-style: solid;
1516
}
1617

18+
/* Details expand-collaps boxes */
19+
summary {
20+
list-style: none;
21+
display: flex;
22+
justify-content: space-between;
23+
align-items: center;
24+
font-weight: bold;
25+
width: 100%;
26+
font-size: 15px;
27+
background: lightgrey;
28+
padding: 3px 2px 0 5px;
29+
}
30+
.wy-nav-content a {
31+
color: #666 !important;
32+
}
33+
34+
summary::after {
35+
content: '';
36+
width: 18px;
37+
height: 10px;
38+
background: url('arrow_down.svg') no-repeat;
39+
background-size: 14px;
40+
margin-left: .75em;
41+
transition: 0.2s;
42+
}
43+
44+
details[open] > summary::after {
45+
transform: rotate(180deg);
46+
position: relative;
47+
bottom: 2px;
48+
right: 4px;
49+
}
50+
51+
summary::-webkit-details-marker {
52+
display: none;
53+
}
54+
55+
summary {
56+
border-radius: 0px;
57+
}
58+
59+
details[open] summary {
60+
border-radius: 0px 0px 0 0;
61+
}
62+
63+
details {
64+
border-radius: 0px;
65+
border: 1px solid #666;
66+
margin-bottom: 10px;
67+
}
68+
69+
1770
/* Coloring */
1871
.rst-content .note .admonition-title,
1972
.rst-content .note .wy-alert-title,

docs/sections/erda/archiving/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ This section shows how to secure your data inside ERDA itself. It can increase l
1919
An *archive* is a snapshot of one or more files in ERDA. They are preserved in the state of creation time.
2020
Think of a taking a still picture or creating a zip file; the original files are subject to change, while the archive are frozen in time.
2121

22+
.. raw:: html
23+
24+
<details>
25+
<summary><a>Fold ud, fold ind eksempel</a></summary>
26+
27+
.. code-block:: python
28+
29+
lots_of_code = "this text block"
30+
31+
.. raw:: html
32+
33+
</details>
34+
2235
Benefits of copying files into an archive:
2336
* frozen archives are stored in separate physical location
2437
* extra secure, long-term storage guaranteed (10 years)

0 commit comments

Comments
 (0)