diff --git a/Dockerfile b/Dockerfile index 53d3b7f..000313f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM alpine RUN apk --no-cache add python3 inkscape bash imagemagick -ADD . /root/zetikettes +ADD backend /root/zetikettes RUN apk --no-cache add ttf-opensans && cp /root/zetikettes/fonts/*.ttf /usr/share/fonts/TTF/ && fc-cache -fv diff --git a/backend/data/tikettes.json b/backend/data/tikettes.json new file mode 100644 index 0000000..fe51488 --- /dev/null +++ b/backend/data/tikettes.json @@ -0,0 +1 @@ +[] diff --git a/makeplanche.py b/backend/makeplanche.py similarity index 100% rename from makeplanche.py rename to backend/makeplanche.py diff --git a/makesticker.py b/backend/makesticker.py similarity index 100% rename from makesticker.py rename to backend/makesticker.py diff --git a/mkjam.sh b/backend/mkjam.sh similarity index 100% rename from mkjam.sh rename to backend/mkjam.sh diff --git a/planche.svg.in b/backend/planche.svg.in similarity index 100% rename from planche.svg.in rename to backend/planche.svg.in diff --git a/web.py b/backend/web.py similarity index 100% rename from web.py rename to backend/web.py diff --git a/frontend/config.js b/frontend/config.js new file mode 100644 index 0000000..d520fc4 --- /dev/null +++ b/frontend/config.js @@ -0,0 +1 @@ +const backend_api = 'http://localhost:8001/' \ No newline at end of file diff --git a/static/index.html b/frontend/index.html similarity index 100% rename from static/index.html rename to frontend/index.html diff --git a/static/newtikette.html b/frontend/newtikette.html similarity index 100% rename from static/newtikette.html rename to frontend/newtikette.html diff --git a/static/newtikette.js b/frontend/newtikette.js similarity index 96% rename from static/newtikette.js rename to frontend/newtikette.js index c23f8ca..f0479d4 100644 --- a/static/newtikette.js +++ b/frontend/newtikette.js @@ -1,8 +1,3 @@ -const backend_api = { - 'prod': '/zetikettes/srv/', - 'dev': '/zetikettes.dev/srv/', -}[config]; - const params = [ ['dluo', 'DLUO', true], ['lot', 'Nº de lot', true], @@ -65,7 +60,7 @@ $(document).ready(async () => { landscape`)); const subst = $('

'); for (let param of params) { - subst.append($(`