An AssetAggregator that creates SVG sprites with PNG fallbacks at needed sizes via dr-svg-sprites.
<dependency>
<groupId>org.jooby</groupId>
<artifactId>jooby-svg-sprites</artifactId>
<version>1.0.0.CR8</version>
</dependency>assets {
fileset {
sprite: svg-sprites
home: home.scss
}
svg-sprites {
spriteElementPath: "images/svg-source",
spritePath: "css"
}
}
The spriteElementPath contains all the *.svg files you want to process. The spritePath indicates where to save the sprite, here you will find the following generated files: css/sprite.css, css/sprite.svg and css/sprite.png.
assets {
fileset {
sprite: svg-sprites
home: home.scss
}
svg-sprites {
spriteElementPath: "images/svg-source",
spritePath: "css",
layout: "vertical",
sizes: {
large: 24,
small: 16
},
refSize: "large"
}
}
Please refer to dr-svg-sprites for more details.