aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeah (ctucx) <leah@ctu.cx>2021-03-14 15:36:19 +0100
committerLeah (ctucx) <leah@ctu.cx>2021-03-14 15:36:19 +0100
commit47d021f1ae815a71325d8ee73da72383973bd571 (patch)
tree74ccf848eaca0bb5aa8fc4cab00cfeb47cf6c962
parentc5a889ce9e216de27d07e79d12500f85d6a89a8b (diff)
downloadoeffi-web-master.tar.gz
oeffi-web-master.tar.bz2
oeffi-web-master.zip
compile templates and assets into binaryHEADmaster
-rw-r--r--src/assets.nim16
-rwxr-xr-xsrc/assets/client/css/product_selector.css (renamed from assets/client/css/product_selector.css)0
-rwxr-xr-xsrc/assets/client/css/style.css (renamed from assets/client/css/style.css)0
-rwxr-xr-xsrc/assets/client/img/apple-touch-icon.png (renamed from assets/client/img/apple-touch-icon.png)bin10749 -> 10749 bytes
-rwxr-xr-xsrc/assets/client/img/back.svg (renamed from assets/client/img/back.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-beenhere-24px.svg (renamed from assets/client/img/baseline-beenhere-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-departure_board-24px.svg (renamed from assets/client/img/baseline-departure_board-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-directions-24px.svg (renamed from assets/client/img/baseline-directions-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-directions-24px_white.svg (renamed from assets/client/img/baseline-directions-24px_white.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-directions_walk-24px.svg (renamed from assets/client/img/baseline-directions_walk-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-expand_more-24px.svg (renamed from assets/client/img/baseline-expand_more-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-import_export-24px.svg (renamed from assets/client/img/baseline-import_export-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-navigation-24px.svg (renamed from assets/client/img/baseline-navigation-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-place-24px.svg (renamed from assets/client/img/baseline-place-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-refresh-24px.svg (renamed from assets/client/img/baseline-refresh-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-settings-20px.svg (renamed from assets/client/img/baseline-settings-20px.svg)0
-rwxr-xr-xsrc/assets/client/img/baseline-swap_vert-24px.svg (renamed from assets/client/img/baseline-swap_vert-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/bg.webp (renamed from assets/client/img/bg.webp)bin121796 -> 121796 bytes
-rwxr-xr-xsrc/assets/client/img/favicon-16x16.png (renamed from assets/client/img/favicon-16x16.png)bin2049 -> 2049 bytes
-rwxr-xr-xsrc/assets/client/img/favicon-32x32.png (renamed from assets/client/img/favicon-32x32.png)bin3591 -> 3591 bytes
-rwxr-xr-xsrc/assets/client/img/favicon-512x512.png (renamed from assets/client/img/favicon-512x512.png)bin36948 -> 36948 bytes
-rwxr-xr-xsrc/assets/client/img/favicon-64x64.png (renamed from assets/client/img/favicon-64x64.png)bin6561 -> 6561 bytes
-rwxr-xr-xsrc/assets/client/img/help-24px.svg (renamed from assets/client/img/help-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/info-24px.svg (renamed from assets/client/img/info-24px.svg)0
-rwxr-xr-xsrc/assets/client/img/product_bus_color.svg (renamed from assets/client/img/product_bus_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_bus_grey.svg (renamed from assets/client/img/product_bus_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_call_color.svg (renamed from assets/client/img/product_call_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_call_grey.svg (renamed from assets/client/img/product_call_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_ferry_color.svg (renamed from assets/client/img/product_ferry_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_ferry_grey.svg (renamed from assets/client/img/product_ferry_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_highspeed_color.svg (renamed from assets/client/img/product_highspeed_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_highspeed_grey.svg (renamed from assets/client/img/product_highspeed_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_suburban_color.svg (renamed from assets/client/img/product_suburban_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_suburban_grey.svg (renamed from assets/client/img/product_suburban_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_subway_color.svg (renamed from assets/client/img/product_subway_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_subway_grey.svg (renamed from assets/client/img/product_subway_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_train_color.svg (renamed from assets/client/img/product_train_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_train_grey.svg (renamed from assets/client/img/product_train_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/product_tram_color.svg (renamed from assets/client/img/product_tram_color.svg)0
-rwxr-xr-xsrc/assets/client/img/product_tram_grey.svg (renamed from assets/client/img/product_tram_grey.svg)0
-rwxr-xr-xsrc/assets/client/img/travelynx.svg (renamed from assets/client/img/travelynx.svg)0
-rwxr-xr-xsrc/assets/client/img/warning-24px.svg (renamed from assets/client/img/warning-24px.svg)0
-rwxr-xr-xsrc/assets/client/index.html (renamed from assets/client/index.html)0
-rwxr-xr-xsrc/assets/client/js/api.js (renamed from assets/client/js/api.js)0
-rwxr-xr-xsrc/assets/client/js/app.js (renamed from assets/client/js/app.js)0
-rwxr-xr-xsrc/assets/client/js/app_functions.js (renamed from assets/client/js/app_functions.js)0
-rwxr-xr-xsrc/assets/client/js/canvas.js (renamed from assets/client/js/canvas.js)0
-rwxr-xr-xsrc/assets/client/js/ds100.js (renamed from assets/client/js/ds100.js)0
-rwxr-xr-xsrc/assets/client/js/helpers.js (renamed from assets/client/js/helpers.js)0
-rwxr-xr-xsrc/assets/client/js/journeyView.js (renamed from assets/client/js/journeyView.js)0
-rwxr-xr-xsrc/assets/client/js/journeysView.js (renamed from assets/client/js/journeysView.js)0
-rwxr-xr-xsrc/assets/client/js/languages.js (renamed from assets/client/js/languages.js)0
-rwxr-xr-xsrc/assets/client/js/lit-html.js (renamed from assets/client/js/lit-html.js)0
-rwxr-xr-xsrc/assets/client/js/overlays.js (renamed from assets/client/js/overlays.js)0
-rwxr-xr-xsrc/assets/client/js/router.js (renamed from assets/client/js/router.js)0
-rwxr-xr-xsrc/assets/client/js/searchView.js (renamed from assets/client/js/searchView.js)0
-rwxr-xr-xsrc/assets/client/js/settingsView.js (renamed from assets/client/js/settingsView.js)0
-rwxr-xr-xsrc/assets/client/js/sprintf.min.js (renamed from assets/client/js/sprintf.min.js)0
-rwxr-xr-xsrc/assets/client/manifest.json (renamed from assets/client/manifest.json)0
-rwxr-xr-xsrc/assets/client/service-worker.js (renamed from assets/client/service-worker.js)0
-rwxr-xr-xsrc/assets/client/todo.txt (renamed from assets/client/todo.txt)0
-rwxr-xr-xsrc/assets/favicon-512x512.png (renamed from assets/favicon-512x512.png)bin36948 -> 36948 bytes
-rwxr-xr-xsrc/assets/favicon-64x64.png (renamed from assets/favicon-64x64.png)bin6561 -> 6561 bytes
-rwxr-xr-xsrc/assets/js/canvas.js (renamed from assets/js/canvas.js)0
-rwxr-xr-xsrc/assets/js/helpers.js (renamed from assets/js/helpers.js)0
-rwxr-xr-xsrc/assets/js/journey.js (renamed from assets/js/journey.js)0
-rwxr-xr-xsrc/assets/js/journeys.js (renamed from assets/js/journeys.js)0
-rwxr-xr-xsrc/assets/js/lit-html.js (renamed from assets/js/lit-html.js)0
-rwxr-xr-xsrc/assets/js/search.js (renamed from assets/js/search.js)0
-rwxr-xr-xsrc/assets/manifest.json (renamed from assets/manifest.json)0
-rwxr-xr-xsrc/assets/style.css (renamed from assets/style.css)0
-rwxr-xr-xsrc/assets/varela-regular-webfont.woff (renamed from assets/varela-regular-webfont.woff)bin29956 -> 29956 bytes
-rwxr-xr-xsrc/assets/varela-regular-webfont.woff2 (renamed from assets/varela-regular-webfont.woff2)bin22548 -> 22548 bytes
-rw-r--r--src/oeffi.nim46
-rw-r--r--src/templates/error.tpl (renamed from templates/error.tpl)0
-rw-r--r--src/templates/journey.tpl (renamed from templates/journey.tpl)0
-rw-r--r--src/templates/journeys.tpl (renamed from templates/journeys.tpl)0
-rw-r--r--src/templates/search.tpl (renamed from templates/search.tpl)0
-rw-r--r--src/utils.nim12
79 files changed, 68 insertions, 6 deletions
diff --git a/src/assets.nim b/src/assets.nim
new file mode 100644
index 0000000..28afdbb
--- /dev/null
+++ b/src/assets.nim
@@ -0,0 +1,16 @@
+const
+ templateError* = staticRead "templates/error.tpl"
+ templateSearch* = staticRead "templates/search.tpl"
+ templateJourney* = staticRead "templates/journey.tpl"
+ templateJourneys* = staticRead "templates/journeys.tpl"
+
+const
+ assetStyleCss* = staticRead "assets/style.css"
+ assetManifestJson* = staticRead "assets/manifest.json"
+ assetFavicon512* = staticRead "assets/favicon-512x512.png"
+ assetFavicon64* = staticRead "assets/favicon-64x64.png"
+ assetLitHtmlJs* = staticRead "assets/js/lit-html.js"
+ assetHelpersJs* = staticRead "assets/js/helpers.js"
+ assetSearchJs* = staticRead "assets/js/search.js"
+ assetJourneysJs* = staticRead "assets/js/journeys.js"
+ assetJourneyJs* = staticRead "assets/js/journey.js"
diff --git a/assets/client/css/product_selector.css b/src/assets/client/css/product_selector.css
index 9154b6b..9154b6b 100755
--- a/assets/client/css/product_selector.css
+++ b/src/assets/client/css/product_selector.css
diff --git a/assets/client/css/style.css b/src/assets/client/css/style.css
index 005d2af..005d2af 100755
--- a/assets/client/css/style.css
+++ b/src/assets/client/css/style.css
diff --git a/assets/client/img/apple-touch-icon.png b/src/assets/client/img/apple-touch-icon.png
index 587b601..587b601 100755
--- a/assets/client/img/apple-touch-icon.png
+++ b/src/assets/client/img/apple-touch-icon.png
Binary files differ
diff --git a/assets/client/img/back.svg b/src/assets/client/img/back.svg
index 3251c9e..3251c9e 100755
--- a/assets/client/img/back.svg
+++ b/src/assets/client/img/back.svg
diff --git a/assets/client/img/baseline-beenhere-24px.svg b/src/assets/client/img/baseline-beenhere-24px.svg
index afe02c7..afe02c7 100755
--- a/assets/client/img/baseline-beenhere-24px.svg
+++ b/src/assets/client/img/baseline-beenhere-24px.svg
diff --git a/assets/client/img/baseline-departure_board-24px.svg b/src/assets/client/img/baseline-departure_board-24px.svg
index a35fc3f..a35fc3f 100755
--- a/assets/client/img/baseline-departure_board-24px.svg
+++ b/src/assets/client/img/baseline-departure_board-24px.svg
diff --git a/assets/client/img/baseline-directions-24px.svg b/src/assets/client/img/baseline-directions-24px.svg
index bea8287..bea8287 100755
--- a/assets/client/img/baseline-directions-24px.svg
+++ b/src/assets/client/img/baseline-directions-24px.svg
diff --git a/assets/client/img/baseline-directions-24px_white.svg b/src/assets/client/img/baseline-directions-24px_white.svg
index 01a17b2..01a17b2 100755
--- a/assets/client/img/baseline-directions-24px_white.svg
+++ b/src/assets/client/img/baseline-directions-24px_white.svg
diff --git a/assets/client/img/baseline-directions_walk-24px.svg b/src/assets/client/img/baseline-directions_walk-24px.svg
index 453908e..453908e 100755
--- a/assets/client/img/baseline-directions_walk-24px.svg
+++ b/src/assets/client/img/baseline-directions_walk-24px.svg
diff --git a/assets/client/img/baseline-expand_more-24px.svg b/src/assets/client/img/baseline-expand_more-24px.svg
index 690a0a1..690a0a1 100755
--- a/assets/client/img/baseline-expand_more-24px.svg
+++ b/src/assets/client/img/baseline-expand_more-24px.svg
diff --git a/assets/client/img/baseline-import_export-24px.svg b/src/assets/client/img/baseline-import_export-24px.svg
index 4547ce1..4547ce1 100755
--- a/assets/client/img/baseline-import_export-24px.svg
+++ b/src/assets/client/img/baseline-import_export-24px.svg
diff --git a/assets/client/img/baseline-navigation-24px.svg b/src/assets/client/img/baseline-navigation-24px.svg
index 2a6d867..2a6d867 100755
--- a/assets/client/img/baseline-navigation-24px.svg
+++ b/src/assets/client/img/baseline-navigation-24px.svg
diff --git a/assets/client/img/baseline-place-24px.svg b/src/assets/client/img/baseline-place-24px.svg
index 87530f8..87530f8 100755
--- a/assets/client/img/baseline-place-24px.svg
+++ b/src/assets/client/img/baseline-place-24px.svg
diff --git a/assets/client/img/baseline-refresh-24px.svg b/src/assets/client/img/baseline-refresh-24px.svg
index f68e554..f68e554 100755
--- a/assets/client/img/baseline-refresh-24px.svg
+++ b/src/assets/client/img/baseline-refresh-24px.svg
diff --git a/assets/client/img/baseline-settings-20px.svg b/src/assets/client/img/baseline-settings-20px.svg
index 0737ecb..0737ecb 100755
--- a/assets/client/img/baseline-settings-20px.svg
+++ b/src/assets/client/img/baseline-settings-20px.svg
diff --git a/assets/client/img/baseline-swap_vert-24px.svg b/src/assets/client/img/baseline-swap_vert-24px.svg
index aa707b8..aa707b8 100755
--- a/assets/client/img/baseline-swap_vert-24px.svg
+++ b/src/assets/client/img/baseline-swap_vert-24px.svg
diff --git a/assets/client/img/bg.webp b/src/assets/client/img/bg.webp
index 745a9a3..745a9a3 100755
--- a/assets/client/img/bg.webp
+++ b/src/assets/client/img/bg.webp
Binary files differ
diff --git a/assets/client/img/favicon-16x16.png b/src/assets/client/img/favicon-16x16.png
index 44822c4..44822c4 100755
--- a/assets/client/img/favicon-16x16.png
+++ b/src/assets/client/img/favicon-16x16.png
Binary files differ
diff --git a/assets/client/img/favicon-32x32.png b/src/assets/client/img/favicon-32x32.png
index b00c425..b00c425 100755
--- a/assets/client/img/favicon-32x32.png
+++ b/src/assets/client/img/favicon-32x32.png
Binary files differ
diff --git a/assets/client/img/favicon-512x512.png b/src/assets/client/img/favicon-512x512.png
index ab6515d..ab6515d 100755
--- a/assets/client/img/favicon-512x512.png
+++ b/src/assets/client/img/favicon-512x512.png
Binary files differ
diff --git a/assets/client/img/favicon-64x64.png b/src/assets/client/img/favicon-64x64.png
index 36487a6..36487a6 100755
--- a/assets/client/img/favicon-64x64.png
+++ b/src/assets/client/img/favicon-64x64.png
Binary files differ
diff --git a/assets/client/img/help-24px.svg b/src/assets/client/img/help-24px.svg
index ac7a460..ac7a460 100755
--- a/assets/client/img/help-24px.svg
+++ b/src/assets/client/img/help-24px.svg
diff --git a/assets/client/img/info-24px.svg b/src/assets/client/img/info-24px.svg
index c98b8ac..c98b8ac 100755
--- a/assets/client/img/info-24px.svg
+++ b/src/assets/client/img/info-24px.svg
diff --git a/assets/client/img/product_bus_color.svg b/src/assets/client/img/product_bus_color.svg
index 93c4e98..93c4e98 100755
--- a/assets/client/img/product_bus_color.svg
+++ b/src/assets/client/img/product_bus_color.svg
diff --git a/assets/client/img/product_bus_grey.svg b/src/assets/client/img/product_bus_grey.svg
index 5cb2471..5cb2471 100755
--- a/assets/client/img/product_bus_grey.svg
+++ b/src/assets/client/img/product_bus_grey.svg
diff --git a/assets/client/img/product_call_color.svg b/src/assets/client/img/product_call_color.svg
index c1d3a33..c1d3a33 100755
--- a/assets/client/img/product_call_color.svg
+++ b/src/assets/client/img/product_call_color.svg
diff --git a/assets/client/img/product_call_grey.svg b/src/assets/client/img/product_call_grey.svg
index e736bcc..e736bcc 100755
--- a/assets/client/img/product_call_grey.svg
+++ b/src/assets/client/img/product_call_grey.svg
diff --git a/assets/client/img/product_ferry_color.svg b/src/assets/client/img/product_ferry_color.svg
index 41f2e49..41f2e49 100755
--- a/assets/client/img/product_ferry_color.svg
+++ b/src/assets/client/img/product_ferry_color.svg
diff --git a/assets/client/img/product_ferry_grey.svg b/src/assets/client/img/product_ferry_grey.svg
index 3754de5..3754de5 100755
--- a/assets/client/img/product_ferry_grey.svg
+++ b/src/assets/client/img/product_ferry_grey.svg
diff --git a/assets/client/img/product_highspeed_color.svg b/src/assets/client/img/product_highspeed_color.svg
index 0f0cd4b..0f0cd4b 100755
--- a/assets/client/img/product_highspeed_color.svg
+++ b/src/assets/client/img/product_highspeed_color.svg
diff --git a/assets/client/img/product_highspeed_grey.svg b/src/assets/client/img/product_highspeed_grey.svg
index 4ec1024..4ec1024 100755
--- a/assets/client/img/product_highspeed_grey.svg
+++ b/src/assets/client/img/product_highspeed_grey.svg
diff --git a/assets/client/img/product_suburban_color.svg b/src/assets/client/img/product_suburban_color.svg
index e5e7254..e5e7254 100755
--- a/assets/client/img/product_suburban_color.svg
+++ b/src/assets/client/img/product_suburban_color.svg
diff --git a/assets/client/img/product_suburban_grey.svg b/src/assets/client/img/product_suburban_grey.svg
index 38345ea..38345ea 100755
--- a/assets/client/img/product_suburban_grey.svg
+++ b/src/assets/client/img/product_suburban_grey.svg
diff --git a/assets/client/img/product_subway_color.svg b/src/assets/client/img/product_subway_color.svg
index 0e56faf..0e56faf 100755
--- a/assets/client/img/product_subway_color.svg
+++ b/src/assets/client/img/product_subway_color.svg
diff --git a/assets/client/img/product_subway_grey.svg b/src/assets/client/img/product_subway_grey.svg
index 6257f46..6257f46 100755
--- a/assets/client/img/product_subway_grey.svg
+++ b/src/assets/client/img/product_subway_grey.svg
diff --git a/assets/client/img/product_train_color.svg b/src/assets/client/img/product_train_color.svg
index 306d2f6..306d2f6 100755
--- a/assets/client/img/product_train_color.svg
+++ b/src/assets/client/img/product_train_color.svg
diff --git a/assets/client/img/product_train_grey.svg b/src/assets/client/img/product_train_grey.svg
index 4e027d6..4e027d6 100755
--- a/assets/client/img/product_train_grey.svg
+++ b/src/assets/client/img/product_train_grey.svg
diff --git a/assets/client/img/product_tram_color.svg b/src/assets/client/img/product_tram_color.svg
index 3f958eb..3f958eb 100755
--- a/assets/client/img/product_tram_color.svg
+++ b/src/assets/client/img/product_tram_color.svg
diff --git a/assets/client/img/product_tram_grey.svg b/src/assets/client/img/product_tram_grey.svg
index 93f5316..93f5316 100755
--- a/assets/client/img/product_tram_grey.svg
+++ b/src/assets/client/img/product_tram_grey.svg
diff --git a/assets/client/img/travelynx.svg b/src/assets/client/img/travelynx.svg
index 9a553f2..9a553f2 100755
--- a/assets/client/img/travelynx.svg
+++ b/src/assets/client/img/travelynx.svg
diff --git a/assets/client/img/warning-24px.svg b/src/assets/client/img/warning-24px.svg
index d27c4c6..d27c4c6 100755
--- a/assets/client/img/warning-24px.svg
+++ b/src/assets/client/img/warning-24px.svg
diff --git a/assets/client/index.html b/src/assets/client/index.html
index 4ec07ed..4ec07ed 100755
--- a/assets/client/index.html
+++ b/src/assets/client/index.html
diff --git a/assets/client/js/api.js b/src/assets/client/js/api.js
index 45fd070..45fd070 100755
--- a/assets/client/js/api.js
+++ b/src/assets/client/js/api.js
diff --git a/assets/client/js/app.js b/src/assets/client/js/app.js
index fd7d13a..fd7d13a 100755
--- a/assets/client/js/app.js
+++ b/src/assets/client/js/app.js
diff --git a/assets/client/js/app_functions.js b/src/assets/client/js/app_functions.js
index 991c514..991c514 100755
--- a/assets/client/js/app_functions.js
+++ b/src/assets/client/js/app_functions.js
diff --git a/assets/client/js/canvas.js b/src/assets/client/js/canvas.js
index ca8f7ac..ca8f7ac 100755
--- a/assets/client/js/canvas.js
+++ b/src/assets/client/js/canvas.js
diff --git a/assets/client/js/ds100.js b/src/assets/client/js/ds100.js
index bf2deed..bf2deed 100755
--- a/assets/client/js/ds100.js
+++ b/src/assets/client/js/ds100.js
diff --git a/assets/client/js/helpers.js b/src/assets/client/js/helpers.js
index 16a6bd2..16a6bd2 100755
--- a/assets/client/js/helpers.js
+++ b/src/assets/client/js/helpers.js
diff --git a/assets/client/js/journeyView.js b/src/assets/client/js/journeyView.js
index 352a3a0..352a3a0 100755
--- a/assets/client/js/journeyView.js
+++ b/src/assets/client/js/journeyView.js
diff --git a/assets/client/js/journeysView.js b/src/assets/client/js/journeysView.js
index 2c5ad47..2c5ad47 100755
--- a/assets/client/js/journeysView.js
+++ b/src/assets/client/js/journeysView.js
diff --git a/assets/client/js/languages.js b/src/assets/client/js/languages.js
index fada692..fada692 100755
--- a/assets/client/js/languages.js
+++ b/src/assets/client/js/languages.js
diff --git a/assets/client/js/lit-html.js b/src/assets/client/js/lit-html.js
index 0a8b2f8..0a8b2f8 100755
--- a/assets/client/js/lit-html.js
+++ b/src/assets/client/js/lit-html.js
diff --git a/assets/client/js/overlays.js b/src/assets/client/js/overlays.js
index 4956f9c..4956f9c 100755
--- a/assets/client/js/overlays.js
+++ b/src/assets/client/js/overlays.js
diff --git a/assets/client/js/router.js b/src/assets/client/js/router.js
index 5411073..5411073 100755
--- a/assets/client/js/router.js
+++ b/src/assets/client/js/router.js
diff --git a/assets/client/js/searchView.js b/src/assets/client/js/searchView.js
index 68b407b..68b407b 100755
--- a/assets/client/js/searchView.js
+++ b/src/assets/client/js/searchView.js
diff --git a/assets/client/js/settingsView.js b/src/assets/client/js/settingsView.js
index 602d198..602d198 100755
--- a/assets/client/js/settingsView.js
+++ b/src/assets/client/js/settingsView.js
diff --git a/assets/client/js/sprintf.min.js b/src/assets/client/js/sprintf.min.js
index a3dce30..a3dce30 100755
--- a/assets/client/js/sprintf.min.js
+++ b/src/assets/client/js/sprintf.min.js
diff --git a/assets/client/manifest.json b/src/assets/client/manifest.json
index d404476..d404476 100755
--- a/assets/client/manifest.json
+++ b/src/assets/client/manifest.json
diff --git a/assets/client/service-worker.js b/src/assets/client/service-worker.js
index 986aaaf..986aaaf 100755
--- a/assets/client/service-worker.js
+++ b/src/assets/client/service-worker.js
diff --git a/assets/client/todo.txt b/src/assets/client/todo.txt
index 6bae079..6bae079 100755
--- a/assets/client/todo.txt
+++ b/src/assets/client/todo.txt
diff --git a/assets/favicon-512x512.png b/src/assets/favicon-512x512.png
index ab6515d..ab6515d 100755
--- a/assets/favicon-512x512.png
+++ b/src/assets/favicon-512x512.png
Binary files differ
diff --git a/assets/favicon-64x64.png b/src/assets/favicon-64x64.png
index 36487a6..36487a6 100755
--- a/assets/favicon-64x64.png
+++ b/src/assets/favicon-64x64.png
Binary files differ
diff --git a/assets/js/canvas.js b/src/assets/js/canvas.js
index ca8f7ac..ca8f7ac 100755
--- a/assets/js/canvas.js
+++ b/src/assets/js/canvas.js
diff --git a/assets/js/helpers.js b/src/assets/js/helpers.js
index 8dbb4b3..8dbb4b3 100755
--- a/assets/js/helpers.js
+++ b/src/assets/js/helpers.js
diff --git a/assets/js/journey.js b/src/assets/js/journey.js
index 586dd67..586dd67 100755
--- a/assets/js/journey.js
+++ b/src/assets/js/journey.js
diff --git a/assets/js/journeys.js b/src/assets/js/journeys.js
index 688ddf6..688ddf6 100755
--- a/assets/js/journeys.js
+++ b/src/assets/js/journeys.js
diff --git a/assets/js/lit-html.js b/src/assets/js/lit-html.js
index 0a8b2f8..0a8b2f8 100755
--- a/assets/js/lit-html.js
+++ b/src/assets/js/lit-html.js
diff --git a/assets/js/search.js b/src/assets/js/search.js
index 1242168..1242168 100755
--- a/assets/js/search.js
+++ b/src/assets/js/search.js
diff --git a/assets/manifest.json b/src/assets/manifest.json
index 4a30046..4a30046 100755
--- a/assets/manifest.json
+++ b/src/assets/manifest.json
diff --git a/assets/style.css b/src/assets/style.css
index 1dcd99e..1dcd99e 100755
--- a/assets/style.css
+++ b/src/assets/style.css
diff --git a/assets/varela-regular-webfont.woff b/src/assets/varela-regular-webfont.woff
index 8ca439d..8ca439d 100755
--- a/assets/varela-regular-webfont.woff
+++ b/src/assets/varela-regular-webfont.woff
Binary files differ
diff --git a/assets/varela-regular-webfont.woff2 b/src/assets/varela-regular-webfont.woff2
index c70e733..c70e733 100755
--- a/assets/varela-regular-webfont.woff2
+++ b/src/assets/varela-regular-webfont.woff2
Binary files differ
diff --git a/src/oeffi.nim b/src/oeffi.nim
index bfb2ce5..49f6550 100644
--- a/src/oeffi.nim
+++ b/src/oeffi.nim
@@ -1,9 +1,6 @@
-import json, os, posix
+import json, os, posix, options
import asyncWebServer
-import types
-import options
-
import endpoints/searchHandler
import endpoints/journeysHandler
import endpoints/journeyHandler
@@ -15,7 +12,14 @@ import endpoints/api/refreshJourney
import nimhafas
-import types, formaters/formaters
+import types, assets, formaters/formaters
+
+const
+ templateError = staticRead "templates/error.tpl"
+ templateSearch = staticRead "templates/search.tpl"
+ templateJourney = staticRead "templates/journey.tpl"
+ templateJourneys = staticRead "templates/journeys.tpl"
+
proc removePidFile() =
if getEnv("PID_FILE") != "":
@@ -103,6 +107,38 @@ proc main = # for gcsafe
var json = %* {"suggestions": suggestions}
await request.respondJson(Http200, "success", "", json["suggestions"])
+ startsWith("/assets/"):
+ if url == "style.css":
+ await request.respond(Http200, assetStyleCss, newHttpHeaders([("Content-Type", "text/css; charset=UTF-8")]))
+
+ elif url == "manifest.json":
+ await request.respond(Http200, assetManifestJson, newHttpHeaders([("Content-Type", "application/json; charset=UTF-8")]))
+
+ elif url == "favicon-512x512.png":
+ await request.respond(Http200, assetFavicon512, newHttpHeaders([("Content-Type", "image/png")]))
+
+ elif url == "favicon-64x64.png":
+ await request.respond(Http200, assetFavicon64, newHttpHeaders([("Content-Type", "image/png")]))
+
+ elif url == "js/lit-html.js":
+ await request.respond(Http200, assetLitHtmlJs, newHttpHeaders([("Content-Type", "text/javascript; charset=UTF-8")]))
+
+ elif url == "js/helpers.js":
+ await request.respond(Http200, assetHelpersJs, newHttpHeaders([("Content-Type", "text/javascript; charset=UTF-8")]))
+
+ elif url == "js/search.js":
+ await request.respond(Http200, assetSearchJs, newHttpHeaders([("Content-Type", "text/javascript; charset=UTF-8")]))
+
+ elif url == "js/journeys.js":
+ await request.respond(Http200, assetJourneysJs, newHttpHeaders([("Content-Type", "text/javascript; charset=UTF-8")]))
+
+ elif url == "js/journey.js":
+ await request.respond(Http200, assetJourneyJs, newHttpHeaders([("Content-Type", "text/javascript; charset=UTF-8")]))
+
+ else:
+ await request.respond(Http404, "404 - Not found", newHttpHeaders([("Content-Type", "text/plain")]))
+
+
regex(re"^\/([A-Za-z0-9]+)$"):
await journeysHandler(request, server)
diff --git a/templates/error.tpl b/src/templates/error.tpl
index 18cbb79..18cbb79 100644
--- a/templates/error.tpl
+++ b/src/templates/error.tpl
diff --git a/templates/journey.tpl b/src/templates/journey.tpl
index 875e782..875e782 100644
--- a/templates/journey.tpl
+++ b/src/templates/journey.tpl
diff --git a/templates/journeys.tpl b/src/templates/journeys.tpl
index f789016..f789016 100644
--- a/templates/journeys.tpl
+++ b/src/templates/journeys.tpl
diff --git a/templates/search.tpl b/src/templates/search.tpl
index b3281b0..b3281b0 100644
--- a/templates/search.tpl
+++ b/src/templates/search.tpl
diff --git a/src/utils.nim b/src/utils.nim
index 19bc532..62c5c1a 100644
--- a/src/utils.nim
+++ b/src/utils.nim
@@ -2,6 +2,7 @@ import json, asyncdispatch, asynchttpserver, options, strutils, httpcore
import nimhafas
import types, translations
import moustachu, moustachu_context
+import assets
proc getPoint* (name: string): Future[Point] {.async} =
let points = (await suggestions(SuggestionsParams(
@@ -59,6 +60,15 @@ proc respTemplate* (request: Request, httpCode: HttpCode, name: string, template
templateContext = templateContext.addTranslations(translations["global"][lang])
templateContext = templateContext.addTranslations(translations[name][lang])
- let response = render(readFile("templates/" & name & ".tpl"), templateContext)
+ var response: string
+
+ if name == "search":
+ response = render(templateSearch , templateContext)
+ elif name == "journeys":
+ response = render(templateJourneys, templateContext)
+ elif name == "journey":
+ response = render(templateJourney, templateContext)
+ else:
+ response = render(templateError, templateContext)
await request.respond(httpCode, response, newHttpHeaders([("Content-Type", "text/html; charset=UTF-8")]))