making background custom based on layout
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
export default function BackgroundLayout({ children }) {
|
||||||
|
return (
|
||||||
|
<div id="bg">
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import Head from "next/head"
|
import Head from "next/head"
|
||||||
|
|
||||||
export default function Layout({ children }) {
|
export default function SiteLayout({ children }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import Image from 'next/image';
|
|||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className='container m-20'>
|
||||||
<main className="space-y-10">
|
<main className="space-y-10">
|
||||||
<p id="main-title">nirvana</p>
|
<p id="main-title">nirvana</p>
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import { BsThreeDots } from "react-icons/bs";
|
|||||||
import { UserStatus, User } from '../../models/user'
|
import { UserStatus, User } from '../../models/user'
|
||||||
import { KeyCode } from '../../globals/keycode'
|
import { KeyCode } from '../../globals/keycode'
|
||||||
|
|
||||||
|
import BackgroundLayout from '../../components/Layouts/BackgroundLayout'
|
||||||
|
|
||||||
let testFriends = [
|
let testFriends = [
|
||||||
{
|
{
|
||||||
name: "Liam",
|
name: "Liam",
|
||||||
@@ -163,7 +165,7 @@ export default class Demo extends React.Component<{ }, MyState> {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<>
|
<BackgroundLayout>
|
||||||
<div className="container mx-auto max-w-screen-xl py-10 flex flex-col space-y-5">
|
<div className="container mx-auto max-w-screen-xl py-10 flex flex-col space-y-5">
|
||||||
{/* header content */}
|
{/* header content */}
|
||||||
<section className="flex-1 flex flex-row items-center justify-between py-5">
|
<section className="flex-1 flex flex-row items-center justify-between py-5">
|
||||||
@@ -846,7 +848,7 @@ export default class Demo extends React.Component<{ }, MyState> {
|
|||||||
</span>
|
</span>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</BackgroundLayout>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* wrapper for authentication for the future for each individual component
|
||||||
|
*/
|
||||||
|
|
||||||
export function requireAuthentication(gssp) {
|
export function requireAuthentication(gssp) {
|
||||||
return async (context) => {
|
return async (context) => {
|
||||||
const { req, res } = context;
|
const { req, res } = context;
|
||||||
|
|||||||
+4
-1
@@ -16,12 +16,15 @@ a {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* my personal css */
|
/* my personal css */
|
||||||
|
body {
|
||||||
|
@apply bg-slate-100 !important;
|
||||||
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
font-family: "Poppins", sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
bg {
|
#bg {
|
||||||
background: url("/wallpapers/dark-mountains.jpg") no-repeat center center
|
background: url("/wallpapers/dark-mountains.jpg") no-repeat center center
|
||||||
fixed;
|
fixed;
|
||||||
-webkit-background-size: cover;
|
-webkit-background-size: cover;
|
||||||
|
|||||||
Reference in New Issue
Block a user