Skip to content

Commit 5f8ceee

Browse files
committed
Updated website to have new feature for showing command notes.
1 parent 5ec2e63 commit 5f8ceee

2 files changed

Lines changed: 45 additions & 5 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ dependencies {
9292

9393
launchtarget("org.mangorage:mangobotlaunchtarget:0.1.8")
9494

95-
plugin('org.mangorage:mangobot:12.0.114')
95+
plugin('org.mangorage:mangobot:12.0.115')
9696
plugin('org.mangorage:mangobotplugin:12.0.63')
9797

9898
library('org.eclipse.jetty:jetty-server:11.0.16')

src/main/resources/templates/commands.ftl

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,42 @@
2020
margin: 4px 0;
2121
}
2222
23+
/* Command name tooltip */
24+
.cmd {
25+
cursor: help;
26+
position: relative;
27+
color: #ffd37f;
28+
}
29+
30+
.cmd .tooltip {
31+
display: none;
32+
position: absolute;
33+
background: #222;
34+
border: 1px solid #555;
35+
padding: 6px;
36+
border-radius: 4px;
37+
top: 1.5em;
38+
left: 0;
39+
white-space: nowrap;
40+
z-index: 100;
41+
}
42+
43+
.cmd:hover .tooltip {
44+
display: block;
45+
}
46+
47+
/* Parameter tooltip */
2348
.param {
24-
color: #7fd7ff;
2549
cursor: help;
2650
position: relative;
51+
color: #7fd7ff;
2752
}
2853
2954
.param.required {
3055
color: #ff7f7f;
3156
}
3257
33-
.tooltip {
58+
.param .tooltip {
3459
display: none;
3560
position: absolute;
3661
background: #222;
@@ -46,6 +71,7 @@
4671
.param:hover .tooltip {
4772
display: block;
4873
}
74+
4975
</style>
5076
</head>
5177
<body>
@@ -60,8 +86,22 @@
6086

6187
<#list data.commandParts() as cmd>
6288
<div class="command">
63-
<span>${cmd.getName()}</span>
6489

90+
<!-- Command name with tooltip -->
91+
<#if cmd.getCommandNotes()?has_content>
92+
<span class="cmd">
93+
${cmd.getName()}
94+
<span class="tooltip">
95+
<#list cmd.getCommandNotes() as note>
96+
<div>• ${note}</div>
97+
</#list>
98+
</span>
99+
</span>
100+
<#else>
101+
<span>${cmd.getName()}</span>
102+
</#if>
103+
104+
<!-- Parameters -->
65105
<#list cmd.getParameters() as p>
66106
<span class="param <#if p.isRequired()>required</#if>">
67107
<#if p.isRequired()>
@@ -80,6 +120,7 @@
80120
</span>
81121
</span>
82122
</#list>
123+
83124
</div>
84125
</#list>
85126

@@ -88,4 +129,3 @@
88129

89130
</body>
90131
</html>
91-

0 commit comments

Comments
 (0)