accept cookie added and image updated #30

Merged
ameye merged 1 commits from accept-cookies into master 2024-10-12 13:06:52 +00:00
8 changed files with 82 additions and 6 deletions
+1 -1
View File
@@ -8664,4 +8664,4 @@ LND PAGE STYLE STARTS HERE
.react-multi-carousel-item--active, .slick-center{
transform: scale(1);
transition: all 2s;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+36
View File
@@ -0,0 +1,36 @@
"use client"
import React, { useEffect, useState } from 'react'
import Cookies from 'js-cookie'
export default function AcceptCookies() {
const [cookies, setCookies] = useState(true)
const acceptCookies = () => {
Cookies.set('useCookies', 'true')
setCookies(true)
}
useEffect(()=>{
const useCookies = Cookies.get('useCookies')
if(useCookies == 'true'){
setCookies(true)
}else{
setCookies(false)
}
},[])
return (
<>
{/* {cookies ?
<></>
: */}
<div className={`${cookies ? 'slide-down' : 'slide-up'} cookies-wrapper position-fixed d-lg-flex justify-content-center align-items-center gap-5 p-2`}>
<p className='m-0'>
This website uses cookies to provide you the best experience possible, as well as for tracking performance and marketing purposes. You can check our privacy policy for more information. By clicking "Confirm" or by continuing to use our website, you consent to our use of cookies.
</p>
<button onClick={acceptCookies} className='px-5 py-2'>Accept</button>
</div>
{/* } */}
</>
)
}
+3 -3
View File
@@ -3,7 +3,7 @@ import React from 'react';
import Image from 'next/image'
import heroThumbTwo from '../assets/images/app-pic.png';
import AI from '../assets/images/home/ai-assist.png'
import AI from '../assets/images/home/ai-assisted.png'
import CustomSlider from './customSlider/CustomSlider'
@@ -76,8 +76,8 @@ function HeroHomeOne() {
>
<Image
src={AI}
width={'100%'}
height={'100%'}
width={'150'}
height={'150'}
alt="Image"
/>
</div>
-1
View File
@@ -16,7 +16,6 @@ import SelectFeatures from "@/app/components/SelectFeatutes";
function HomeOne() {
return (
<>
+36
View File
@@ -100,6 +100,42 @@ a {
text-decoration: none;
}
/* ACCEPT COOKIE SLIDE UP EFFECT */
.cookies-wrapper{
width: 90%;
left: 50%;
transform: translateX(-50%);
background-color: white;
box-shadow: 0px 0px 1px black;
z-index: 999;
}
.slide-up {
animation: slideup 1s linear forwards;
}
.slide-down {
animation: slidedown 1s linear forwards;
}
@keyframes slideup {
0%{bottom: -50%;}
100%{bottom: 0;}
}
@keyframes slidedown {
0%{bottom: 0;}
100%{bottom: -50%; display: none;}
}
@media only screen and (max-width: 992px) {
.cookies-wrapper p, .cookies-wrapper button {
font-size: 14px;
line-height: 20px;
}
}
/* END ACCEPT COOKIE SLIDE UP EFFECT */
@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
+5 -1
View File
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import Script from "next/script";
import AcceptCookies from "./components/AcceptCookies";
const inter = Inter({ subsets: ["latin"] });
@@ -31,7 +32,10 @@ export default function RootLayout({
/>
<meta property="og:image" content="%PUBLIC_URL%/favicon-32x32.png" />
<body className={inter.className}>{children}</body>
<body className={inter.className}>
{children}
<AcceptCookies />
</body>
<Script id='chat-support'>
{`
var LHC_API = LHC_API || {};
+1
View File
@@ -11,6 +11,7 @@
"dependencies": {
"axios": "^1.7.2",
"caniuse-lite": "^1.0.30001651",
"js-cookie": "^3.0.5",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18",