diff --git a/pages.php b/pages.php index 08f0c84..c333ccd 100644 --- a/pages.php +++ b/pages.php @@ -40,7 +40,9 @@ define("PAGES", [ "icon" => "fas fa-chart-bar", "styles" => [ "static/css/tempusdominus-bootstrap-4.min.css", - "static/css/vertline.css" + "static/css/vertline.css", + "static/css/sane_columns.css", + "static/css/analy_reports.css" ], "scripts" => [ "static/js/moment.min.js", diff --git a/pages/analytics.php b/pages/analytics.php index 70cb645..c26ac0c 100644 --- a/pages/analytics.php +++ b/pages/analytics.php @@ -98,157 +98,151 @@ $records = $database->select("analytics", [ 0) { ?> -
-
- -
-
-

- + +
+
+

+ -
-
-
- -
-
+ } + $visits = count($uuids); + $views = count($records); + $ratio = round($views / $visits, 1); + ?> +
+
+
+ +
+
- -
-
-

- +
+
+

+ + } + ?> - -
- -
+ ]; + +
+
- -
-
-
-

-
-
- $max) { - break; + +
+
+

+ -
-
-
-
-
-
- - -
-
- - -
-
-
-
-
-
-
- -
+ } + $countrymapdata = []; + foreach ($countries as $id => $count) { + $countrymapdata[] = [$id, $count]; + } + $statemapdata = []; + foreach ($states as $id => $count) { + $statemapdata[] = [$id, $count]; + } + ?> + +
+
- -
-
-
-

- $count) { - $countrymapdata[] = [$id, $count]; - } - $statemapdata = []; - foreach ($states as $id => $count) { - $statemapdata[] = [$id, $count]; + +
+
+

+
+
+ $max) { + break; } ?> - -
-
-
+
+
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+
diff --git a/static/css/analy_reports.css b/static/css/analy_reports.css new file mode 100644 index 0000000..de89c28 --- /dev/null +++ b/static/css/analy_reports.css @@ -0,0 +1,11 @@ +/* +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. +*/ + +.list-group-scrolly { + max-height: 60vh; + overflow-y: scroll; + padding: 5px; +} \ No newline at end of file diff --git a/static/css/sane_columns.css b/static/css/sane_columns.css new file mode 100644 index 0000000..ff9941c --- /dev/null +++ b/static/css/sane_columns.css @@ -0,0 +1,21 @@ +/* +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. +*/ + +.card-columns { + column-count: 1; +} + +@media (min-width: 768px) { + .card-columns { + column-count: 2; + } +} + +@media (min-width: 992px) { + .card-columns { + column-count: 3; + } +} \ No newline at end of file