R
R
Ramil2017-04-05 11:12:21
Node.js
Ramil, 2017-04-05 11:12:21

How to include code in pug svg?

You need to add an svg file to the template. i.e. just include it in the code. I don't know how it can be done. I don’t want to translate the entire svg into pug and then back.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2017-04-05
@isqua

Just do in the template in the place where the icon should be:
include path/to/icon.svg

S
Shamsudin Serderov, 2017-04-05
@Steein

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")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question