From 875c54d810211b0fb277220c1e4d7f6cb2a1f847 Mon Sep 17 00:00:00 2001 From: Tommy Alhamra <45749487+imotD@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:24:30 +0700 Subject: [PATCH 1/3] 5 responsife web (#12) * fix(image): change url path image * fix: responsive design --------- Co-authored-by: Tommy Alhamra --- src/App.css | 9 ++++++++- src/App.jsx | 12 +++++------- {image => src/assets/images}/bg-forest.jpg | Bin {image => src/assets/images}/pokeball.gif | Bin {image => src/assets/images}/pokephoto.png | Bin src/components/MiniDetail.jsx | 4 ++-- src/components/molecules/Footer.jsx | 2 +- src/components/molecules/Header.jsx | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) rename {image => src/assets/images}/bg-forest.jpg (100%) rename {image => src/assets/images}/pokeball.gif (100%) rename {image => src/assets/images}/pokephoto.png (100%) diff --git a/src/App.css b/src/App.css index 8907e89..6b49722 100644 --- a/src/App.css +++ b/src/App.css @@ -63,7 +63,7 @@ } .bg-photo { - background-image: url("../image/bg-forest.jpg"); + background-image: url("../src/assets/images/bg-forest.jpg"); background-size: cover; background-repeat: round; object-fit: contain; @@ -110,3 +110,10 @@ rgb(255 220 89) 130% ); } + +.example-container div { + background: black; + border-radius: 30px; + width: 150px; + height: 150px; +} \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 2011c01..2434d6d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2,6 +2,7 @@ import "./App.css"; import axios from "axios"; import { useEffect, useState } from "react"; import { useSelector, useDispatch } from "react-redux"; +import { motion } from "framer-motion"; import Loading from "./components/Loading"; import MiniDetail from "./components/MiniDetail"; @@ -139,14 +140,13 @@ function App() { ); return ( -
+
{/* HEADER */}
- {/* CONTENT */} -
+
-
+
{/* SEARCHING */} @@ -157,14 +157,12 @@ function App() {
- {/* PAGE DETAILS */} -
+
- {/* FOOTER */}
); diff --git a/image/bg-forest.jpg b/src/assets/images/bg-forest.jpg similarity index 100% rename from image/bg-forest.jpg rename to src/assets/images/bg-forest.jpg diff --git a/image/pokeball.gif b/src/assets/images/pokeball.gif similarity index 100% rename from image/pokeball.gif rename to src/assets/images/pokeball.gif diff --git a/image/pokephoto.png b/src/assets/images/pokephoto.png similarity index 100% rename from image/pokephoto.png rename to src/assets/images/pokephoto.png diff --git a/src/components/MiniDetail.jsx b/src/components/MiniDetail.jsx index 63fc756..85c850d 100644 --- a/src/components/MiniDetail.jsx +++ b/src/components/MiniDetail.jsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { useSelector } from "react-redux"; import PropTypes from "prop-types"; -import pokeBallLoading from "../../image/pokeball.gif"; +import pokeBallLoading from "../../src/assets/images/pokeball.gif"; export default function Detail({ data, loading }) { const pokeSpritesPhotoUrl = useSelector( @@ -31,7 +31,7 @@ export default function Detail({ data, loading }) {

{data.name || "PokeBall"}

-
+
#{data?.id || "00"} diff --git a/src/components/molecules/Footer.jsx b/src/components/molecules/Footer.jsx index 637efe9..18791c0 100644 --- a/src/components/molecules/Footer.jsx +++ b/src/components/molecules/Footer.jsx @@ -1,6 +1,6 @@ export default function Footer(props) { return ( -