Keep dashboard tables inside their cards
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f5d8ca7484
commit
8fe8314d5a
4 files changed
+42
-11
No files matched your search
@@ -44,7 +44,7 @@
|
||||
else
|
||||
{
|
||||
<div class="scroll">
|
||||
<table>
|
||||
<table class="recent-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zeit</th>
|
||||
|
||||
@@ -7,7 +7,12 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table>
|
||||
<table class="top-table">
|
||||
<colgroup>
|
||||
<col />
|
||||
<col class="count" />
|
||||
<col class="hold" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>@KeyLabel</th>
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user