FordTang commited on
Commit
b4aba11
·
verified ·
1 Parent(s): 16eb981

Fix white and black startup flashes with a brand gradient

Browse files

The page can show an empty white screen before React starts, then a black screen while data/site.json loads. It can also lose its hero background while the video and poster are unavailable.

Use a shared 135-degree gradient from #FF276F to #FF7038 for the initial HTML placeholder, the React data-loading state, and the background behind HeroVideo. Keep the existing media, white fade, and data-error messages.

Validation: npm run build and npm run lint passed (lint reports existing warnings). Verified the production build in Chrome 158 and standalone WebKit 26.4 at widths 390, 639, 640, and 1440: delayed JavaScript, delayed data, blocked media, data recovery, English/Chinese errors, direct category navigation, normal media loading, and the model menu. No horizontal overflow in these scenarios. WebKit coverage is an independent engine run, not a physical iPhone test.

After merging, rebuild and publish the Space with the existing scripts/deploy_space.py workflow. If code/ is synchronized from another source repository, carry the change there as well so a later sync preserves it.

Files changed (1) hide show
  1. code/web/index.html +9 -1
code/web/index.html CHANGED
@@ -6,13 +6,21 @@
6
  <title>MiniMax Ecosystem</title>
7
  <meta name="description" content="Community models built on MiniMax open models, updated daily." />
8
  <meta name="theme-color" content="#181E25" />
 
 
 
 
 
 
9
  <!-- minimax.io's favicon (as on its H3 Family page), with a vector copy for sharp screens -->
10
  <link rel="icon" href="/favicon.ico" sizes="32x32" />
11
  <link rel="icon" href="/icon.svg" type="image/svg+xml" />
12
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
13
  </head>
14
  <body>
15
- <div id="root"></div>
 
 
16
  <script type="module" src="/src/main.tsx"></script>
17
  </body>
18
  </html>
 
6
  <title>MiniMax Ecosystem</title>
7
  <meta name="description" content="Community models built on MiniMax open models, updated daily." />
8
  <meta name="theme-color" content="#181E25" />
9
+ <!-- Keep the startup background available before the application bundle loads. -->
10
+ <style>
11
+ body { margin: 0; }
12
+ .brand-backdrop { background: #FF276F; background: linear-gradient(135deg, #FF276F, #FF7038); }
13
+ .startup-screen { min-height: 100vh; min-height: 100svh; }
14
+ </style>
15
  <!-- minimax.io's favicon (as on its H3 Family page), with a vector copy for sharp screens -->
16
  <link rel="icon" href="/favicon.ico" sizes="32x32" />
17
  <link rel="icon" href="/icon.svg" type="image/svg+xml" />
18
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
19
  </head>
20
  <body>
21
+ <div id="root">
22
+ <div class="brand-backdrop startup-screen" aria-busy="true" aria-label="MiniMax Ecosystem"></div>
23
+ </div>
24
  <script type="module" src="/src/main.tsx"></script>
25
  </body>
26
  </html>