mirror of
https://github.com/supabase/supabase.git
synced 2026-09-09 19:42:46 +08:00
### Logo positioning bug on Safari #### Before <img width="1538" height="1404" alt="CleanShot 2026-07-01 at 07 11 55@2x_b0d735b7df6470afb861f4e82cfeed554743cec621475197e07ff39a98c5c506" src="https://github.com/user-attachments/assets/dc8483bd-5a2a-4d89-9b90-d0ab3529b4b5" /> #### After <img width="1177" height="526" alt="Screenshot 2026-07-01 at 15 25 59" src="https://github.com/user-attachments/assets/e5ab66eb-56eb-4f1b-8a66-783aafad069d" /> ### Uniform h1 styling #### Before Font-weight too heavy <img width="721" height="504" alt="Screenshot 2026-07-01 at 15 55 53" src="https://github.com/user-attachments/assets/4dc4e157-f746-4626-9ec7-5e893d7155ba" /> #### After <img width="693" height="410" alt="Screenshot 2026-07-01 at 15 56 04" src="https://github.com/user-attachments/assets/c012d6e5-0889-4466-b2b2-56d1c9516e27" /> ### AI Builders platform card ### Before <img width="675" height="573" alt="Screenshot 2026-07-01 at 16 18 31" src="https://github.com/user-attachments/assets/a34e2fde-115b-45e8-8d44-9fc32c22c0a1" /> ### After <img width="640" height="576" alt="Screenshot 2026-07-01 at 16 18 23" src="https://github.com/user-attachments/assets/45ebf1c7-6508-40de-a755-dda17824979a" /> ### Logo theme-awareness on 404 page #### Before <img width="1053" height="670" alt="Screenshot 2026-07-02 at 11 22 45" src="https://github.com/user-attachments/assets/d1f45cc8-00ad-48ad-a21a-3b92bf6097f0" /> #### After <img width="1053" height="666" alt="Screenshot 2026-07-02 at 11 22 28" src="https://github.com/user-attachments/assets/8b6435aa-da87-46f3-9d5c-750f8222edb1" /> --- Plus other minor padding/spacing issues: - remove customer stories in homepage - use correct container width and align "Use Supabase with [framework]" section - restore default `--font-sm` sizing as it resulted too small for www <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes / UI Improvements** * Refined spacing, layout, and responsive styling across multiple homepage sections. * Improved featured logo positioning and adjusted community/hero copy sizing. * Updated site typography for better readability and wrapping. * Refreshed the 404 experience with a smoother reveal animation and consistent layout. * Updated deep dark-mode behavior to apply only during launch weeks. * **Performance** * Lazy-loaded multiple homepage sections to improve initial load and perceived speed. * **SEO / New Features** * Added a dedicated 404 page that disables indexing. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
'use client'
|
|
|
|
import { useRouter } from 'next/compat/router'
|
|
import { useEffect } from 'react'
|
|
|
|
import useDarkLaunchWeeks from '../hooks/useDarkLaunchWeeks'
|
|
|
|
export function useForceDeepDark() {
|
|
const router = useRouter()
|
|
const forceDarkMode = useDarkLaunchWeeks()
|
|
|
|
// next-themes already sets `data-theme`/`color-scheme` correctly and
|
|
// synchronously for the resolved theme. This hook only needs to step in
|
|
// to force dark mode during launch weeks, regardless of the user's theme.
|
|
useEffect(() => {
|
|
if (!forceDarkMode) return
|
|
|
|
const handleDocumentLoad = () => {
|
|
document.documentElement.setAttribute('data-theme', 'dark')
|
|
document.documentElement.style.colorScheme = 'dark'
|
|
|
|
// Clean up the event listener
|
|
window.removeEventListener('load', handleDocumentLoad)
|
|
}
|
|
|
|
// Check if document is already loaded
|
|
if (document.readyState === 'complete') {
|
|
handleDocumentLoad()
|
|
} else {
|
|
// Add a global load event listener
|
|
window.addEventListener('load', handleDocumentLoad)
|
|
}
|
|
|
|
// Clean up the event listener on component unmount
|
|
return () => {
|
|
window.removeEventListener('load', handleDocumentLoad)
|
|
}
|
|
}, [forceDarkMode, router])
|
|
}
|