diff --git a/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor b/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor index aea49f5..0ab33cf 100644 --- a/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor +++ b/src/Flypaper.Web/Components/Pages/Dashboard/DashboardPage.razor @@ -44,7 +44,7 @@ else {
- +
diff --git a/src/Flypaper.Web/Components/Pages/Dashboard/TopTable.razor b/src/Flypaper.Web/Components/Pages/Dashboard/TopTable.razor index 09e946b..e94fedc 100644 --- a/src/Flypaper.Web/Components/Pages/Dashboard/TopTable.razor +++ b/src/Flypaper.Web/Components/Pages/Dashboard/TopTable.razor @@ -7,7 +7,12 @@ } else { -
Zeit
+
+ + + + + diff --git a/src/Flypaper.Web/Components/Shared/Formatting.cs b/src/Flypaper.Web/Components/Shared/Formatting.cs index 1ff1bae..b4b3104 100644 --- a/src/Flypaper.Web/Components/Shared/Formatting.cs +++ b/src/Flypaper.Web/Components/Shared/Formatting.cs @@ -4,10 +4,10 @@ public static class Formatting { public static string Duration(TimeSpan duration) => duration switch { - { TotalDays: >= 1 } => $"{(int)duration.TotalDays} d {duration.Hours} h", - { TotalHours: >= 1 } => $"{duration.Hours} h {duration.Minutes} min", - { TotalMinutes: >= 1 } => $"{duration.Minutes} min {duration.Seconds} s", - _ => $"{duration.TotalSeconds:0.0} s" + { TotalDays: >= 1 } => $"{(int)duration.TotalDays}\u00a0d {duration.Hours}\u00a0h", + { TotalHours: >= 1 } => $"{duration.Hours}\u00a0h {duration.Minutes}\u00a0min", + { TotalMinutes: >= 1 } => $"{duration.Minutes}\u00a0min {duration.Seconds}\u00a0s", + _ => $"{(int)duration.TotalSeconds}\u00a0s" }; public static string Flag(string? countryCode) => diff --git a/src/Flypaper.Web/wwwroot/app.css b/src/Flypaper.Web/wwwroot/app.css index 46a1737..3e43dd4 100644 --- a/src/Flypaper.Web/wwwroot/app.css +++ b/src/Flypaper.Web/wwwroot/app.css @@ -102,11 +102,35 @@ h2 { .tops { display: grid; - grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); + grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; } +.tops > * { + min-width: 0; +} + +.top-table { + table-layout: fixed; +} + +.top-table .count { + width: 64px; +} + +.top-table .hold { + width: 104px; +} + +.top-table .clip { + max-width: none; +} + +.recent-table .clip { + max-width: 200px; +} + .scroll { overflow-x: auto; } @@ -204,10 +228,6 @@ tr.open .clip { } @media (max-width: 600px) { - .tops { - grid-template-columns: 1fr; - } - .clip { max-width: 180px; } @@ -485,3 +505,9 @@ tr.open .detail { button.danger { background: var(--bad); } + +@media (max-width: 860px) { + .tops { + grid-template-columns: minmax(0, 1fr); + } +}
@KeyLabel