From 3709dcae107bac350116e496b29ab9588cd928a6 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 12 Jun 2023 11:16:31 +0200 Subject: [PATCH] wip #5877 @0.5 --- app/Fluidbook/Stats.php | 6 ++-- .../packages/fluidbook/toolbox/css/style.less | 8 +++-- .../views/fluidbook_stats/loader.blade.php | 31 ++----------------- .../views/fluidbook_stats/summary.blade.php | 2 +- 4 files changed, 13 insertions(+), 34 deletions(-) diff --git a/app/Fluidbook/Stats.php b/app/Fluidbook/Stats.php index e80838a32..dbc1e60c1 100644 --- a/app/Fluidbook/Stats.php +++ b/app/Fluidbook/Stats.php @@ -266,7 +266,7 @@ class Stats extends Reporting 'label' => __('Visites'), 'backgroundColor' => '#f54d00', // Could make bars semi-transparent if desired 'borderColor'=> '#000000', - 'borderWidth'=> 1, + 'borderWidth'=> .75, 'data' => $this->_pagesByPeriod->pluck('nb_visits')->toArray(), 'order' => 1, 'bar_offset' => -5, // Negative offset shifts bar to left @@ -276,7 +276,7 @@ class Stats extends Reporting 'label' => __('Pages vues'), 'backgroundColor' => '#514e49', 'borderColor'=> '#000000', - 'borderWidth'=> 1, + 'borderWidth'=> .75, 'data' => $this->_pagesByPeriod->pluck('nb_hits')->toArray(), 'order' => 2, 'bar_offset' => 5, // Positive offset shifts bar to right @@ -291,7 +291,7 @@ class Stats extends Reporting 'label' => __('Visiteurs uniques'), 'backgroundColor' => 'hsl(72 100% 38% / 100%)', 'borderColor'=> '#000000', - 'borderWidth'=> 1, + 'borderWidth'=> .75, 'data' => $this->_pagesByPeriod->pluck('nb_uniq_visitors')->toArray(), 'order' => 1, 'bar_offset' => -8, // Negative offset shifts bar to left diff --git a/public/packages/fluidbook/toolbox/css/style.less b/public/packages/fluidbook/toolbox/css/style.less index b26f695eb..ce342f714 100644 --- a/public/packages/fluidbook/toolbox/css/style.less +++ b/public/packages/fluidbook/toolbox/css/style.less @@ -269,8 +269,12 @@ a, a.btn-link, a:not([href]):not([tabindex]) { background: @sidebar-active; } -.table-striped tbody tr:nth-of-type(2n) { - background-color: transparent; +table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) { + background-color: #fff; +} + +table.dataTable th{ + background-color: #fafafa; } .dropdown-item.active, .dropdown-item:active { diff --git a/resources/views/fluidbook_stats/loader.blade.php b/resources/views/fluidbook_stats/loader.blade.php index d37ecc48f..c3a580f43 100644 --- a/resources/views/fluidbook_stats/loader.blade.php +++ b/resources/views/fluidbook_stats/loader.blade.php @@ -27,31 +27,6 @@ justify-content: space-between; } - .summary { - display: grid; - grid-template-columns: max-content 1fr; - } - - .summary dt, .summary dd { - margin: 0; - padding: 0.5em; - } - - .summary dt { - display: flex; - align-items: center; - white-space: nowrap; - padding-right: 2em; - } - - .summary dt:nth-of-type(odd), .summary dd:nth-of-type(odd), table.stats-details tbody tr:nth-of-type(odd) { - background-color: #f4f4f4; - } - - .summary dt:nth-of-type(even), .summary dd:nth-of-type(even), table.stats-details tbody tr:nth-of-type(even) { - background-color: #eaeaea; - } - table.stats-details { width: 100%; table-layout: fixed; @@ -64,11 +39,11 @@ table.stats-details thead tr { position: sticky; top: 0; - background-color: #fff; + background-color: #fafafa; } - table.stats-details tbody tr:hover td { - background-color: rgba(156, 195, 34, 0.15); + table.stats-details thead th{ + border-bottom: medium solid rgba(0,40,100,.12); } [data-name="formatted_date"] { diff --git a/resources/views/fluidbook_stats/summary.blade.php b/resources/views/fluidbook_stats/summary.blade.php index fa688b561..163a5c73e 100644 --- a/resources/views/fluidbook_stats/summary.blade.php +++ b/resources/views/fluidbook_stats/summary.blade.php @@ -3,7 +3,7 @@ {{-- This doesn't extend any templates because it is fetched from loader.blade.php and injected via JS --}} @php - $tableClasses='sortable bg-white table table-striped table-hover nowrap rounded shadow-xs border-xs mt-2 dataTable dtr-inline'; + $tableClasses='stats-details sortable bg-white table table-striped table-hover nowrap rounded shadow-xs border-xs mt-2 dataTable dtr-inline'; @endphp

-- 2.39.5