Ajout squelette HTML
This commit is contained in:
parent
1f4cfe0b77
commit
ff85c8bd51
36
client/app/+html.tsx
Normal file
36
client/app/+html.tsx
Normal file
@ -0,0 +1,36 @@
|
||||
import Head from 'expo-router/head'
|
||||
import { ScrollViewStyleReset } from 'expo-router/html'
|
||||
import React from 'react'
|
||||
|
||||
export default function Root({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<Head>
|
||||
<title>Traintrape-moi</title>
|
||||
</Head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, shrink-to-fit=no"
|
||||
/>
|
||||
<title>Traintrape-moi</title>
|
||||
<ScrollViewStyleReset />
|
||||
|
||||
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
|
||||
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
|
||||
</head>
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
||||
const responsiveBackground = `
|
||||
body {
|
||||
background-color: #fff;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
background-color: #000;
|
||||
}
|
||||
}`
|
Loading…
Reference in New Issue
Block a user