saladday1 FordTang commited on
Commit
c5ddbc9
·
1 Parent(s): 16eb981

Fix white and black startup flashes with a brand gradient (#1)

Browse files

- Fix white and black startup flashes with a brand gradient (b4aba1161ef9d93a684662dd84c8c4afc8606173)
- Use the startup gradient while site data loads (563f50f25c30ee12ac5d14067371f4a56bfe6a92)
- Keep a gradient behind the hero video and poster (539ad1cd794287ed5dd87921dd8667bb54b37b13)


Co-authored-by: jiemu <FordTang@users.noreply.huggingface.co>

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>
code/web/src/App.tsx CHANGED
@@ -22,7 +22,7 @@ export default function App() {
22
  }, [route.cat, lang])
23
 
24
  if (failed) return <p className="p-10 text-lg">{T.noData}</p>
25
- if (!site) return <div className="dark stage min-h-screen" />
26
  // A new language draws the page afresh, so nothing keeps copy from the old one.
27
  return (
28
  <Fragment key={lang}>
 
22
  }, [route.cat, lang])
23
 
24
  if (failed) return <p className="p-10 text-lg">{T.noData}</p>
25
+ if (!site) return <div className="brand-backdrop startup-screen" aria-busy="true" aria-label={T.site} />
26
  // A new language draws the page afresh, so nothing keeps copy from the old one.
27
  return (
28
  <Fragment key={lang}>
code/web/src/components/media.tsx CHANGED
@@ -16,7 +16,7 @@ export function HeroVideo({ cat }: { cat: string }) {
16
  useLoop(ref)
17
  const m = media("hero", cat)
18
  return (
19
- <div aria-hidden className="pointer-events-none absolute inset-x-0 top-0 -z-10 h-[clamp(820px,104vw,1500px)] overflow-hidden">
20
  <video ref={ref} key={cat} src={m.src} poster={m.poster} muted loop playsInline preload="auto"
21
  className="size-full object-cover object-top" />
22
  {/* the footage ends a shade off white; this closes the seam */}
 
16
  useLoop(ref)
17
  const m = media("hero", cat)
18
  return (
19
+ <div aria-hidden className="brand-backdrop pointer-events-none absolute inset-x-0 top-0 -z-10 h-[clamp(820px,104vw,1500px)] overflow-hidden">
20
  <video ref={ref} key={cat} src={m.src} poster={m.poster} muted loop playsInline preload="auto"
21
  className="size-full object-cover object-top" />
22
  {/* the footage ends a shade off white; this closes the seam */}