Skip to content

Commit

Permalink
Add change color in hover at the blog text image
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMejia77 committed Mar 21, 2024
1 parent aac9487 commit dfdb67b
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 12 deletions.
34 changes: 34 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"react-icons": "^5.0.1",
"react-image-gallery": "^1.3.0",
"react-star-ratings": "^2.3.0",
"react-svg": "^16.1.33",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.7"
},
Expand Down
2 changes: 1 addition & 1 deletion public/icons/blogLogo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ html,
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}

.fil0 {
height: 100%;
width: 100%;
}
svg:hover .fil0 {
fill: red;
}
* {
@apply border-border;
}
Expand Down
25 changes: 15 additions & 10 deletions src/components/Blog/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
"use client";
import { ReactSVG } from "react-svg";
import Link from "next/link";
import Image from "next/image";
import { FC } from "react";

const Blog: FC = () => {
return (
<section className='w-full bg-black'>
<Link className="bg-cover bg-center bg-no-repeat bg-fixed bg-banner flex items-center justify-center max-w-[1920px] mx-auto px-4 ms:px-0" href={'https://actualizatucarro.blogspot.com'} target='_blank'>
<Image
src={'/images/blog.webp'}
alt="Título del Blog"
width={668}
height={363}
loading="lazy"
/>
</Link>
<section className="w-full bg-black">
<Link
className="bg-cover bg-center bg-no-repeat bg-fixed bg-banner flex items-center justify-center max-w-[1920px] mx-auto px-4 ms:px-0"
href={"https://actualizatucarro.blogspot.com"}
target="_blank"
>
<ReactSVG
src="/icons/blogLogo.svg"
beforeInjection={(svg) => {
svg.classList.add("fil0");
}}
/>
</Link>
</section>
);
};
Expand Down

0 comments on commit dfdb67b

Please sign in to comment.