diff --git a/app/Helpers/ChartHelper.php b/app/Helpers/ChartHelper.php index 33e1b56bd..c439d8ecd 100644 --- a/app/Helpers/ChartHelper.php +++ b/app/Helpers/ChartHelper.php @@ -25,7 +25,7 @@ public static function getChart(?int $userId = null): \Generator return $group->count(); }); - $chart = CarbonPeriod::create(now()->subMonths(24), '1 day', now()) + $chart = CarbonPeriod::create(now()->subMonths(12), '1 day', now()) ->map(function (Carbon $dayDate) use ($countActivitiesByDays): int { $day = $dayDate->format('Y-m-d'); $dayActivitiesCount = $countActivitiesByDays->get($day, 0); diff --git a/resources/sass/_activity_chart.scss b/resources/sass/_activity_chart.scss index ca2a1423b..d0bdfe953 100644 --- a/resources/sass/_activity_chart.scss +++ b/resources/sass/_activity_chart.scss @@ -23,7 +23,8 @@ grid-template-rows: repeat(7, var(--square-size)); grid-auto-flow: column; grid-auto-columns: var(--square-size); - padding: 0; + padding: 0 0 5px 0; + overflow-x: auto; } .graph { diff --git a/resources/sass/_custom.scss b/resources/sass/_custom.scss index 8f8597278..c3c204133 100644 --- a/resources/sass/_custom.scss +++ b/resources/sass/_custom.scss @@ -34,4 +34,11 @@ .bg-light { background-color: #343a40 !important; } -} \ No newline at end of file +} + +@media (max-width: 576px) { + main.flex-grow-1 { + margin-left: 16px; + margin-right: 16px; + } +} diff --git a/resources/views/components/activity_chart.blade.php b/resources/views/components/activity_chart.blade.php index db2f66155..1a156b531 100644 --- a/resources/views/components/activity_chart.blade.php +++ b/resources/views/components/activity_chart.blade.php @@ -1,5 +1,5 @@ -
-
+
+
    @foreach ($chart as $square)
  • diff --git a/resources/views/home/index.blade.php b/resources/views/home/index.blade.php index 888a8a9a5..5205fff2d 100644 --- a/resources/views/home/index.blade.php +++ b/resources/views/home/index.blade.php @@ -45,8 +45,8 @@
-
-
+
+

{{ __('welcome.statistic.table.count_points') }}:

{{ $statisticTable['countPoints'] }}

diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 8e1bbe7b8..e5fcd64d8 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -30,7 +30,7 @@ @include('layouts._nav') @include('flash::message') @hasSection('content') -
+
@yield('content')