From 6c396997f2f2d5304b2413f590645dc62107dd7e Mon Sep 17 00:00:00 2001 From: maTh Date: Wed, 25 Aug 2021 11:52:40 +0200 Subject: Statistics: improved layout (#3797) * css grid layout * Update repartition.phtml * scrolling the canvas if it does not fit --- p/themes/base-theme/template.css | 22 ++++++++++++++++++---- p/themes/base-theme/template.rtl.css | 22 ++++++++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) (limited to 'p') diff --git a/p/themes/base-theme/template.css b/p/themes/base-theme/template.css index 8d851d508..1c63fac46 100644 --- a/p/themes/base-theme/template.css +++ b/p/themes/base-theme/template.css @@ -957,14 +957,20 @@ br { } /*=== Statistiques */ +.stat-grid { + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 20px; +} + .stat { - margin: 15px 0; + grid-column: 1 / span 2; + overflow-x: auto; + overflow-y: hidden; } .stat.half { - padding: 0 2%; - display: inline-block; - width: 46%; + grid-column: auto; } .stat > table { @@ -975,6 +981,10 @@ br { height: 300px; } +.stat .flotr-legend-label{ + padding-left: 0; +} + /*=== LOGIN VIEW */ /*================*/ .formLogin .header > .item { @@ -1364,6 +1374,10 @@ input:checked + .slide-container .properties { line-height: 50px; border-bottom: 1px solid #ddd; } + + .stat.half { + grid-column: 1 / span 2; + } } /*=== PRINTER */ diff --git a/p/themes/base-theme/template.rtl.css b/p/themes/base-theme/template.rtl.css index 3c19047d4..927f92def 100644 --- a/p/themes/base-theme/template.rtl.css +++ b/p/themes/base-theme/template.rtl.css @@ -957,14 +957,20 @@ br { } /*=== Statistiques */ +.stat-grid { + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 20px; +} + .stat { - margin: 15px 0; + grid-column: 1 / span 2; + overflow-x: auto; + overflow-y: hidden; } .stat.half { - padding: 0 2%; - display: inline-block; - width: 46%; + grid-column: auto; } .stat > table { @@ -975,6 +981,10 @@ br { height: 300px; } +.stat .flotr-legend-label{ + padding-left: 0; +} + /*=== LOGIN VIEW */ /*================*/ .formLogin .header > .item { @@ -1364,6 +1374,10 @@ input:checked + .slide-container .properties { line-height: 50px; border-bottom: 1px solid #ddd; } + + .stat.half { + grid-column: 1 / span 2; + } } /*=== PRINTER */ -- cgit v1.2.3