From e7e8d1747b6ff2c8a016cf4fe927451b4f6a5bca Mon Sep 17 00:00:00 2001 From: Sk Date: Mon, 26 Aug 2024 21:21:05 +0600 Subject: [PATCH 1/2] fix animation --- src/app/globals.css | 79 +++++++++++++++++++- src/components/OffCanvasMenu.tsx | 21 ++++-- src/components/location-detail-component.tsx | 8 +- src/components/map-loading-animation.tsx | 8 +- 4 files changed, 101 insertions(+), 15 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index f88f10f..5e4e625 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -184,7 +184,7 @@ a[href^="https://maps.google.com/maps"]{display:none !important} */ } /* loading skeletons */ -.card { +/* .card { position: relative; -webkit-box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1); @@ -194,7 +194,7 @@ a[href^="https://maps.google.com/maps"]{display:none !important} */ overflow: hidden; width: 360px; margin: 40px auto; -} +} */ .shimmerBG { animation-duration: 2.2s; @@ -290,3 +290,78 @@ font { box-shadow: none !important; position: initial !important; } + + + +/** + * ============================================== + * Loading animation map + * ============================================== + */ + .dot-pulse { + position: relative; + left: -9999px; + width: 10px; + height: 10px; + border-radius: 5px; + background-color: #333333; + color: #333333; + box-shadow: 9999px 0 0 -5px; + animation: dot-pulse 1.5s infinite linear; + animation-delay: 0.25s; +} +.dot-pulse::before, .dot-pulse::after { + content: ""; + display: inline-block; + position: absolute; + top: 0; + width: 8px; + height: 8px; + border-radius: 5px; + background-color: #333333; + color: #333333; +} +.dot-pulse::before { + box-shadow: 9984px 0 0 -5px; + animation: dot-pulse-before 1.5s infinite linear; + animation-delay: 0s; +} +.dot-pulse::after { + box-shadow: 10014px 0 0 -5px; + animation: dot-pulse-after 1.5s infinite linear; + animation-delay: 0.5s; +} + +@keyframes dot-pulse-before { + 0% { + box-shadow: 9984px 0 0 -5px; + } + 30% { + box-shadow: 9984px 0 0 2px; + } + 60%, 100% { + box-shadow: 9984px 0 0 -5px; + } +} +@keyframes dot-pulse { + 0% { + box-shadow: 9999px 0 0 -5px; + } + 30% { + box-shadow: 9999px 0 0 2px; + } + 60%, 100% { + box-shadow: 9999px 0 0 -5px; + } +} +@keyframes dot-pulse-after { + 0% { + box-shadow: 10014px 0 0 -5px; + } + 30% { + box-shadow: 10014px 0 0 2px; + } + 60%, 100% { + box-shadow: 10014px 0 0 -5px; + } +} \ No newline at end of file diff --git a/src/components/OffCanvasMenu.tsx b/src/components/OffCanvasMenu.tsx index a9da083..5ea5bb4 100644 --- a/src/components/OffCanvasMenu.tsx +++ b/src/components/OffCanvasMenu.tsx @@ -7,7 +7,12 @@ "use client"; import { useState } from "react"; -import { Dialog, DialogBackdrop, DialogPanel } from "@headlessui/react"; +import { + Dialog, + DialogBackdrop, + DialogPanel, + Transition, +} from "@headlessui/react"; import Link from "next/link"; interface OffCanvasMenuProps { @@ -111,10 +116,10 @@ const OffCanvasMenu = ({ open, onClose }: OffCanvasMenuProps) => {
-
- {nestedNav ? ( +
+
{ Other Services
- ) : ( +
+ + - )} +
diff --git a/src/components/location-detail-component.tsx b/src/components/location-detail-component.tsx index a5db724..0452e15 100644 --- a/src/components/location-detail-component.tsx +++ b/src/components/location-detail-component.tsx @@ -340,9 +340,11 @@ export default function LocationDetailComponent({ Closed

{location.info?.map((info) => ( -

- {info} -

+

))}
diff --git a/src/components/map-loading-animation.tsx b/src/components/map-loading-animation.tsx index a5c7ff1..63a3049 100644 --- a/src/components/map-loading-animation.tsx +++ b/src/components/map-loading-animation.tsx @@ -1,7 +1,9 @@ export function MapLoadingAnimation() { return ( -
- Loading... -
+ <> +
+
+
+ ); } From 85e123140f892f14f09d0df9b35a1b6f3ad3120c Mon Sep 17 00:00:00 2001 From: Sk Date: Mon, 26 Aug 2024 21:24:02 +0600 Subject: [PATCH 2/2] format --- src/app/globals.css | 18 ++++++++++-------- src/components/location-detail-component.tsx | 6 +++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index 5e4e625..c082c48 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -291,14 +291,12 @@ font { position: initial !important; } - - /** * ============================================== * Loading animation map * ============================================== */ - .dot-pulse { +.dot-pulse { position: relative; left: -9999px; width: 10px; @@ -310,7 +308,8 @@ font { animation: dot-pulse 1.5s infinite linear; animation-delay: 0.25s; } -.dot-pulse::before, .dot-pulse::after { +.dot-pulse::before, +.dot-pulse::after { content: ""; display: inline-block; position: absolute; @@ -339,7 +338,8 @@ font { 30% { box-shadow: 9984px 0 0 2px; } - 60%, 100% { + 60%, + 100% { box-shadow: 9984px 0 0 -5px; } } @@ -350,7 +350,8 @@ font { 30% { box-shadow: 9999px 0 0 2px; } - 60%, 100% { + 60%, + 100% { box-shadow: 9999px 0 0 -5px; } } @@ -361,7 +362,8 @@ font { 30% { box-shadow: 10014px 0 0 2px; } - 60%, 100% { + 60%, + 100% { box-shadow: 10014px 0 0 -5px; } -} \ No newline at end of file +} diff --git a/src/components/location-detail-component.tsx b/src/components/location-detail-component.tsx index 0452e15..7f96d3e 100644 --- a/src/components/location-detail-component.tsx +++ b/src/components/location-detail-component.tsx @@ -340,9 +340,9 @@ export default function LocationDetailComponent({ Closed

{location.info?.map((info) => ( -

))}