Improved inlining of SVGs

This commit is contained in:
squidfunk 2020-04-27 10:27:59 +02:00 committed by Martin Donath
parent 32d986232e
commit 0d4d5c5f77
11 changed files with 365 additions and 63 deletions

View File

@ -5,8 +5,8 @@
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.8caa27b7.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.8caa27b7.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.37585f48.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.37585f48.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.37585f48.min.js.map", "assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.37585f48.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.6701e663.min.css", "assets/stylesheets/main.css": "assets/stylesheets/main.d5ade484.min.css",
"assets/stylesheets/main.css.map": "assets/stylesheets/main.6701e663.min.css.map", "assets/stylesheets/main.css.map": "assets/stylesheets/main.d5ade484.min.css.map",
"assets/stylesheets/palette.css": "assets/stylesheets/palette.85bb4ebe.min.css", "assets/stylesheets/palette.css": "assets/stylesheets/palette.85bb4ebe.min.css",
"assets/stylesheets/palette.css.map": "assets/stylesheets/palette.85bb4ebe.min.css.map" "assets/stylesheets/palette.css.map": "assets/stylesheets/palette.85bb4ebe.min.css.map"
} }

View File

@ -41,7 +41,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.6701e663.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.d5ade484.min.css' | url }}">
{% if palette.primary or palette.accent %} {% if palette.primary or palette.accent %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.85bb4ebe.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.85bb4ebe.min.css' | url }}">
{% endif %} {% endif %}

342
package-lock.json generated
View File

@ -457,6 +457,12 @@
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
"dev": true "dev": true
}, },
"@types/q": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz",
"integrity": "sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==",
"dev": true
},
"@types/ramda": { "@types/ramda": {
"version": "0.27.4", "version": "0.27.4",
"resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.27.4.tgz", "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.27.4.tgz",
@ -1569,6 +1575,17 @@
"is-regexp": "^2.0.0" "is-regexp": "^2.0.0"
} }
}, },
"coa": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz",
"integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==",
"dev": true,
"requires": {
"@types/q": "^1.5.1",
"chalk": "^2.4.1",
"q": "^1.1.2"
}
},
"collapse-white-space": { "collapse-white-space": {
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz",
@ -1872,6 +1889,22 @@
"nth-check": "^1.0.2" "nth-check": "^1.0.2"
} }
}, },
"css-select-base-adapter": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz",
"integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==",
"dev": true
},
"css-tree": {
"version": "1.0.0-alpha.37",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz",
"integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==",
"dev": true,
"requires": {
"mdn-data": "2.0.4",
"source-map": "^0.6.1"
}
},
"css-what": { "css-what": {
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz", "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz",
@ -1884,6 +1917,33 @@
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
"dev": true "dev": true
}, },
"csso": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz",
"integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==",
"dev": true,
"requires": {
"css-tree": "1.0.0-alpha.39"
},
"dependencies": {
"css-tree": {
"version": "1.0.0-alpha.39",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz",
"integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==",
"dev": true,
"requires": {
"mdn-data": "2.0.6",
"source-map": "^0.6.1"
}
},
"mdn-data": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz",
"integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==",
"dev": true
}
}
},
"currently-unhandled": { "currently-unhandled": {
"version": "0.4.1", "version": "0.4.1",
"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@ -1947,6 +2007,15 @@
"clone": "^1.0.2" "clone": "^1.0.2"
} }
}, },
"define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"dev": true,
"requires": {
"object-keys": "^1.0.12"
}
},
"define-property": { "define-property": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@ -2194,6 +2263,36 @@
"is-arrayish": "^0.2.1" "is-arrayish": "^0.2.1"
} }
}, },
"es-abstract": {
"version": "1.17.5",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
"integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
"is-callable": "^1.1.5",
"is-regex": "^1.0.5",
"object-inspect": "^1.7.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.0",
"string.prototype.trimleft": "^2.1.1",
"string.prototype.trimright": "^2.1.1"
}
},
"es-to-primitive": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
"dev": true,
"requires": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
"is-symbol": "^1.0.2"
}
},
"escape-html": { "escape-html": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@ -2764,6 +2863,12 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"gensync": { "gensync": {
"version": "1.0.0-beta.1", "version": "1.0.0-beta.1",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
@ -2996,12 +3101,27 @@
"integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
"dev": true "dev": true
}, },
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": {
"function-bind": "^1.1.1"
}
},
"has-flag": { "has-flag": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true "dev": true
}, },
"has-symbols": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
"dev": true
},
"has-value": { "has-value": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
@ -3112,6 +3232,12 @@
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
"dev": true "dev": true
}, },
"html-comment-regex": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz",
"integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==",
"dev": true
},
"html-minifier": { "html-minifier": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
@ -3376,6 +3502,12 @@
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
"dev": true "dev": true
}, },
"is-callable": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
"integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
"dev": true
},
"is-data-descriptor": { "is-data-descriptor": {
"version": "0.1.4", "version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@ -3402,6 +3534,12 @@
} }
} }
}, },
"is-date-object": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
"dev": true
},
"is-decimal": { "is-decimal": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
@ -3499,6 +3637,15 @@
"isobject": "^3.0.1" "isobject": "^3.0.1"
} }
}, },
"is-regex": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
"integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
"dev": true,
"requires": {
"has": "^1.0.3"
}
},
"is-regexp": { "is-regexp": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz",
@ -3517,6 +3664,24 @@
"integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==", "integrity": "sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==",
"dev": true "dev": true
}, },
"is-svg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
"integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==",
"dev": true,
"requires": {
"html-comment-regex": "^1.1.0"
}
},
"is-symbol": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
"dev": true,
"requires": {
"has-symbols": "^1.0.1"
}
},
"is-typedarray": { "is-typedarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@ -3845,12 +4010,6 @@
"integrity": "sha1-6K+VjYUqh0e/shHkjOEoK9qRiBU=", "integrity": "sha1-6K+VjYUqh0e/shHkjOEoK9qRiBU=",
"dev": true "dev": true
}, },
"material-design-icons-svg": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/material-design-icons-svg/-/material-design-icons-svg-3.0.0.tgz",
"integrity": "sha512-MbHjWXGzHLPZX9qiICq3CLp0zkxaKm1uzNnrwsmThoCf5J70Lq8zSMKJMxG6uLAZB4b6evvBXrdf3C34RoRfaA==",
"dev": true
},
"material-shadows": { "material-shadows": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/material-shadows/-/material-shadows-3.0.1.tgz", "resolved": "https://registry.npmjs.org/material-shadows/-/material-shadows-3.0.1.tgz",
@ -3883,6 +4042,12 @@
"unist-util-visit": "^2.0.0" "unist-util-visit": "^2.0.0"
} }
}, },
"mdn-data": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
"integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==",
"dev": true
},
"mem": { "mem": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
@ -4341,6 +4506,18 @@
} }
} }
}, },
"object-inspect": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
"integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
"dev": true
},
"object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
"dev": true
},
"object-visit": { "object-visit": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
@ -4350,6 +4527,28 @@
"isobject": "^3.0.0" "isobject": "^3.0.0"
} }
}, },
"object.assign": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
"integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
"dev": true,
"requires": {
"define-properties": "^1.1.2",
"function-bind": "^1.1.1",
"has-symbols": "^1.0.0",
"object-keys": "^1.0.11"
}
},
"object.getownpropertydescriptors": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
"integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1"
}
},
"object.pick": { "object.pick": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
@ -4359,6 +4558,18 @@
"isobject": "^3.0.1" "isobject": "^3.0.1"
} }
}, },
"object.values": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz",
"integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1",
"function-bind": "^1.1.1",
"has": "^1.0.3"
}
},
"once": { "once": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@ -5165,6 +5376,26 @@
"postcss": "^7.0.0" "postcss": "^7.0.0"
} }
}, },
"postcss-svgo": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz",
"integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==",
"dev": true,
"requires": {
"is-svg": "^3.0.0",
"postcss": "^7.0.0",
"postcss-value-parser": "^3.0.0",
"svgo": "^1.0.0"
},
"dependencies": {
"postcss-value-parser": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
}
}
},
"postcss-syntax": { "postcss-syntax": {
"version": "0.36.2", "version": "0.36.2",
"resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz",
@ -5266,6 +5497,12 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true "dev": true
}, },
"q": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
"integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
"dev": true
},
"query-string": { "query-string": {
"version": "6.12.1", "version": "6.12.1",
"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.12.1.tgz", "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.12.1.tgz",
@ -5753,6 +5990,12 @@
} }
} }
}, },
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
},
"schema-utils": { "schema-utils": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
@ -6133,6 +6376,12 @@
"figgy-pudding": "^3.5.1" "figgy-pudding": "^3.5.1"
} }
}, },
"stable": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
"integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==",
"dev": true
},
"state-toggle": { "state-toggle": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz",
@ -6216,6 +6465,48 @@
"strip-ansi": "^6.0.0" "strip-ansi": "^6.0.0"
} }
}, },
"string.prototype.trimend": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
"integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5"
}
},
"string.prototype.trimleft": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
"integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5",
"string.prototype.trimstart": "^1.0.0"
}
},
"string.prototype.trimright": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
"integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5",
"string.prototype.trimend": "^1.0.0"
}
},
"string.prototype.trimstart": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
"integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.5"
}
},
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@ -7054,6 +7345,27 @@
"integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=",
"dev": true "dev": true
}, },
"svgo": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz",
"integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==",
"dev": true,
"requires": {
"chalk": "^2.4.1",
"coa": "^2.0.2",
"css-select": "^2.0.0",
"css-select-base-adapter": "^0.1.1",
"css-tree": "1.0.0-alpha.37",
"csso": "^4.0.2",
"js-yaml": "^3.13.1",
"mkdirp": "~0.5.1",
"object.values": "^1.1.0",
"sax": "~1.2.4",
"stable": "^0.1.8",
"unquote": "~1.1.1",
"util.promisify": "~1.0.0"
}
},
"sywac": { "sywac": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/sywac/-/sywac-1.3.0.tgz", "resolved": "https://registry.npmjs.org/sywac/-/sywac-1.3.0.tgz",
@ -7524,6 +7836,12 @@
"unist-util-is": "^4.0.0" "unist-util-is": "^4.0.0"
} }
}, },
"unquote": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
"integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=",
"dev": true
},
"unset-value": { "unset-value": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@ -7638,6 +7956,18 @@
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
"dev": true "dev": true
}, },
"util.promisify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz",
"integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.2",
"has-symbols": "^1.0.1",
"object.getownpropertydescriptors": "^2.1.0"
}
},
"uuid": { "uuid": {
"version": "3.4.0", "version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",

View File

@ -70,6 +70,7 @@
"modularscale-sass": "^3.0.10", "modularscale-sass": "^3.0.10",
"postcss-inline-svg": "^4.1.0", "postcss-inline-svg": "^4.1.0",
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"postcss-svgo": "^4.0.2",
"preact": "^10.4.1", "preact": "^10.4.1",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",

View File

@ -53,7 +53,7 @@ $admonitions: (
$icon: nth($props, 1); $icon: nth($props, 1);
// Inline icon through string-replace-loader in webpack // Inline icon through string-replace-loader in webpack
--md-admonition-icon--#{$name}: url("{{ #{$icon} }}"); --md-admonition-icon--#{$name}: svg-load("@mdi/svg/svg/#{$icon}.svg");
} }
} }

View File

@ -26,7 +26,7 @@
// Icon definitions // Icon definitions
:root { :root {
--md-footnotes-icon: url("{{ keyboard-return }}"); --md-footnotes-icon: svg-load("@mdi/svg/svg/keyboard-return.svg");
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -26,7 +26,7 @@
// Icon definitions // Icon definitions
:root { :root {
--md-details-icon: url("{{ chevron-right }}"); --md-details-icon: svg-load("@mdi/svg/svg/chevron-right.svg");
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -26,8 +26,8 @@
// Icon definitions // Icon definitions
:root { :root {
--md-tasklist-icon: url("{{ checkbox-blank-circle }}"); --md-tasklist-icon: svg-load("@mdi/svg/svg/checkbox-blank-circle.svg");
--md-tasklist-icon--checked: url("{{ check-circle }}"); --md-tasklist-icon--checked: svg-load("@mdi/svg/svg/check-circle.svg");
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -20,8 +20,6 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
// tslint:disable no-var-requires
import * as CopyPlugin from "copy-webpack-plugin" import * as CopyPlugin from "copy-webpack-plugin"
import * as EventHooksPlugin from "event-hooks-webpack-plugin" import * as EventHooksPlugin from "event-hooks-webpack-plugin"
import * as fs from "fs" import * as fs from "fs"
@ -35,16 +33,6 @@ import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin"
import { Configuration } from "webpack" import { Configuration } from "webpack"
import * as AssetsManifestPlugin from "webpack-assets-manifest" import * as AssetsManifestPlugin from "webpack-assets-manifest"
/* ----------------------------------------------------------------------------
* Data
* ------------------------------------------------------------------------- */
/**
* Material icons
*/
const data = require("material-design-icons-svg/paths")
const icon = require("material-design-icons-svg")(data)
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* Helper functions * Helper functions
* ------------------------------------------------------------------------- */ * ------------------------------------------------------------------------- */
@ -96,37 +84,25 @@ function config(args: Configuration): Configuration {
sourceMap: true sourceMap: true
} }
}, },
{
loader: "string-replace-loader",
options: {
multiple: [
{
search: "\\{{2}\\s+?([^}]+)\\s+?\\}{2}",
replace(_: string, props: string) {
const [name, color] = props.split(" ")
/* Load icon and set color, if given */
const svg = icon.getSVG(
path.basename(name, ".json"),
color ? ` style="fill: ${color}"` : undefined
)
.replace(/"/g, "'")
.replace(/#/g, "%23")
/* Return encoded icon */
return `data:image/svg+xml;utf8,${svg}`
},
flags: "g"
}
]
}
},
{ {
loader: "postcss-loader", loader: "postcss-loader",
options: { options: {
ident: "postcss", ident: "postcss",
plugins: () => [ plugins: () => [
require("autoprefixer")() require("autoprefixer")(),
require("postcss-inline-svg")({
paths: [
path.resolve(__dirname, "node_modules")
],
encode: false
}),
require("postcss-svgo")({
plugins: [
{ removeDimensions: true },
{ removeViewBox: false }
],
encode: false
})
], ],
sourceMap: true sourceMap: true
} }
@ -238,16 +214,11 @@ export default (_env: never, args: Configuration): Configuration[] => {
context: "node_modules/@fortawesome/fontawesome-free/svgs" context: "node_modules/@fortawesome/fontawesome-free/svgs"
}), }),
/* Material icons */ /* Material Design icons */
new CopyPlugin([ new CopyPlugin([
{ { to: ".icons/material", from: "*.svg" }
to: ".icons/material/[name].svg",
from: "**/*.json",
toType: "template",
transform: (_, file) => icon.getSVG(path.basename(file, ".json"))
}
], { ], {
context: "node_modules/material-design-icons-svg/paths" context: "node_modules/@mdi/svg/svg"
}), }),
/* GitHub octicons */ /* GitHub octicons */