diff --git a/justfile b/justfile index bbf6eea..cd962e9 100644 --- a/justfile +++ b/justfile @@ -47,3 +47,9 @@ dbstart: # stop pg. dbstop: podman stop pg + +# process svg template assets. +svgo: + svgo -i templates/svg-"*".tmpl + +# vim: set ts=2 ft=just syntax=make fenc=utf-8 ff=unix : diff --git a/svgo.config.js b/svgo.config.js new file mode 100644 index 0000000..40cd552 --- /dev/null +++ b/svgo.config.js @@ -0,0 +1,25 @@ +module.exports = { + multipass: true, + plugins: [ + { + name: 'preset-default', + params: { + overrides: { + removeViewBox: false + } + } + }, + 'removeStyleElement', + 'removeScriptElement', + { + name: 'removeAttrs', + params: { + attrs: ['xmlns', 'id', 'class', 'data-name', 'fill', 'transform', 'href', 'clip-path', 'clip-rule'] + } + }, + { + name: 'addClassesToSVGElement', + params: {classNames: ['w-6 h-6 mx-3 text-gray-300 dark:text-gray-500 fill-none stroke-current stroke-2']} + }, + ] +} diff --git a/templates/navbar.tmpl b/templates/navbar.tmpl index 3c4c257..ff3b8a8 100644 --- a/templates/navbar.tmpl +++ b/templates/navbar.tmpl @@ -7,7 +7,10 @@