Reputation: 562
I would like to write below in language slim.
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
and
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
I can embed it by inline HTML, so just interesting.
Upvotes: 0
Views: 264
Reputation: 10251
HTML:
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
SLIM:
li.active
a href="#"
| Link
span.sr-only (current)
and for this HTML code:
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
you can write slim:
a.dropdown-toggle aria-expanded="false" aria-haspopup="true" data-toggle="dropdown" href="#" role="button"
| Dropdown
span.caret
For your reference:
Upvotes: 1
Reputation: 198426
li.active
a href="#"
' Link
span.sr-only
| (current)
a.dropdown-toggle href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"
' Dropdown
span.caret
Upvotes: 1