Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.2 kB
1
Indexable
Never
Mon component
import Navbar from './components/Navbar';
import './globals.css'
import Image from 'next/image';


export default function RootLayout({ children }) {
  return (
    <html lang="en">
    <Navbar/>
    <div
      className="bg-cover bg-center h-screen"
      style={{
        backgroundImage: `url('https://i.ibb.co/6DXnSLz/gprz.jpg')`,
      }}
      >
      </div>
 
      {children}
    </html>
  )
}


Ma page
import Link from 'next/link'
import styles from './page.module.css'
import Image from 'next/image';
import Navbar from './components/Navbar';
export default function Home() {
  return (
    <div className='py-10 px-10 mx-0 min-w-full flex flex-col items-center'>
      <button className="btn btn-primary pl-20">Primary</button>

    </div>
  );

}

Mon layout sur toute les pages ou l'image de fond saffiche
import Navbar from './components/Navbar';
import './globals.css'
import Image from 'next/image';


export default function RootLayout({ children }) {
  return (
    <html lang="en">
    <Navbar/>
    <div
      className="bg-cover bg-center h-screen"
      style={{
        backgroundImage: `url('https://i.ibb.co/6DXnSLz/gprz.jpg')`,
      }}
      >
      </div>
 
      {children}
    </html>
  )
}