diff --git a/Makefile b/Makefile index f32093a..9f576fb 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ all: build/card.html .PHONY: dev dev: - git ls-files | entr make all + git ls-files | entr bash -c "make all" + .PHONY: clean clean: rm build/* @@ -32,17 +33,18 @@ build/card.xml: card.yaml define PYTHON_MAKE_STYLE_XSL from jinja2 import Environment, FileSystemLoader -with open("style.css") as f: css_data = f.read() +with open("style.css") as f: css_data = f.read() with open("style.html.j2") as f: jinja_data = f.read() +with open("style.js") as f: js_data = f.read() out = (Environment( loader=FileSystemLoader('templates')) .get_template('style.xsl.j2') - .render( css_data=css_data, jinja_data=jinja_data)) + .render( css_data=css_data, jinja_data=jinja_data, js_data=js_data)) #print(out) -with open("build/card.xml", "w") as f: +with open("build/style.xsl", "w") as f: f.write(out) endef export PYTHON_MAKE_STYLE_XSL -build/style.xsl: style.css style.html.j2 +build/style.xsl: style.css templates/style.xsl.j2 style.html.j2 style.js python -c "$$PYTHON_MAKE_STYLE_XSL" diff --git a/style.html.j2 b/style.html.j2 index 573eb0a..25309b9 100644 --- a/style.html.j2 +++ b/style.html.j2 @@ -1,5 +1,9 @@ + + +spis meg +