From a57bc465aed6212354df337dfb862c229c87524d Mon Sep 17 00:00:00 2001 From: Sourabh782 Date: Sun, 3 Nov 2024 13:56:37 +0530 Subject: [PATCH] Replaced css files with tailwind classes --- client/src/Animations.css | 47 ++++++++ client/src/Pages/Book.css | 70 ------------ client/src/Pages/Book.jsx | 17 ++- client/src/Pages/Cart.css | 3 - client/src/Pages/Cart.jsx | 58 +++++----- client/src/Pages/Contact.css | 31 ------ client/src/Pages/Contact.jsx | 8 +- client/src/Pages/Contributors.css | 141 ------------------------ client/src/Pages/Contributors.jsx | 17 +-- client/src/Pages/Wishlist.css | 85 -------------- client/src/Pages/Wishlist.jsx | 8 +- client/src/components/Footer/Footer.css | 116 ------------------- client/src/components/Footer/Footer.jsx | 46 ++++---- client/src/components/Preloader.css | 26 ----- client/src/components/Preloader.jsx | 4 +- client/src/components/SearchBar.js | 22 ++-- client/src/components/Searchbar.css | 36 ------ client/tailwind.config.js | 3 + 18 files changed, 140 insertions(+), 598 deletions(-) delete mode 100644 client/src/Pages/Book.css delete mode 100644 client/src/Pages/Contact.css delete mode 100644 client/src/Pages/Contributors.css delete mode 100644 client/src/Pages/Wishlist.css delete mode 100644 client/src/components/Footer/Footer.css delete mode 100644 client/src/components/Preloader.css delete mode 100644 client/src/components/Searchbar.css diff --git a/client/src/Animations.css b/client/src/Animations.css index 83629e1b..98371895 100644 --- a/client/src/Animations.css +++ b/client/src/Animations.css @@ -62,3 +62,50 @@ opacity: 1; } } + + + /* contributors animation */ + .contributor-card:hover { + transform: scale(1.05); + box-shadow: 0 4px 6px rgba(5, 205, 208, 0.752); +} + +.contributor-card:hover p { + text-shadow: 1px 1px 2px rgb(0, 225, 255), 0 0 0.2em rgb(0, 191, 255), 0 0 0.8em rgb(135, 206, 235); + color: rgb(0, 0, 0); + font-weight: 500; +} + +.contributor-card:hover h2 { + text-shadow: 1px 1px 2px rgba(237, 9, 176, 0.926), 0 0 0.2em rgb(0, 191, 255), 0 0 0.8em rgb(135, 206, 235); + color: white; + font-size: 1.04rem; + font-weight: 600; + text-decoration: wavy; +} + +.contributor-card:hover .contributor-avatar { + border: 3.5px solid #89e6f0; + width: 5.2rem; + box-shadow: -2px 4px 10px 1px rgba(1, 41, 218, 0.75); + height: 5.2rem; +} + +.contributor-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient(152deg, #0077b6 50%, #023e8a 50%); + transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; + transform: translate(-100%, -100%); + opacity: 0; + z-index: -1; +} + +.contributor-card:hover::before { + transform: translate(0, 0); + opacity: 1; +} \ No newline at end of file diff --git a/client/src/Pages/Book.css b/client/src/Pages/Book.css deleted file mode 100644 index e104767b..00000000 --- a/client/src/Pages/Book.css +++ /dev/null @@ -1,70 +0,0 @@ - - .book-container { - display: flex; /* Flexbox layout */ - max-width: 900px; /* Maximum width of the book container */ - margin: 20px; /* Margin around the container */ - padding: 16px; /* Padding inside the container */ - border: 1px solid #e2e8f0; /* Light gray border */ - border-radius: 8px; /* Rounded corners */ - box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */ - background-color: #fff; /* White background for the container */ - margin: 5rem auto; - } - - .book-cover { - width: 35%; /* Fixed width for the cover */ - height: auto; /* Auto height to maintain aspect ratio */ - object-fit: cover; /* Cover the area, maintaining aspect ratio */ - border-radius: 8px; /* Rounded corners for the image */ - } - - .book_img{ - width: 100%; - } - - .book-details { - width: 65%; - margin-left: 16px; /* Space between the image and details */ - display: flex; /* Flexbox layout for details */ - flex-direction: column; /* Vertical alignment */ - justify-content: center; /* Center vertically */ - } - - .book-title { - font-size: 24px; /* Title font size */ - font-weight: bold; /* Bold font */ - margin: 0; /* Remove default margin */ - } - - .book-author { - font-size: 20px; /* Author font size */ - color: #4a5568; /* Dark gray color */ - margin: 4px 0; /* Margin above and below author */ - } - - .book-description { - margin: 8px 0; /* Space above and below the description */ - color: #718096; /* Gray color for the text */ - } - - .published-date { - margin-top: 16px; /* Space above the published date */ - font-size: 18px; /* Font size for published date */ - font-weight: bold; /* Bold font for emphasis */ - } - - @media screen and (max-width: 900px){ - .book-container{ - flex-direction: column; - } - .book-cover{ - margin: 0 auto; - } - - .book-details{ - width: 100%; - margin: 0 auto; - padding: 2rem; - } - - } \ No newline at end of file diff --git a/client/src/Pages/Book.jsx b/client/src/Pages/Book.jsx index 0a967091..77c571a9 100644 --- a/client/src/Pages/Book.jsx +++ b/client/src/Pages/Book.jsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from 'react' import { useParams } from 'react-router-dom'; -import "./Book.css" const Book = () => { const { id } = useParams(); @@ -23,19 +22,19 @@ const Book = () => { return ( -
-
+
+
image
-
-

{book?.title}

-

{book?.authors[0]}

-

{book?.description}

-
+
+

{book?.title}

+

{book?.authors[0]}

+

{book?.description}

+
Published: {book?.publishedDate}
diff --git a/client/src/Pages/Cart.css b/client/src/Pages/Cart.css index c3468522..b030513d 100644 --- a/client/src/Pages/Cart.css +++ b/client/src/Pages/Cart.css @@ -50,9 +50,6 @@ text-align: left; } - .cart-table th { - /* background-color: #f2f2f2; */ - } .item-image { max-width: 60px; diff --git a/client/src/Pages/Cart.jsx b/client/src/Pages/Cart.jsx index 479ae3f3..e9f3158c 100644 --- a/client/src/Pages/Cart.jsx +++ b/client/src/Pages/Cart.jsx @@ -5,7 +5,7 @@ import { addItemToCart, removeItemFromCart, } from "../api/api.js"; -import "./Cart.css"; +// import "./Cart.css"; import Preloader from "../Components/Preloader"; import { useToast } from "../Context/ToastContext"; import { useNavigate } from "react-router-dom"; @@ -100,36 +100,36 @@ function Cart() { const renderCartItems = () => { return data.items.map((item) => ( - - -
+ + + - - - + + -
{item.name} {item.name}${item.price.toFixed(2)} + {item.name}${item.price.toFixed(2)} {item.quantity} + @@ -140,9 +140,9 @@ function Cart() { }; const renderSuggestedProducts = () => ( -
-

Suggested Products

-
    +
    +

    Suggested Products

    +
      @@ -209,14 +209,14 @@ function Cart() { return ( <> -
      -

      Shopping Cart

      +
      +

      Shopping Cart

      {error}

      -
      @@ -228,26 +228,26 @@ function Cart() { return ( <> -
      -

      Shopping Cart

      +
      +

      Shopping Cart

      {data && data.items && data.items.length > 0 ? ( <> - +
      - - - - - + + + + + {renderCartItems()}
      ImageNamePriceQuantityActionImageNamePriceQuantityAction
      -
      -
      +
      +
      Total: ${data ? data.total.toFixed(2) : "0.00"}
      -
      diff --git a/client/src/Pages/Contact.css b/client/src/Pages/Contact.css deleted file mode 100644 index 2e9c7b2b..00000000 --- a/client/src/Pages/Contact.css +++ /dev/null @@ -1,31 +0,0 @@ -.smalltitlefont { - color: #10a5f5; - font-family: Georgia, Times New Roman, Times, serif; - font-size: 1.2rem; - font-weight: 470; - letter-spacing: 1px; -} - -.formlevel { - color: #000; - font-family: Georgia, Times New Roman, Times, serif; - font-size: 1.2rem; - font-weight: 470; - letter-spacing: 1px; - padding: 2px; -} - -.mediumtitlefont { - color: #000; - font-size: 1.4rem; - font-weight: 600; - letter-spacing: 1px; -} - - -@media (max-width: 600px) { - .formlevel{ - font-size: 0.6rem; - } - } - \ No newline at end of file diff --git a/client/src/Pages/Contact.jsx b/client/src/Pages/Contact.jsx index 9f592653..3242778d 100644 --- a/client/src/Pages/Contact.jsx +++ b/client/src/Pages/Contact.jsx @@ -69,12 +69,12 @@ function Contact() { Get in Touch -

      +

      We are here for you. How can we help?

      -
      -
      -