summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHorus2020-10-18 02:38:50 +0200
committerHorus2020-10-18 02:38:50 +0200
commit0111daba4d324d17c04ab9876fd8928fd7630b1f (patch)
tree45752c9cc812da8733a9052cef68b15e978ca66e
parent59cef9f008bad510dd9ba953f8a30291ff6f0257 (diff)
downloadbpm -0111daba4d324d17c04ab9876fd8928fd7630b1f.tar.gz
adds basic infos about ballroom dances.
-rw-r--r--index.php30
1 files changed, 29 insertions, 1 deletions
diff --git a/index.php b/index.php
index 17aac81..5d5188a 100644
--- a/index.php
+++ b/index.php
@@ -4,7 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Berechnet die Preise für Pizza im Verhältnis zum Flächeninhalt. Lieber zwei kleine oder eine große Pizza kaufen?">
<link rel='stylesheet' type='text/css' href="/css/bootstrap.min.css">
- <link rel='icon' href="https://iamfabulous.de/favicon.ico">
+ <link rel='icon' href="/img/paw-144.png">
<title>Beats per Minute</title>
<style>
html {
@@ -25,7 +25,35 @@
</span>
<button id="reset" class="btn btn-secondary">Reset</button>
+ <div class="row">
+<?php
+ $dances = json_decode( file_get_contents("dances.json") );
+ $type = "";
+?>
+<?Php
+ foreach ( $dances as $dance ) {
+ if ( $dance->type != $type ) {
+ $type = $dance->type;
+?>
+ <div class="col-12 mt-4 mb-2"> <h2> <?= ucfirst( $type ) ?> </h2> </div>
+<?php
+ }
+?>
+ <div class="col">
+ <h3> <?= $dance->name; ?> </h3>
+ <?= $dance->minBarspm ?> bis <?= $dance->maxBarspm ?> Takte pM
+ <br>
+ <?= $dance->minBpm ?> bis <?= $dance->maxBpm ?> BpM
+ <br>
+ <?= $dance->bar; ?> Takt
+ </div>
+<?php
+ }
+?>
+ </div>
+
<script>
+ var dances = <?php readfile("dances.json"); ?>;
function median(values){
if ( values.length === 0 ) {
return 0;