From a358aed464061e79da35dfb7a42b5f4ae82b6706 Mon Sep 17 00:00:00 2001 From: Gautier P Date: Sun, 24 May 2020 19:20:45 +0200 Subject: [PATCH] Improve stats footer on mobile #296 --- css/style.css | 41 +++++++++++++++++++++++++++------- index.html | 48 +++++++++++++++++++++++++--------------- js/control/TrackStats.js | 13 ++++------- locales/en.json | 1 + 4 files changed, 68 insertions(+), 35 deletions(-) diff --git a/css/style.css b/css/style.css index ea117213..cf015bdd 100644 --- a/css/style.css +++ b/css/style.css @@ -79,30 +79,53 @@ table.dataTable { footer { flex: none; - background-color: #f7f7f9; } +#stats-container { + display: flex; +} + +#stats-info { + align-items: center; + height: 46px; + display: none; +} +#stats-info[style*='display: block'] { + display: flex !important; +} +#stats-info > div { + margin: auto; +} #stats { flex-grow: 1; margin: 0; padding: 0; text-align: center; } + +ul#stats { + display: flex; + align-items: stretch; + justify-content: space-around; + width: 100%; + margin: 0; + padding: 0; +} #stats li { - margin: 0 1rem; display: inline-block; + flex: 0 1 auto; + list-style-type: none; } + +p.stats-label { + margin-bottom: 0.2em; +} + @media (max-width: 767px) { - #stats li { - margin: 0 0.5rem; - } #stats { padding-top: 0.4em; } - p.stats-label { - margin-bottom: 0.4em; - } } .stats-label { @@ -162,6 +185,8 @@ input#trackname:focus:invalid { #elevation-btn { align-items: center; margin-right: 0.5rem; + height: max-content; + align-self: center; } .routing-draw-enabled { diff --git a/index.html b/index.html index 50dcf0a8..31fb2d21 100644 --- a/index.html +++ b/index.html @@ -772,43 +772,50 @@