Lee Morgan 6 місяців тому
батько
коміт
42184720d7
1 змінених файлів з 36 додано та 30 видалено
  1. 36 30
      index.css

+ 36 - 30
index.css

@@ -1,8 +1,8 @@
 /* =========
    Dark TV Dashboard Theme (4K, grid-hardened, NO media queries)
-   Updated to:
-   - show more than just "Sunny" (allow 2-line wrap for condition text)
-   - show the full table (tighter row heights + fonts)
+   Updated:
+   - Current weather: guaranteed fit (tighter spacing + weather block uses grid rows)
+   - Radar: no cropping (object-fit: contain + subtle background)
    ========= */
 
 :root{
@@ -26,10 +26,10 @@
   --time-size: clamp(40px, 2.55vh, 62px);
   --date-size: clamp(16px, 1.25vh, 22px);
 
-  --h2-size: clamp(15px, 1.10vh, 19px);
-  --cond-size: clamp(17px, 1.35vh, 22px);
+  --h2-size: clamp(15px, 1.05vh, 19px);
+  --cond-size: clamp(16px, 1.25vh, 21px);
 
-  --info-size: clamp(13px, 1.10vh, 18px);
+  --info-size: clamp(12px, 1.00vh, 17px);
 
   --table-head: clamp(12px, 1.00vh, 15px);
   --table-cell: clamp(12px, 1.05vh, 16px);
@@ -135,7 +135,7 @@ body{
   white-space: nowrap;
 }
 
-/* Weather block */
+/* Weather container */
 .weather{
   flex: 1 1 auto;
   min-width: 0;
@@ -143,6 +143,7 @@ body{
   display:flex;
 }
 
+/* Weather block: use grid rows so content *must* fit the tile */
 .weatherBlock{
   flex: 1 1 auto;
   min-width: 0;
@@ -155,8 +156,8 @@ body{
     rgba(0,0,0,0.18);
   border: 1px solid rgba(255,255,255,0.08);
 
-  display:flex;
-  flex-direction:column;
+  display:grid;
+  grid-template-rows: auto auto minmax(0, 1fr);
   gap: 8px;
 }
 
@@ -165,7 +166,6 @@ body{
   font-size: var(--h2-size);
   font-weight: 820;
   letter-spacing: 0.5px;
-
   display:flex;
   align-items:center;
   gap: 10px;
@@ -180,7 +180,7 @@ body{
   box-shadow: 0 0 18px rgba(76,201,240,0.35);
 }
 
-/* Condition row (allow 2-line wrap so you see more than "Sunny") */
+/* Condition row (2-line clamp) */
 .condition{
   display:flex;
   align-items:center;
@@ -195,8 +195,8 @@ body{
 }
 
 .condition img{
-  width: clamp(38px, 2.4vh, 52px);
-  height: clamp(38px, 2.4vh, 52px);
+  width: clamp(34px, 2.2vh, 48px);
+  height: clamp(34px, 2.2vh, 48px);
   object-fit: contain;
   filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45));
   flex: 0 0 auto;
@@ -211,33 +211,35 @@ body{
 
   min-width: 0;
 
-  /* 2-line clamp */
   display: -webkit-box;
   -webkit-box-orient: vertical;
   -webkit-line-clamp: 2;
   overflow: hidden;
-  line-height: 1.15;
+  line-height: 1.12;
 }
 
-/* Weather info list (tighter) */
+/* Weather info list: set to stretch and shrink safely inside remaining space */
 .weatherInfo{
+  min-width: 0;
+  min-height: 0;
+
   display:grid;
   grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
+  grid-auto-rows: 1fr;           /* forces the 4 cells to share available height */
   gap: 8px 10px;
-
-  min-width: 0;
-  min-height: 0;
+  align-content: stretch;
 }
 
 .weatherInfo p{
   margin:0;
-  padding: 8px 10px;
+  padding: 7px 10px;             /* tightened to prevent bottom clipping */
   border-radius: 14px;
 
   background: rgba(255,255,255,0.035);
   border: 1px solid rgba(255,255,255,0.06);
 
   font-size: var(--info-size);
+  line-height: 1.08;
   color: var(--muted);
 
   display:flex;
@@ -245,6 +247,8 @@ body{
   justify-content:space-between;
 
   min-width: 0;
+  min-height: 0;
+
   overflow:hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
@@ -256,7 +260,7 @@ body{
 }
 
 /* =========
-   Top Right: Radar Image
+   Top Right: Radar Image (NO CROP)
    ========= */
 .topRight{
   padding: 12px;
@@ -272,11 +276,18 @@ body{
 #radar{
   width:100%;
   height:100%;
-  object-fit: cover;
+
+  /* Key change: show the whole radar without cropping */
+  object-fit: contain;
+  object-position: center;
+
   border-radius: calc(var(--radius) - 6px);
   border: 1px solid rgba(255,255,255,0.08);
   box-shadow: 0 14px 40px rgba(0,0,0,0.45);
-  filter: contrast(1.04) saturate(1.05);
+
+  /* If the gif has transparency or odd edges, this makes letterboxing look intentional */
+  background: rgba(0,0,0,0.22);
+
   display:block;
 }
 
@@ -298,7 +309,7 @@ body{
 }
 
 /* =========
-   Bottom Left: Forecast Table (shrink rows so you see Sunset)
+   Bottom Left: Forecast Table (already tightened)
    ========= */
 .bottomLeft{
   padding: 12px;
@@ -318,10 +329,9 @@ table{
   background: rgba(0,0,0,0.18);
   border: 1px solid rgba(255,255,255,0.08);
 
-  table-layout: fixed; /* critical */
+  table-layout: fixed;
 }
 
-/* Header tighter */
 thead th{
   padding: 8px 8px;
   font-size: var(--table-head);
@@ -339,7 +349,6 @@ thead th{
   white-space: nowrap;
 }
 
-/* Body rows tighter (this is what reveals the Sunset row) */
 tbody td{
   padding: 6px 8px;
   font-size: var(--table-cell);
@@ -353,7 +362,6 @@ tbody td{
   white-space: nowrap;
 }
 
-/* Left labels */
 tbody td:first-child{
   width: 44%;
   color: rgba(255,255,255,0.88);
@@ -364,13 +372,11 @@ tbody td:first-child{
   border-right: 1px solid rgba(255,255,255,0.06);
 }
 
-/* Center the forecast values */
 tbody td:not(:first-child),
 thead th:not(:first-child){
   text-align:center;
 }
 
-/* Zebra rows */
 tbody tr:nth-child(odd) td{ background: rgba(255,255,255,0.018); }
 tbody tr:nth-child(even) td{ background: rgba(255,255,255,0.028); }
 tbody tr:nth-child(odd) td:first-child{ background: rgba(255,255,255,0.040); }