docs: 4kify images.
These commits were squashed to avoid repo size exploding.issue510
After Width: | Height: | Size: 8.0 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 89 KiB |
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# Add viewBox attr to SVGs lacking it, so IE scales properly.
|
||||||
|
|
||||||
|
import lxml.etree
|
||||||
|
import glob
|
||||||
|
|
||||||
|
|
||||||
|
for name in glob.glob('images/*.svg') + glob.glob('images/ansible/*.svg'):
|
||||||
|
doc = lxml.etree.parse(open(name))
|
||||||
|
svg = doc.getroot()
|
||||||
|
if 'viewBox' not in svg.attrib:
|
||||||
|
svg.attrib['viewBox'] = '0 0 %(width)s %(height)s' % svg.attrib
|
||||||
|
open(name, 'w').write(lxml.etree.tostring(svg, xml_declaration=True, encoding='UTF-8'))
|