From 83fec0b53ae04e23948b981cf845ce0d476ba22a Mon Sep 17 00:00:00 2001 From: horus Date: Mon, 15 Mar 2021 22:38:11 +0100 Subject: Inline bpm / tanz --- .gitmodules | 3 +++ app.php | 4 ++++ functions.php | 4 ++++ views/tools/bpm | 1 + 4 files changed, 12 insertions(+) create mode 160000 views/tools/bpm diff --git a/.gitmodules b/.gitmodules index c3a8934..b102eaf 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "views/tools/zeitumstellung"] path = views/tools/zeitumstellung url = git@git.iamfabulous.de:zeitumstellung +[submodule "views/tools/bpm"] + path = views/tools/bpm + url = git@git.iamfabulous.de:bpm diff --git a/app.php b/app.php index fa659bd..ea81dfe 100644 --- a/app.php +++ b/app.php @@ -16,7 +16,11 @@ $twig->addFunction($function); $function = new \Twig\TwigFunction('maincss', function() { echo readfile(__DIR__ . '/public/css/bootstrap.min.css'); }); +$twig->addFunction($function); +$function = new \Twig\TwigFunction('dump_dances', function() { + echo readfile(__DIR__ . '/views/tools/bpm/dances.json'); +}); $twig->addFunction($function); /** diff --git a/functions.php b/functions.php index 361ece6..0b7d369 100644 --- a/functions.php +++ b/functions.php @@ -7,6 +7,10 @@ function get_faces(){ return json_decode( file_get_contents( __DIR__ . '/views/tools/faces/faces.json' ), true ); } +function get_dances(){ + return json_decode( file_get_contents( __DIR__ . '/views/tools/bpm/dances.json' ), true ); +} + function str_starts_with( $haystack, $needle ) { $length = strlen( $needle ); return substr( $haystack, 0, $length ) === $needle; diff --git a/views/tools/bpm b/views/tools/bpm new file mode 160000 index 0000000..413f4c1 --- /dev/null +++ b/views/tools/bpm @@ -0,0 +1 @@ +Subproject commit 413f4c1298eb20f66b594dd311e3fd49d3ac32cb -- cgit v1.2.3