generated from deco-sites/storefront
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from deco-sites/fix/home
Fix/home
- Loading branch information
Showing
11 changed files
with
169 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { clx } from "$store/sdk/clx.ts"; | ||
|
||
interface Props { | ||
textCircleLg?: string; | ||
textCircleSm?: string; | ||
} | ||
|
||
function BlueBall({ textCircleLg, textCircleSm }: Props) { | ||
|
||
function handleMouseMove(e: MouseEvent) { | ||
const { target } = e; | ||
if (!target) return; | ||
|
||
if (target && target instanceof HTMLElement) { | ||
const smBall = target?.querySelector<HTMLElement>("#ball-sm"); | ||
const horizontal = e?.layerX; | ||
const vertical = e?.layerY; | ||
|
||
if (horizontal && vertical && smBall) { | ||
smBall?.setAttribute( | ||
"style", | ||
`position:absolute; left: ${horizontal + "px"}; top:${ | ||
vertical + "px" | ||
}`, | ||
); | ||
} | ||
} | ||
} | ||
|
||
return ( | ||
<> | ||
<div | ||
class="ball mobile:mt-[60px] relative group hover:cursor-none" | ||
onMouseMove={handleMouseMove} | ||
> | ||
<div | ||
id="ball-xg" | ||
class={clx( | ||
`relative overflow-hidden group-hover:bg-transparent duration-500 group-hover:border-[#ffffff] mobile:w-[222px] border-2 border-transparent | ||
mobile:h-[222px] bg-accent w-[300px] h-[300px] rounded-full flex items-center justify-center`, | ||
)} | ||
> | ||
<span class="group-hover:text-[#ffffff] mobile:text-[22px] text-[28px] text-primary font-archimoto-medium font-black leading-normal"> | ||
{textCircleLg} | ||
</span> | ||
<div | ||
id="ball-sm" | ||
class={clx( | ||
`ball-sm mobile:w-[100px] mobile:h-[100px] mobile:bottom-[30px] mobile:right-[40px] group-hover:visible group-hover:opacity-100 | ||
invisible opacity-0 bg-secondary w-[130px] h-[130px] absolute bottom-[40px] right-[50px] rounded-full flex items-center justify-center`, | ||
)} | ||
> | ||
<span class="mobile:text-[18px] text-[22px] font-archimoto-medium font-black leading-normal"> | ||
{textCircleSm} | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default BlueBall; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "$store/components/ui/BlueBallAnimation.tsx"; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.