From 4083b4616219ca529e053d51c4ebfd289607460d Mon Sep 17 00:00:00 2001 From: Atul Patidar <48468580+AtulPatidar1709@users.noreply.github.com> Date: Tue, 15 Aug 2023 19:14:49 +0530 Subject: [PATCH 1/2] #584 Share Icon for twitter added with some pre written text about our Website. --- src/components/Card.jsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/Card.jsx b/src/components/Card.jsx index d659a9f..2362c4c 100644 --- a/src/components/Card.jsx +++ b/src/components/Card.jsx @@ -1,7 +1,15 @@ import React from "react"; import { motion } from "framer-motion"; - +import { BiSolidShareAlt } from "react-icons/bi"; const Card = ({ title, link, description, i, img }) => { + const handleShareClick = () => { + const tweetText = encodeURIComponent( + "Just stumbled upon an amazing free resource for learning programming! 🚀 Sharing the wealth of knowledge, check it out! 💻 Link :- https://web-resources-hub-project.vercel.app/" + " " + "#Programming #LearningJourney" + ); + const twitterURL = `https://twitter.com/intent/tweet?text=${tweetText}`; + window.open(twitterURL, "_blank"); + }; + return ( { animate={{ opacity: 1, translateX: 0 }} transition={{ duration: 0.2, delay: i * 0.2 }} > +
+ +
{/* src={`'${img}'`} */} img From fee2034a175bc2e7b90571a3aff858bcb6185d5c Mon Sep 17 00:00:00 2001 From: Atul Patidar <48468580+AtulPatidar1709@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:42:28 +0530 Subject: [PATCH 2/2] Fix: Change some css #654 --- src/components/Card.jsx | 53 ++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/src/components/Card.jsx b/src/components/Card.jsx index 2362c4c..6f81124 100644 --- a/src/components/Card.jsx +++ b/src/components/Card.jsx @@ -1,10 +1,13 @@ import React from "react"; import { motion } from "framer-motion"; import { BiSolidShareAlt } from "react-icons/bi"; + const Card = ({ title, link, description, i, img }) => { const handleShareClick = () => { const tweetText = encodeURIComponent( - "Just stumbled upon an amazing free resource for learning programming! 🚀 Sharing the wealth of knowledge, check it out! 💻 Link :- https://web-resources-hub-project.vercel.app/" + " " + "#Programming #LearningJourney" + "Just stumbled upon an amazing free resource for learning programming! 🚀 Sharing the wealth of knowledge, check it out! 💻 Link :- https://web-resources-hub-project.vercel.app/" + + " " + + "#Programming #LearningJourney" ); const twitterURL = `https://twitter.com/intent/tweet?text=${tweetText}`; window.open(twitterURL, "_blank"); @@ -12,36 +15,26 @@ const Card = ({ title, link, description, i, img }) => { return ( - -
- -
-
- {/* src={`'${img}'`} */} - img -
- -
-

- {title} -

- -

- {description.slice(0, 120) + "..."} -

+
+
+
+ {title} +
+ +
+
+
+

{title}

+

+ {description.slice(0, 120) + "..."} +

+
- +
); };