Mark Fisher
01/03/2025, 11:34 AM<li class="list-group-item d-flex justify-content-between align-items-center">
Client Count
<span class="badge bg-primary rounded-pill">3</span>
</li>
When I use the following, the text content of the li
is put in after the span:
simplePanel(className = "bs-component") {
ul(className = "list-group") {
li(className = "list-group-item d-flex justify-content-between align-items-center") {
content = "Client Count"
span(className = "badge bg-primary rounded-pill") {
content = "3"
}
}
}
}
i.e. it's producing:
<li class="list-group-item d-flex justify-content-between align-items-center kv-text-start">
<span class="badge bg-primary rounded-pill">3</span>
Client Count
</li>
How do I get the content to be put in before the child span?Mark Fisher
01/03/2025, 11:36 AMMark Fisher
01/03/2025, 11:38 AMMark Fisher
01/03/2025, 11:39 AMli()
function, but it does the sameMark Fisher
01/03/2025, 11:48 AMli(className = "list-group-item d-flex justify-content-between align-items-center") {
p(content = "Client Count", className = "m-0 p-0")
span(className = "badge bg-primary rounded-pill") {
content = "3"
}
}
by not using the content for the li
at all, and then fixing the class of the p
element to look like the text would.
Hopefully there's a simpler way maybe?Mark Fisher
01/03/2025, 12:18 PMRobert Jaros
01/03/2025, 12:19 PMli(className = "list-group-item d-flex justify-content-between align-items-center") {
+"Client Count"
span(className = "badge bg-primary rounded-pill") {
content = "3"
}
}
Robert Jaros
01/03/2025, 12:21 PMtextNode()
Mark Fisher
01/03/2025, 12:23 PMval myText = "Client Count"
+myText
textNode(myText)
both work here.