Updated animations
This commit is contained in:
parent
e9ee6c0b69
commit
b7b1fca1bc
3 changed files with 80 additions and 42 deletions
|
@ -1,9 +1,29 @@
|
||||||
|
'use client';
|
||||||
|
import { Transition } from "@headlessui/react";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
const Logo = () => {
|
const Logo = () => {
|
||||||
|
|
||||||
|
const [logoHovered, setLogoHovered] = useState( false );
|
||||||
|
const [aboutButtonHovered, setAboutButtonHovered] = useState( false );
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ display:"flex", alignItems: 'center', justifyContent: 'center', marginLeft: "40px", marginRight: "40px"}}>
|
<div style={{ display:"flex", alignItems: 'center', justifyContent: 'center', marginLeft: "40px", marginRight: "40px"}}>
|
||||||
<a href="/" style={{ marginBottom: '40px', marginLeft: '40px' }}>
|
{/* <Transition
|
||||||
|
appear={false}
|
||||||
|
show={true}
|
||||||
|
enter="transition-opacity duration-75"
|
||||||
|
enterFrom={logoHovered ? "opacity-100" : "opacity-70"}
|
||||||
|
enterTo={logoHovered ? "opacity-70" : "opacity-100"}
|
||||||
|
leave="transition-opacity duration-75"
|
||||||
|
leaveFrom={logoHovered ? "opacity-70" : "opacity-100"}
|
||||||
|
leaveTo={logoHovered ? "opacity-100" : "opacity-70"}> */}
|
||||||
|
<a href="/" style={{ marginBottom: '40px', marginLeft: '40px', transition: 'opacity', opacity: logoHovered ? 0.7 : 1 , animationDuration: '0.3s'}}
|
||||||
|
onMouseEnter={()=>setLogoHovered(true)}
|
||||||
|
onMouseLeave={()=>setLogoHovered(false)}>
|
||||||
<img src="/logo-no-background.png" height="auto" width="400px"/>
|
<img src="/logo-no-background.png" height="auto" width="400px"/>
|
||||||
</a>
|
</a>
|
||||||
|
{/* </Transition> */}
|
||||||
<div style={{ marginBottom: '40px', marginRight: '40px' }}></div>
|
<div style={{ marginBottom: '40px', marginRight: '40px' }}></div>
|
||||||
<a
|
<a
|
||||||
href="/about-us"
|
href="/about-us"
|
||||||
|
|
|
@ -23,6 +23,12 @@ export default function Example() {
|
||||||
</div>
|
</div>
|
||||||
<div style={{paddingTop: '128px'}}></div>
|
<div style={{paddingTop: '128px'}}></div>
|
||||||
<Logo/>
|
<Logo/>
|
||||||
|
<Transition
|
||||||
|
appear={true}
|
||||||
|
show={true}
|
||||||
|
enter="transition-opacity duration-500"
|
||||||
|
enterFrom="opacity-0"
|
||||||
|
enterTo="opacity-80">
|
||||||
<div className="mx-auto max-w-7xl py-24 sm:px-6 sm:py-32 lg:px-8">
|
<div className="mx-auto max-w-7xl py-24 sm:px-6 sm:py-32 lg:px-8">
|
||||||
<div className="relative isolate overflow-hidden bg-gray-900 px-6 pt-16 shadow-2xl sm:rounded-3xl sm:px-16 md:pt-24 lg:flex lg:gap-x-20 lg:px-24 lg:pt-0">
|
<div className="relative isolate overflow-hidden bg-gray-900 px-6 pt-16 shadow-2xl sm:rounded-3xl sm:px-16 md:pt-24 lg:flex lg:gap-x-20 lg:px-24 lg:pt-0">
|
||||||
<svg
|
<svg
|
||||||
|
@ -60,6 +66,7 @@ export default function Example() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</Transition>
|
||||||
<div
|
<div
|
||||||
className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
|
className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { CheckIcon } from '@heroicons/react/20/solid'
|
import { CheckIcon } from '@heroicons/react/20/solid'
|
||||||
import TopicCard from '../components/topic_card'
|
import TopicCard from '../components/topic_card'
|
||||||
import Logo from '../components/logo';
|
import Logo from '../components/logo';
|
||||||
|
import { Transition } from '@headlessui/react';
|
||||||
|
|
||||||
const includedFeatures = [
|
const includedFeatures = [
|
||||||
'Private forum access',
|
'Private forum access',
|
||||||
|
@ -34,9 +35,19 @@ export default function Example() {
|
||||||
<Logo/>
|
<Logo/>
|
||||||
<div style={{paddingTop: '128px'}}></div>
|
<div style={{paddingTop: '128px'}}></div>
|
||||||
<div className="mx-auto max-w-7xl px-6 lg:px-8">
|
<div className="mx-auto max-w-7xl px-6 lg:px-8">
|
||||||
|
<Transition
|
||||||
|
appear={true}
|
||||||
|
show={true}
|
||||||
|
enter="transition-opacity duration-300"
|
||||||
|
enterFrom="opacity-0"
|
||||||
|
enterTo="opacity-80">
|
||||||
|
<div>
|
||||||
{ cards.map((elem) => {
|
{ cards.map((elem) => {
|
||||||
return (<TopicCard title={elem[0]} link={elem[2]}>{elem[1]}</TopicCard>)
|
return (
|
||||||
})}
|
<TopicCard title={elem[0]} link={elem[2]}>{elem[1]}</TopicCard>
|
||||||
|
)})}
|
||||||
|
</div>
|
||||||
|
</Transition>
|
||||||
{/*
|
{/*
|
||||||
<TopicCard title = "Learn cybersecurity">
|
<TopicCard title = "Learn cybersecurity">
|
||||||
Learning cybersecurity is like becoming a guardian of the digital realm.
|
Learning cybersecurity is like becoming a guardian of the digital realm.
|
||||||
|
|
Loading…
Reference in a new issue