Update Background Image
Dynamic background dependant on current theme
This commit is contained in:
parent
fd5e8fc200
commit
a80d1e3fc4
@ -1,8 +1,11 @@
|
|||||||
import type {NextPage} from 'next';
|
import type {NextPage} from 'next';
|
||||||
import Image from "next/image";
|
import Image from "next/future/image";
|
||||||
import NavBar from "../components/navbar";
|
import NavBar from "../components/navbar";
|
||||||
import {Footer} from "../components/footer"
|
import {Footer} from "../components/footer"
|
||||||
|
|
||||||
|
import splashDark from "../public/splashDarkFinal.jpg"
|
||||||
|
import splashLight from "../public/splashLightFinal.jpg"
|
||||||
|
|
||||||
const Home: NextPage = () => {
|
const Home: NextPage = () => {
|
||||||
return (
|
return (
|
||||||
<div className="">
|
<div className="">
|
||||||
@ -11,14 +14,8 @@ const Home: NextPage = () => {
|
|||||||
<main className="">
|
<main className="">
|
||||||
{/* MAIN BANNER SECTION BELOW */}
|
{/* MAIN BANNER SECTION BELOW */}
|
||||||
<div className="container relative min-w-full min-h-screen flex flex-col items-center py-12">
|
<div className="container relative min-w-full min-h-screen flex flex-col items-center py-12">
|
||||||
<Image
|
<div className="dark:block hidden"><Image className="flex-shrink-0 h-full w-auto" src={splashDark}/></div>
|
||||||
className=""
|
<div className="dark:hidden block"><Image className="flex-shrink-0 h-full w-auto" src={splashLight}/></div>
|
||||||
src="/splashDarkFinal.jpg"
|
|
||||||
alt="Dark background splash screen"
|
|
||||||
layout="fill"
|
|
||||||
quality="100"
|
|
||||||
priority
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
{/* <div className="w-full mt-8 relat" */}
|
{/* <div className="w-full mt-8 relat" */}
|
||||||
</main>
|
</main>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
purge: [],
|
||||||
darkMode: "class",
|
darkMode: "class",
|
||||||
content: [
|
content: [
|
||||||
"./pages/**/*.{js,ts,jsx,tsx}",
|
"./pages/**/*.{js,ts,jsx,tsx}",
|
||||||
@ -25,11 +26,13 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
display: ['dark'],
|
display: ['dark'],
|
||||||
backgroundImage: {
|
|
||||||
'splashDark': "url('/splashDarkFinal.jpg')",
|
|
||||||
'splashLight': "url('/splashLightFinal.jpg')",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
variants: {
|
||||||
|
extend: {
|
||||||
|
backgroundImage: ['dark'],
|
||||||
|
display: ['dark'],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
require("daisyui")
|
require("daisyui")
|
||||||
|
Loading…
Reference in New Issue
Block a user