So in HTML i'd do something like this:
<a href="www.something">
<img src="my/machine">
</a>
to make the image into a link. But I want to do the same for Jade. I was reading through the docs here but nothing relating to what I want. Help please? Thanks very much in advance.
So in HTML i'd do something like this:
<a href="www.something.">
<img src="my/machine">
</a>
to make the image into a link. But I want to do the same for Jade. I was reading through the docs here but nothing relating to what I want. Help please? Thanks very much in advance.
Share Improve this question asked May 12, 2015 at 15:39 Giancarlo Manuel Guerra SalváGiancarlo Manuel Guerra Salvá 1,9423 gold badges18 silver badges35 bronze badges2 Answers
Reset to default 13What you're doing is nesting elements. Nesting just requires new lines and a tab per nest level.
Jade:
a(href='www.something.')
img(src='my/machine')
Use img(src= someExpr)
where someExpr will be evaluated to the path to your image.