diff --git a/app/Robots/[robot]/MediaContainer.js b/app/Robots/[robot]/MediaContainer.js
index ce9954f..dbb919b 100644
--- a/app/Robots/[robot]/MediaContainer.js
+++ b/app/Robots/[robot]/MediaContainer.js
@@ -16,7 +16,6 @@ const MediaContainer = ({robotItem}) => {
dynamicHeight={false}
preventMovementUntilSwipeScrollTolerance={true}
swipeScrollTolerance={50}
- showThumbs={true}
style={{
position: 'relative',
display: 'flex',
diff --git a/app/Robots/[robot]/page.js b/app/Robots/[robot]/page.js
index 81b8207..4a2fadc 100644
--- a/app/Robots/[robot]/page.js
+++ b/app/Robots/[robot]/page.js
@@ -1,6 +1,7 @@
"use client"
import styles from './page.module.css'
import { useState, useEffect } from 'react'
+import Image from 'next/image';
import Navbar from '@components/Navbar/Navbar'
import Footer from '@components/Footer/Footer'
@@ -44,6 +45,66 @@ const EventItem = ({eventData}) => {
)
}
+const RobotNavigationButtons = ({visible, previousRobotItem, nextRobotItem}) => {
+ return (
+
+
+
+
+
+ Previous Robot
+
+
+
+
+
+
+ Next Robot
+
+
+
+
+
+ )
+}
export default function Robot({params}) {
@@ -67,9 +128,40 @@ export default function Robot({params}) {
}, [])
if (robotData == null){
- return
- Loading
-
+ return (
+
+ )
}
const {robotItem, previousRobotItem, nextRobotItem} = (() => {
@@ -89,7 +181,8 @@ export default function Robot({params}) {
+
{robotItem.name}
@@ -190,60 +284,7 @@ export default function Robot({params}) {
-
-
-
-
-
- Previous Robot
-
-
-
-
-
-
- Next Robot
-
-
-
-
-
+
diff --git a/app/Robots/[robot]/page.module.css b/app/Robots/[robot]/page.module.css
index 04fdef7..10df9cb 100644
--- a/app/Robots/[robot]/page.module.css
+++ b/app/Robots/[robot]/page.module.css
@@ -14,12 +14,16 @@
.navigationButtons {
display: flex;
- margin-top: 80px;
flex-direction: row;
justify-content: flex-end;
gap : 20px;
}
+.navigationButtons[visible='mobile'] {
+ display: 'none';
+ visibility: hidden;
+}
+
.sideDataContainer {
width : 320px;
display: flex;
@@ -63,4 +67,14 @@
flex-direction: column;
}
+ .navigationButtons[visible='desktop'] {
+ display: 'none';
+ visibility: hidden;
+ }
+
+ .navigationButtons[visible='mobile'] {
+ display: 'initial';
+ visibility: visible;
+ }
+
}
diff --git a/app/components/RobotItem/RobotItem.jsx b/app/components/RobotItem/RobotItem.jsx
index 8adc474..bde6b40 100644
--- a/app/components/RobotItem/RobotItem.jsx
+++ b/app/components/RobotItem/RobotItem.jsx
@@ -11,6 +11,10 @@ const RobotItem = ({robotItem, index}) => {
const [isHovering, setHovering] = useState(false);
+ console.log("thumb", robotItem.thumbnail)
+
+ const thumbnail = (robotItem.thumbnail) ? `url(${robotItem.thumbnail})` : "url(https://i.ytimg.com/vi/oVSD8OBbLaM/maxresdefault.jpg)"
+
return (
{
backgroundColor : 'red',
aspectRatio : '1 / 1',
position : 'relative',
- transform: `scale(${isHovering ? 1.05 : 1})`,
+ transform: `scale(${isHovering ? 1.05 : 1})`,
}}
onMouseEnter={() => {
setHovering(true);
@@ -37,11 +41,12 @@ const RobotItem = ({robotItem, index}) => {
bottom : 8,
left : -8,
right : 8,
- backgroundColor : bgColor,
+ backgroundColor : isHovering ? bgColor : 'transparent',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
- backgroundBlendMode: 'multiply',
- backgroundImage : 'url(https://i.ytimg.com/vi/oVSD8OBbLaM/maxresdefault.jpg)'
+ backgroundPosition : 'center center',
+ backgroundBlendMode: 'multiply',
+ backgroundImage : thumbnail
}}
>
@@ -51,13 +56,27 @@ const RobotItem = ({robotItem, index}) => {
position: 'relative',
width : '100%',
height : '100%',
- backgroundColor : isHovering ? bgColor : 'transparent',
- backgroundSize: 'cover',
- backgroundRepeat: 'no-repeat',
- backgroundBlendMode: 'multiply',
- backgroundImage : 'url(https://i.ytimg.com/vi/oVSD8OBbLaM/maxresdefault.jpg)',
+ overflow : 'hidden',
+ display : 'flex',
+ justifyContent: 'center',
+ alignItems : 'center'
}}
>
+
{
flexDirection : 'column',
padding : 20,
position : 'absolute',
- left : 0, right : 0,
+ left : 0,
+ right : 0,
bottom : 0,
background : 'linear-gradient(transparent, #000000ee)',
color : '#fff'