From 04c278488918aa6432feabc44b2a8b270a604f72 Mon Sep 17 00:00:00 2001 From: LUISEDOCCOR Date: Mon, 8 Apr 2024 10:02:04 -0600 Subject: [PATCH 1/9] feat: add route not found to routes.ts --- src/common/constants/routes.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/constants/routes.ts b/src/common/constants/routes.ts index b2d5f01..03ad5f5 100644 --- a/src/common/constants/routes.ts +++ b/src/common/constants/routes.ts @@ -1,5 +1,6 @@ export const ROUTE = { home: '/', projects: '/projects', - registration: '/registration' + registration: '/registration', + notFound: '*' }; From 19a29421b40fde38c36064375fba70000af068e3 Mon Sep 17 00:00:00 2001 From: LUISEDOCCOR Date: Mon, 8 Apr 2024 10:08:37 -0600 Subject: [PATCH 2/9] feat: create the notfound page --- src/pages/NotFound/NotFound.tsx | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/pages/NotFound/NotFound.tsx diff --git a/src/pages/NotFound/NotFound.tsx b/src/pages/NotFound/NotFound.tsx new file mode 100644 index 0000000..b5b87df --- /dev/null +++ b/src/pages/NotFound/NotFound.tsx @@ -0,0 +1,29 @@ +import { ButtonSize, ROUTE, Variant } from '@common'; +import { Background, Button } from '@components'; +import { RootLayout } from '@layouts'; +import { Link } from 'react-router-dom'; + +export const NotFound = () => { + return ( + + +
+
+

Error 404

+

PÁGINA NO ENCONTRADA

+

+ ¡Hola! Lo sentimos, pero no pudimos encontrar lo que buscabas. Verifica que la dirección URL sea correcta +

+
+
+ +
+
+
+ ); +}; From 067b01faded651a10dc560abfaa8ffff65b38a23 Mon Sep 17 00:00:00 2001 From: LUISEDOCCOR Date: Mon, 8 Apr 2024 10:09:17 -0600 Subject: [PATCH 3/9] feat: add not found to the pages --- src/App.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 03542e7..be2ddd8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,7 @@ import { useEffect } from 'react'; import { ROUTE } from '@common'; import { Home } from '@pages/Home'; +import { NotFound } from '@pages/NotFound/NotFound'; import { Projects } from '@pages/Projects/Projects'; import { Registration } from '@pages/Registration/Registration'; import { supabase } from '@utils'; @@ -48,6 +49,7 @@ function App() { } /> } /> } /> + } /> ); From 9c3924b995cc5f0704b5483d8722bc54cc796124 Mon Sep 17 00:00:00 2001 From: LUISEDOCCOR Date: Mon, 8 Apr 2024 11:52:20 -0600 Subject: [PATCH 4/9] feat: add hamster in not found --- src/index.css | 203 ++++++++++++++++++++++++++++++++ src/pages/NotFound/NotFound.tsx | 54 ++++++--- 2 files changed, 243 insertions(+), 14 deletions(-) diff --git a/src/index.css b/src/index.css index 54b5d51..a96fa8a 100644 --- a/src/index.css +++ b/src/index.css @@ -34,6 +34,13 @@ ); /* Carousel config end */ + + /* Hamster config start */ + + --bg: hsl(90,90%,20%); + --fg: hsl(223,10%,10%); + + /* Hamster config end */ } * { @@ -367,3 +374,199 @@ body { stroke-width: 1; } } + +/************************************************/ +/* HAMSTRR CLASSES */ +/************************************************/ +.wheel-and-hamster { + --dur: 1s; + position: relative; + width: 12em; + height: 12em; +} +.wheel, +.hamster, +.hamster div, +.spoke { + position: absolute; +} +.wheel, +.spoke { + border-radius: 50%; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.wheel { + background: radial-gradient(100% 100% at center,hsla(0,0%,60%,0) 47.8%,hsl(0,0%,60%) 48%); + z-index: 2; +} +.hamster { + animation: hamster var(--dur) ease-in-out infinite; + top: 50%; + left: calc(50% - 3.5em); + width: 7em; + height: 3.75em; + transform: rotate(4deg) translate(-0.8em,1.85em); + transform-origin: 50% 0; + z-index: 1; +} +.hamster__head { + animation: hamsterHead var(--dur) ease-in-out infinite; + background: hsl(30,90%,55%); + border-radius: 70% 30% 0 100% / 40% 25% 25% 60%; + box-shadow: + 0 -0.25em 0 hsl(30,90%,80%) inset, + 0.75em -1.55em 0 hsl(30,90%,90%) inset; + top: 0; + left: -2em; + width: 2.75em; + height: 2.5em; + transform-origin: 100% 50%; +} +.hamster__ear { + animation: hamsterEar var(--dur) ease-in-out infinite; + background: hsl(0,90%,85%); + border-radius: 50%; + box-shadow: -0.25em 0 hsl(30,90%,55%) inset; + top: -0.25em; + right: -0.25em; + width: 0.75em; + height: 0.75em; + transform-origin: 50% 75%; +} +.hamster__eye { + animation: hamsterEye var(--dur) linear infinite; + background-color: hsl(0,0%,0%); + border-radius: 50%; + top: 0.375em; + left: 1.25em; + width: 0.5em; + height: 0.5em; +} +.hamster__nose { + background: hsl(0,90%,75%); + border-radius: 35% 65% 85% 15% / 70% 50% 50% 30%; + top: 0.75em; + left: 0; + width: 0.2em; + height: 0.25em; +} +.hamster__body { + animation: hamsterBody var(--dur) ease-in-out infinite; + background: hsl(30,90%,90%); + border-radius: 50% 30% 50% 30% / 15% 60% 40% 40%; + box-shadow: + 0.1em 0.75em 0 hsl(30,90%,55%) inset, + 0.15em -0.5em 0 hsl(30,90%,80%) inset; + top: 0.25em; + left: 2em; + width: 4.5em; + height: 3em; + transform-origin: 17% 50%; + transform-style: preserve-3d; +} +.hamster__limb--fr, +.hamster__limb--fl { + clip-path: polygon(0 0,100% 0,70% 80%,60% 100%,0% 100%,40% 80%); + top: 2em; + left: 0.5em; + width: 1em; + height: 1.5em; + transform-origin: 50% 0; +} +.hamster__limb--fr { + animation: hamsterFRLimb var(--dur) linear infinite; + background: linear-gradient(hsl(30,90%,80%) 80%,hsl(0,90%,75%) 80%); + transform: rotate(15deg) translateZ(-1px); +} +.hamster__limb--fl { + animation: hamsterFLLimb var(--dur) linear infinite; + background: linear-gradient(hsl(30,90%,90%) 80%,hsl(0,90%,85%) 80%); + transform: rotate(15deg); +} +.hamster__limb--br, +.hamster__limb--bl { + border-radius: 0.75em 0.75em 0 0; + clip-path: polygon(0 0,100% 0,100% 30%,70% 90%,70% 100%,30% 100%,40% 90%,0% 30%); + top: 1em; + left: 2.8em; + width: 1.5em; + height: 2.5em; + transform-origin: 50% 30%; +} +.hamster__limb--br { + animation: hamsterBRLimb var(--dur) linear infinite; + background: linear-gradient(hsl(30,90%,80%) 90%,hsl(0,90%,75%) 90%); + transform: rotate(-25deg) translateZ(-1px); +} +.hamster__limb--bl { + animation: hamsterBLLimb var(--dur) linear infinite; + background: linear-gradient(hsl(30,90%,90%) 90%,hsl(0,90%,85%) 90%); + transform: rotate(-25deg); +} +.hamster__tail { + animation: hamsterTail var(--dur) linear infinite; + background: hsl(0,90%,85%); + border-radius: 0.25em 50% 50% 0.25em; + box-shadow: 0 -0.2em 0 hsl(0,90%,75%) inset; + top: 1.5em; + right: -0.5em; + width: 1em; + height: 0.5em; + transform: rotate(30deg) translateZ(-1px); + transform-origin: 0.25em 0.25em; +} +.spoke { + animation: spoke var(--dur) linear infinite; + background: + radial-gradient(100% 100% at center,hsl(0,0%,60%) 4.8%,hsla(0,0%,60%,0) 5%), + linear-gradient(hsla(0,0%,55%,0) 46.9%,hsl(0,0%,65%) 47% 52.9%,hsla(0,0%,65%,0) 53%) 50% 50% / 99% 99% no-repeat; +} + +/* Animations */ +@keyframes hamster { + from, to { transform: rotate(4deg) translate(-0.8em,1.85em); } + 50% { transform: rotate(0) translate(-0.8em,1.85em); } +} +@keyframes hamsterHead { + from, 25%, 50%, 75%, to { transform: rotate(0); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(8deg); } +} +@keyframes hamsterEye { + from, 90%, to { transform: scaleY(1); } + 95% { transform: scaleY(0); } +} +@keyframes hamsterEar { + from, 25%, 50%, 75%, to { transform: rotate(0); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(12deg); } +} +@keyframes hamsterBody { + from, 25%, 50%, 75%, to { transform: rotate(0); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-2deg); } +} +@keyframes hamsterFRLimb { + from, 25%, 50%, 75%, to { transform: rotate(50deg) translateZ(-1px); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-30deg) translateZ(-1px); } +} +@keyframes hamsterFLLimb { + from, 25%, 50%, 75%, to { transform: rotate(-30deg); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(50deg); } +} +@keyframes hamsterBRLimb { + from, 25%, 50%, 75%, to { transform: rotate(-60deg) translateZ(-1px); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(20deg) translateZ(-1px); } +} +@keyframes hamsterBLLimb { + from, 25%, 50%, 75%, to { transform: rotate(20deg); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(-60deg); } +} +@keyframes hamsterTail { + from, 25%, 50%, 75%, to { transform: rotate(30deg) translateZ(-1px); } + 12.5%, 37.5%, 62.5%, 87.5% { transform: rotate(10deg) translateZ(-1px); } +} +@keyframes spoke { + from { transform: rotate(0); } + to { transform: rotate(-1turn); } +} \ No newline at end of file diff --git a/src/pages/NotFound/NotFound.tsx b/src/pages/NotFound/NotFound.tsx index b5b87df..174813b 100644 --- a/src/pages/NotFound/NotFound.tsx +++ b/src/pages/NotFound/NotFound.tsx @@ -7,21 +7,47 @@ export const NotFound = () => { return ( -
-
-

Error 404

-

PÁGINA NO ENCONTRADA

-

- ¡Hola! Lo sentimos, pero no pudimos encontrar lo que buscabas. Verifica que la dirección URL sea correcta -

+
+
+
+

Error 404

+

PÁGINA NO ENCONTRADA

+

+ ¡Hola! Lo sentimos, pero no pudimos encontrar lo que buscabas. Verifica que la dirección URL sea correcta +

+
+
+ +
-
- +
+ {/* https://codepen.io/jkantner/pen/wvqeXrQ */} +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From d1e82806fe753a96d40fcc9f8ed384cafa7f646b Mon Sep 17 00:00:00 2001 From: LUISEDOCCOR Date: Mon, 8 Apr 2024 11:53:30 -0600 Subject: [PATCH 5/9] fix: change position return button --- src/pages/NotFound/NotFound.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/NotFound/NotFound.tsx b/src/pages/NotFound/NotFound.tsx index 174813b..9ee8f94 100644 --- a/src/pages/NotFound/NotFound.tsx +++ b/src/pages/NotFound/NotFound.tsx @@ -19,7 +19,7 @@ export const NotFound = () => { ¡Hola! Lo sentimos, pero no pudimos encontrar lo que buscabas. Verifica que la dirección URL sea correcta

-
+
-
-
-
- {/* https://codepen.io/jkantner/pen/wvqeXrQ */} -
-
-
-
-
-
-
-
+ + +
+ +
+ {/* https://codepen.io/jkantner/pen/wvqeXrQ */} +
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
- -
+ + +
+ + Better html structure, and fix a problem with the hamster animation
); From 34e0221e56b6ef7e844dd10d06408d967c0f8a3b Mon Sep 17 00:00:00 2001 From: LUISEDOCCOR Date: Mon, 8 Apr 2024 13:11:21 -0600 Subject: [PATCH 9/9] fix: close main tag --- src/pages/NotFound/NotFound.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pages/NotFound/NotFound.tsx b/src/pages/NotFound/NotFound.tsx index 449920b..f73ed4c 100644 --- a/src/pages/NotFound/NotFound.tsx +++ b/src/pages/NotFound/NotFound.tsx @@ -46,9 +46,6 @@ export const NotFound = () => { - - Better html structure, and fix a problem with the hamster animation - ); };