Skip to content

Commit

Permalink
Merge pull request #59 from enflujo/perezoso-lindo
Browse files Browse the repository at this point in the history
🚧 Perezoso lindo
  • Loading branch information
1cgonza authored Sep 18, 2024
2 parents 1299b54 + 6142679 commit bd523a6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
19 changes: 19 additions & 0 deletions src/componentes/FiltroSVG.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<svg class="cajaFiltroSVG" x="0%" y="0%" width="0%" height="0%" color-interpolation-filters="sRGB">
<filter id="filtroSVG_colorEnFlujo">
<feColorMatrix
type="matrix"
values="1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
0 0 0 1 0"
in="SourceGraphic"
result="colormatrix"></feColorMatrix>
<feComponentTransfer in="colormatrix" result="componentTransfer">
<feFuncR type="table" tableValues="0.34 1"></feFuncR>
<feFuncG type="table" tableValues="0.34 1"></feFuncG>
<feFuncB type="table" tableValues="0.97 1"></feFuncB>
<feFuncA type="table" tableValues="0 1"></feFuncA>
</feComponentTransfer>
<feBlend mode="lighten" in="componentTransfer" in2="SourceGraphic" result="blend"></feBlend>
</filter>
</svg>
9 changes: 9 additions & 0 deletions src/componentes/Tarjeta.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import { urlImagen } from '@/utilidades/ayudas';
import FiltroSVG from './FiltroSVG.astro';
const { datos, imagen, coleccion } = Astro.props;
const dimsImg = { ancho: '630', alto: '350' };
---
Expand Down Expand Up @@ -41,10 +42,12 @@ const dimsImg = { ancho: '630', alto: '350' };

<slot />
</section>
<FiltroSVG />
</div>

<style lang="scss" is:global>
@import '@/scss/_constantes.scss';

.tarjeta {
display: flex;
flex-direction: column;
Expand All @@ -55,6 +58,12 @@ const dimsImg = { ancho: '630', alto: '350' };
line-height: 0;
}

.perezoso {
&:hover {
filter: url(#filtroSVG_colorEnFlujo);
}
}

img {
height: auto;
width: 100%;
Expand Down
1 change: 0 additions & 1 deletion src/scss/estilosGlobales.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ h3 {
.contenedorTarjetas {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
justify-content: space-around;
}
Expand Down

0 comments on commit bd523a6

Please sign in to comment.