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
|
||||||
<img src="/logo-no-background.png" height="auto" width="400px"/>
|
appear={false}
|
||||||
</a>
|
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"/>
|
||||||
|
</a>
|
||||||
|
{/* </Transition> */}
|
||||||
<div style={{ marginBottom: '40px', marginRight: '40px' }}></div>
|
<div style={{ marginBottom: '40px', marginRight: '40px' }}></div>
|
||||||
<a
|
<a
|
||||||
href="/about-us"
|
href="/about-us"
|
||||||
|
|
77
app/page.tsx
77
app/page.tsx
|
@ -23,47 +23,54 @@ export default function Example() {
|
||||||
</div>
|
</div>
|
||||||
<div style={{paddingTop: '128px'}}></div>
|
<div style={{paddingTop: '128px'}}></div>
|
||||||
<Logo/>
|
<Logo/>
|
||||||
<div className="mx-auto max-w-7xl py-24 sm:px-6 sm:py-32 lg:px-8">
|
<Transition
|
||||||
<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">
|
appear={true}
|
||||||
<svg
|
show={true}
|
||||||
viewBox="0 0 1024 1024"
|
enter="transition-opacity duration-500"
|
||||||
className="absolute left-1/2 top-1/2 -z-10 h-[64rem] w-[64rem] -translate-y-1/2 [mask-image:radial-gradient(closest-side,white,transparent)] sm:left-full sm:-ml-80 lg:left-1/2 lg:ml-0 lg:-translate-x-1/2 lg:translate-y-0"
|
enterFrom="opacity-0"
|
||||||
aria-hidden="true"
|
enterTo="opacity-80">
|
||||||
>
|
<div className="mx-auto max-w-7xl py-24 sm:px-6 sm:py-32 lg:px-8">
|
||||||
<circle cx={512} cy={512} r={512} fill="url(#759c1415-0410-454c-8f7c-9a820de03641)" fillOpacity="0.7" />
|
<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">
|
||||||
<defs>
|
<svg
|
||||||
<radialGradient id="759c1415-0410-454c-8f7c-9a820de03641">
|
viewBox="0 0 1024 1024"
|
||||||
<stop stopColor="#7775D6" />
|
className="absolute left-1/2 top-1/2 -z-10 h-[64rem] w-[64rem] -translate-y-1/2 [mask-image:radial-gradient(closest-side,white,transparent)] sm:left-full sm:-ml-80 lg:left-1/2 lg:ml-0 lg:-translate-x-1/2 lg:translate-y-0"
|
||||||
<stop offset={1} stopColor="#E935C1" />
|
aria-hidden="true"
|
||||||
</radialGradient>
|
>
|
||||||
</defs>
|
<circle cx={512} cy={512} r={512} fill="url(#759c1415-0410-454c-8f7c-9a820de03641)" fillOpacity="0.7" />
|
||||||
</svg>
|
<defs>
|
||||||
<div className="mx-auto max-w-md text-center lg:mx-0 lg:flex-auto lg:py-32 lg:text-left">
|
<radialGradient id="759c1415-0410-454c-8f7c-9a820de03641">
|
||||||
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
|
<stop stopColor="#7775D6" />
|
||||||
Start using flash cards
|
<stop offset={1} stopColor="#E935C1" />
|
||||||
<br />
|
</radialGradient>
|
||||||
Begin with our app today.
|
</defs>
|
||||||
</h2>
|
</svg>
|
||||||
<p className="mt-6 text-lg leading-8 text-gray-300">
|
<div className="mx-auto max-w-md text-center lg:mx-0 lg:flex-auto lg:py-32 lg:text-left">
|
||||||
Get questions from a multitude of different subjects that include cybersecurity, geography and C++
|
<h2 className="text-3xl font-bold tracking-tight text-white sm:text-4xl">
|
||||||
</p>
|
Start using flash cards
|
||||||
<div className="mt-10 flex items-center justify-center gap-x-6 lg:justify-start">
|
<br />
|
||||||
<a
|
Begin with our app today.
|
||||||
href="sessionconfig"
|
</h2>
|
||||||
className="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
|
<p className="mt-6 text-lg leading-8 text-gray-300">
|
||||||
style={{ marginBottom: '40px' }}
|
Get questions from a multitude of different subjects that include cybersecurity, geography and C++
|
||||||
>
|
</p>
|
||||||
Get started
|
<div className="mt-10 flex items-center justify-center gap-x-6 lg:justify-start">
|
||||||
</a>
|
<a
|
||||||
|
href="sessionconfig"
|
||||||
|
className="rounded-md bg-white px-3.5 py-2.5 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
|
||||||
|
style={{ marginBottom: '40px' }}
|
||||||
|
>
|
||||||
|
Get started
|
||||||
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</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"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
|
className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
|
||||||
style={{
|
style={{
|
||||||
|
|
|
@ -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">
|
||||||
{ cards.map((elem) => {
|
<Transition
|
||||||
return (<TopicCard title={elem[0]} link={elem[2]}>{elem[1]}</TopicCard>)
|
appear={true}
|
||||||
})}
|
show={true}
|
||||||
|
enter="transition-opacity duration-300"
|
||||||
|
enterFrom="opacity-0"
|
||||||
|
enterTo="opacity-80">
|
||||||
|
<div>
|
||||||
|
{ cards.map((elem) => {
|
||||||
|
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