Answer the question
In order to leave comments, you need to log in
Pug and SVG - how to be?
What about using inline SVG in Pug/Jade?
There's an xml code there.
This is a serious block.
Damn, I've been working in Pug for a couple of weeks, translated a lot of things, but if you can't stupidly use SVG, then everything is in the trash. I'm shocked.
Answer the question
In order to leave comments, you need to log in
doctype html
html
head
body
svg(width="200px", height="230px", version="1.1", xmlns="http://www.w3.org/2000/svg", xmlns:xlink="http://www.w3.org/1999/xlink")
circle/(cx="100", cy="100", r="100", fill="#000")
circle/(cx="100", cy="100", r="95", fill="#ff0")
include path/to/icon.svg
Try a Mixin
mixin icon(name, url)
- mod = mod || ''
a(href="#{url}" class="#{name}_link")
svg(class="icon icon-" + name)
use(xlink:href="/assets/img/sprite.svg#" + name)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question