1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<!-- 折叠代码 -->
<details class="codefold">
<summary class="codefold__title">
<span class="codefold__title-text">
" {{ with .Get 0}}{{.}}{{else}}click to expand{{ end }} "
</span>
</summary>
{{ .Inner }}
</details>
<!-- 样式 -->
<style>
.codefold {
margin: 1.5em 0;
border: 1px solid #e9edf3;
/* overflow: hidden; */
background-color: #f6f8fa;
}
.codefold__title {
padding: 0.5em 1em;
cursor: pointer;
user-select: none;
background-color: #f6f8fa;
}
.codefold__title-text {
flex: 1;
font-size: 1.2em;
font-weight: 600;
color: rgb(215, 178, 130);
text-decoration: 2px underline;
}
.codefold_tip {
font-size: 1.2em;
font-weight: 600;
color: #6280ad;
}
</style>
<!--
使用格式
双括号 百分号 codefold 标题 百分号 双括号
代码
双括号 百分号 /codefold 百分号 双括号
-->
|