fix mobile screen view issue

This commit is contained in:
2026-08-03 11:27:21 +05:30
parent 6e3f49bb94
commit 65ea0640f8
5 changed files with 117 additions and 35 deletions

View File

@@ -83,9 +83,12 @@ const CSS = `
--pc-red-bright: #E2354A; --pc-red-bright: #E2354A;
position: relative; position: relative;
display: flex; align-items: center; justify-content: center; display: flex; align-items: center; justify-content: center;
padding: 0; padding: 20px 0;
margin: 0; margin: 0;
overflow: visible; width: 100%;
max-width: 100%;
overflow: hidden;
box-sizing: border-box;
} }
#dcount-root, #dcount-root * { font-family: var(--font-manrope), "Manrope", sans-serif; box-sizing: border-box; } #dcount-root, #dcount-root * { font-family: var(--font-manrope), "Manrope", sans-serif; box-sizing: border-box; }
@@ -102,17 +105,21 @@ const CSS = `
#dcount-root .dc-fig { #dcount-root .dc-fig {
position: relative; z-index: 1; position: relative; z-index: 1;
display: inline-flex; align-items: center; justify-content: center; gap: clamp(14px, 1.8vw, 30px); display: inline-flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 30px);
max-width: 100%;
box-sizing: border-box;
padding: 0 12px;
} }
/* Big outlined numeral, red stroke, transparent fill */ /* Big outlined numeral, red stroke, transparent fill */
#dcount-root .dc-num { #dcount-root .dc-num {
color: transparent; color: transparent;
-webkit-text-stroke: 2px var(--pc-red-bright); -webkit-text-stroke: 2px var(--pc-red-bright);
font-size: clamp(58px, 12.5vw, 200px); font-size: clamp(52px, 11vw, 180px);
font-weight: 500; line-height: 0.92; letter-spacing: -0.01em; font-weight: 500; line-height: 0.95; letter-spacing: -0.015em;
font-variant-numeric: tabular-nums; white-space: nowrap; font-variant-numeric: tabular-nums; white-space: nowrap;
text-shadow: 0 0 40px rgba(226,53,74,0.18); text-shadow: 0 0 40px rgba(226,53,74,0.18);
max-width: 100%;
} }
/* Firefox/older engines without text-stroke: fall back to a faint red fill so /* Firefox/older engines without text-stroke: fall back to a faint red fill so
the number never disappears. */ the number never disappears. */
@@ -135,9 +142,41 @@ const CSS = `
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
} }
@media (max-width: 639px) { @media (max-width: 1024px) {
#dcount-root .dc-num { font-size: clamp(40px, 9vw, 110px); -webkit-text-stroke-width: 1.8px; }
}
@media (max-width: 600px) {
#dcount-root { padding: 24px 0 20px; } #dcount-root { padding: 24px 0 20px; }
#dcount-root .dc-num { -webkit-text-stroke-width: 1.5px; } #dcount-root .dc-fig {
#dcount-root .dc-fig { gap: 12px; } flex-direction: column;
align-items: center;
gap: 8px;
padding: 0 10px;
}
#dcount-root .dc-num {
font-size: clamp(30px, 8.8vw, 48px);
-webkit-text-stroke-width: 1.5px;
letter-spacing: -0.02em;
text-align: center;
}
#dcount-root .dc-label {
writing-mode: horizontal-tb;
transform: none;
flex-direction: row;
justify-content: center;
gap: 6px;
padding-bottom: 0;
}
#dcount-root .dc-label b { font-size: 12.5px; opacity: 0.95; }
#dcount-root .dc-label i { font-size: 11.5px; opacity: 0.65; }
#dcount-root .dc-label i::before { content: "·"; margin-right: 6px; color: rgba(226,53,74,0.8); }
}
@media (max-width: 360px) {
#dcount-root .dc-num {
font-size: clamp(26px, 8.2vw, 36px);
-webkit-text-stroke-width: 1.3px;
}
} }
`; `;

View File

@@ -1073,11 +1073,11 @@ export default function EVSection({
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px;
align-items: center; align-items: center;
justify-content: center; justify-content: flex-start;
text-align: center; text-align: center;
padding: 12px 24px; padding: 16px 20px;
box-sizing: border-box;
} }
.evnd__bar-item:not(:last-child)::after { .evnd__bar-item:not(:last-child)::after {
content: ''; content: '';
@@ -1089,27 +1089,42 @@ export default function EVSection({
background: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.08);
} }
.evnd__bar-val {
color: #ef4444 !important;
font-weight: 800;
font-size: clamp(32px, 4vw, 56px);
line-height: 1;
}
.evnd__bar-label { .evnd__bar-label {
color: #fff !important; color: #fff !important;
font-size: 14px; font-size: 13.5px;
font-weight: 600; font-weight: 600;
letter-spacing: 0.02em; letter-spacing: 0.02em;
text-transform: none; text-transform: none;
opacity: 0.9; opacity: 0.9;
display: flex;
align-items: flex-end;
justify-content: center;
min-height: 36px;
text-align: center;
line-height: 1.25;
width: 100%;
}
.evnd__bar-val {
color: #ef4444 !important;
font-weight: 800;
font-size: clamp(30px, 3.8vw, 52px);
line-height: 1.15;
display: flex;
align-items: flex-start;
justify-content: center;
text-align: center;
margin-top: 8px;
width: 100%;
} }
/* Non-numeric bar values (EVStat.text) — the bar's numeric clamp() /* Non-numeric bar values (EVStat.text) — the bar's numeric clamp()
(up to 56px) is too large for words/phrases; size down and let (up to 56px) is too large for words/phrases; size down and let
longer phrases (e.g. "Cost + Distance + SLA") wrap cleanly. */ longer phrases (e.g. "Cost + Distance + SLA") wrap cleanly. */
.evnd__bar-val--text { .evnd__bar-val--text {
font-size: clamp(16px, 1.8vw, 22px); font-size: clamp(15px, 2vw, 22px);
line-height: 1.25; line-height: 1.25;
white-space: normal; white-space: normal;
word-break: break-word;
overflow-wrap: break-word;
} }
@keyframes evndGlow { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } } @keyframes evndGlow { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } }
@@ -1157,20 +1172,27 @@ export default function EVSection({
} }
.evnd__bar { .evnd__bar {
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 24px 0; gap: 0;
width: calc(100% - 8px); width: calc(100% - 8px);
max-width: calc(100% - 8px); max-width: calc(100% - 8px);
margin: 32px auto 0; margin: 28px auto 0;
padding: 24px 0; padding: 12px 0;
box-sizing: border-box; box-sizing: border-box;
} }
.evnd.evnd--cards { .evnd.evnd--cards {
padding-bottom: 20px; padding-bottom: 20px;
margin-bottom: 0; margin-bottom: 0;
} }
.evnd__bar-item:nth-child(even)::after { display: none; } .evnd__bar-item {
.evnd__bar-item:nth-child(2)::after { display: none; } padding: 16px 12px;
.evnd__bar-item { padding: 12px 16px; } border-right: 1px solid rgba(255, 255, 255, 0.08);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.evnd__bar-item::after { display: none !important; }
.evnd__bar-item:nth-child(even) { border-right: none; }
.evnd__bar-item:nth-child(n+3) { border-bottom: none; }
.evnd__bar-label { min-height: 32px; font-size: 12.5px; }
.evnd__bar-val--text { font-size: clamp(14px, 3.8vw, 18px); }
/* ---- Scene overlay cleanup (mobile) ---- /* ---- Scene overlay cleanup (mobile) ----
Keep only the primary top-left KPI badge; the second (bottom-right) Keep only the primary top-left KPI badge; the second (bottom-right)
@@ -1248,10 +1270,10 @@ export default function EVSection({
@media (max-width: 480px) { @media (max-width: 480px) {
.evnd { padding: 40px 16px 48px; } .evnd { padding: 40px 16px 48px; }
.evnd { padding-inline: 0; } .evnd { padding-inline: 0; }
.evnd__bar { grid-template-columns: repeat(2, 1fr); gap: 18px 0; padding: 22px 0; } .evnd__bar { grid-template-columns: repeat(2, 1fr); gap: 0; padding: 8px 0; }
.evnd__bar-item { padding: 10px 12px; gap: 8px; } .evnd__bar-item { padding: 14px 10px; }
.evnd__bar-val { font-size: clamp(26px, 9vw, 34px); } .evnd__bar-val { font-size: clamp(22px, 7vw, 30px); }
.evnd__bar-label { font-size: 12.5px; } .evnd__bar-label { font-size: 12px; min-height: 32px; }
/* feature cards (homepage): tighter, no overflow, more room for text */ /* feature cards (homepage): tighter, no overflow, more room for text */
.evnd-feature { .evnd-feature {

View File

@@ -200,6 +200,9 @@ export default function Miles3({
justify-content: flex-start; justify-content: flex-start;
width: 100%; width: 100%;
min-width: 0; min-width: 0;
max-width: 100%;
overflow: hidden;
box-sizing: border-box;
align-self: stretch; align-self: stretch;
margin-top: 28px; margin-top: 28px;
padding-bottom: clamp(60px, 6vw, 90px); padding-bottom: clamp(60px, 6vw, 90px);

View File

@@ -2551,10 +2551,10 @@ const CSS = `
#sol-root .sol-kpi-lbl { color: rgba(255,255,255,0.45); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; } #sol-root .sol-kpi-lbl { color: rgba(255,255,255,0.45); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
#sol-root .sol-bar { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,0.02); border: 1px solid var(--sol-line); border-radius: 16px; overflow: hidden; margin-top: 28px; } #sol-root .sol-bar { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,0.02); border: 1px solid var(--sol-line); border-radius: 16px; overflow: hidden; margin-top: 28px; }
#sol-root .sol-bar-item { padding: 18px 20px; border-right: 1px solid var(--sol-line); display: flex; flex-direction: column; gap: 6px; } #sol-root .sol-bar-item { padding: 18px 20px; border-right: 1px solid var(--sol-line); display: flex; flex-direction: column; justify-content: flex-start; align-items: center; text-align: center; }
#sol-root .sol-bar-item:last-child { border-right: 0; } #sol-root .sol-bar-item:last-child { border-right: 0; }
#sol-root .sol-bar-lbl { color: rgba(255,255,255,0.42); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; } #sol-root .sol-bar-lbl { color: rgba(255,255,255,0.42); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: flex-end; justify-content: center; min-height: 28px; text-align: center; }
#sol-root .sol-bar-val { color: #fff; font-size: clamp(20px, 2vw, 26px); font-weight: 800; letter-spacing: -0.01em; } #sol-root .sol-bar-val { color: #fff; font-size: clamp(20px, 2vw, 26px); font-weight: 800; letter-spacing: -0.01em; margin-top: 6px; display: flex; align-items: flex-start; justify-content: center; text-align: center; }
#sol-root .sol-media { position: relative; } #sol-root .sol-media { position: relative; }
#sol-root .sol-media-glow { position: absolute; inset: -12% -8% 6%; border-radius: 50%; background: radial-gradient(circle, rgba(226,53,74,0.28), transparent 68%); filter: blur(18px); z-index: 0; pointer-events: none; } #sol-root .sol-media-glow { position: absolute; inset: -12% -8% 6%; border-radius: 50%; background: radial-gradient(circle, rgba(226,53,74,0.28), transparent 68%); filter: blur(18px); z-index: 0; pointer-events: none; }

View File

@@ -3634,6 +3634,8 @@ div#sw-root section#quantum p.sw-lede,
#sw-root .sw-split, #sw-root .sw-split--reverse { grid-template-columns: 1fr; gap: 32px; } #sw-root .sw-split, #sw-root .sw-split--reverse { grid-template-columns: 1fr; gap: 32px; }
#sw-root .sw-split--reverse .sw-mt-canvas-col { order: -1; } #sw-root .sw-split--reverse .sw-mt-canvas-col { order: -1; }
#sw-root .sw-veh-stage { order: -1; } #sw-root .sw-veh-stage { order: -1; }
#sw-root .sw-dash-body { grid-template-columns: 1fr; }
#sw-root .sw-dash-panel--wide, #sw-root .sw-dash-panel--fleet { grid-column: span 1 !important; }
} }
@media (max-width: 767px) { @media (max-width: 767px) {
#sw-root { margin-bottom: 24px; --sw-in-pad: 16px; } #sw-root { margin-bottom: 24px; --sw-in-pad: 16px; }
@@ -3641,9 +3643,18 @@ div#sw-root section#quantum p.sw-lede,
#sw-root .sw-panel, #sw-root .sw-edge, #sw-root .sw-ade, #sw-root .sw-veh-stage, #sw-root .sw-bg { border-radius: 20px; } #sw-root .sw-panel, #sw-root .sw-edge, #sw-root .sw-ade, #sw-root .sw-veh-stage, #sw-root .sw-bg { border-radius: 20px; }
#sw-root .sw-panel { padding: 16px; } #sw-root .sw-panel { padding: 16px; }
#sw-root .sw-ade { padding: 16px; } #sw-root .sw-ade { padding: 16px; }
#sw-root .sw-dash-kpis, #sw-root .sw-veh-row { gap: 10px; } #sw-root .sw-dash { overflow: hidden; width: 100%; max-width: 100%; box-sizing: border-box; }
#sw-root .sw-dash-body { grid-template-columns: 1fr; } #sw-root .sw-dash-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
#sw-root .sw-dash-panel--wide { grid-column: span 1; } #sw-root .sw-kpi-tile { padding: 12px 14px; gap: 4px; }
#sw-root .sw-kpi-val { font-size: clamp(18px, 4.5vw, 24px); }
#sw-root .sw-kpi-label { font-size: 11px; }
#sw-root .sw-dash-body { grid-template-columns: 1fr !important; gap: 12px; }
#sw-root .sw-dash-panel, #sw-root .sw-dash-panel--wide, #sw-root .sw-dash-panel--fleet { grid-column: span 1 !important; padding: 16px 14px; gap: 14px; max-width: 100%; box-sizing: border-box; overflow: hidden; }
#sw-root .sw-bars { gap: 6px; max-width: 100%; }
#sw-root .sw-fleet-row { grid-template-columns: 8px 1fr auto auto; gap: 6px; font-size: 11.5px; }
#sw-root .sw-fleet-id, #sw-root .sw-fleet-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sw-root .sw-fleet-eta { white-space: nowrap; }
#sw-root .sw-feed-row { font-size: 12px; padding: 8px 10px; max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sw-root .sw-h { font-size: clamp(26px, 8vw, 34px) !important; } #sw-root .sw-h { font-size: clamp(26px, 8vw, 34px) !important; }
#sw-root .sw-lede { max-width: none; } #sw-root .sw-lede { max-width: none; }
/* The map fills via object-fit:cover, so the phone can keep realistic /* The map fills via object-fit:cover, so the phone can keep realistic
@@ -3654,6 +3665,13 @@ div#sw-root section#quantum p.sw-lede,
@media (max-width: 640px) { @media (max-width: 640px) {
#sw-root .sw-mt-canvas { height: clamp(300px, 62vw, 380px); } #sw-root .sw-mt-canvas { height: clamp(300px, 62vw, 380px); }
} }
@media (max-width: 480px) {
#sw-root .sw-dash-chrome { flex-wrap: wrap; gap: 6px; padding-bottom: 12px; margin-bottom: 16px; }
#sw-root .sw-dash-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
#sw-root .sw-kpi-tile { padding: 10px 12px; }
#sw-root .sw-ring-wrap { width: 108px; height: 108px; }
#sw-root .sw-heat { gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { @media (prefers-reduced-motion: reduce) {
#sw-root .sw-jnode-hero-ring, #sw-root .sw-livedot, #sw-root .sw-phone-badge-dot, #sw-root .sw-ade-livedot { animation: none !important; } #sw-root .sw-jnode-hero-ring, #sw-root .sw-livedot, #sw-root .sw-phone-badge-dot, #sw-root .sw-ade-livedot { animation: none !important; }
} }