Hacer que el selector de img sea circular

This commit is contained in:
Araozu 2021-01-14 19:01:30 -05:00
parent 02899b0285
commit c53aa12acc
20 changed files with 10270 additions and 15 deletions

10259
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

After

Width:  |  Height:  |  Size: 136 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
public/img/wall16.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 168 KiB

BIN
public/img/wall17.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 132 KiB

BIN
public/img/wall18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 KiB

BIN
public/img/wall18.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
public/img/wall19.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
public/img/wall19.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
public/img/wall20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 KiB

BIN
public/img/wall20.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
public/img/wall21.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
public/img/wall21.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -2,7 +2,7 @@ import { estilosGlobales } from "./Estilos";
import { StyleSheet, css } from "aphrodite"; import { StyleSheet, css } from "aphrodite";
import { numWallpaper, setNumWallpaper } from "./Store"; import { numWallpaper, setNumWallpaper } from "./Store";
const totalWallpapers = 17; const totalWallpapers = 21;
function CambiadorImg() { function CambiadorImg() {
const e = StyleSheet.create({ const e = StyleSheet.create({
@ -36,6 +36,9 @@ function CambiadorImg() {
if (num > 0) { if (num > 0) {
setNumWallpaper(num - 1); setNumWallpaper(num - 1);
localStorage.setItem("num-img", (num - 1).toString()); localStorage.setItem("num-img", (num - 1).toString());
} else {
setNumWallpaper(totalWallpapers);
localStorage.setItem("num-img", (totalWallpapers).toString());
} }
}; };
@ -44,28 +47,21 @@ function CambiadorImg() {
if (num < totalWallpapers) { if (num < totalWallpapers) {
setNumWallpaper(num + 1); setNumWallpaper(num + 1);
localStorage.setItem("num-img", (num + 1).toString()); localStorage.setItem("num-img", (num + 1).toString());
} else {
setNumWallpaper(0);
localStorage.setItem("num-img", (0).toString());
} }
}; };
const clasesLeft = () =>
numWallpaper() <= 0
? "ph-arrow-left " + css(e.boton, e.botonDesactivado, e.botonLeft)
: "ph-arrow-left " + css(e.boton, e.botonLeft);
const clasesRight = () =>
numWallpaper() >= totalWallpapers
? "ph-arrow-right " + css(e.boton, e.botonDesactivado, e.botonRight)
: "ph-arrow-right " + css(e.boton, e.botonRight);
return <div className={css(estilosGlobales.inlineBlock, e.contCambiador)}> return <div className={css(estilosGlobales.inlineBlock, e.contCambiador)}>
<span className={css(estilosGlobales.contenedor, estilosGlobales.inlineBlock)}> <span className={css(estilosGlobales.contenedor, estilosGlobales.inlineBlock)}>
<i <i
className={clasesLeft()} className={"ph-arrow-left " + css(e.boton, e.botonLeft)}
onClick={retrocederWallpaper} onClick={retrocederWallpaper}
/> />
Img. {numWallpaper() + 1} Img. {numWallpaper() + 1}
<i <i
className={clasesRight()} className={"ph-arrow-right " + css(e.boton, e.botonRight)}
onClick={avanzarWallpaper} onClick={avanzarWallpaper}
/> />
</span> </span>
@ -97,8 +93,8 @@ export function BarraSuperior() {
GitHub GitHub
<i class="ph-arrow-up-right"/> <i class="ph-arrow-up-right"/>
</a> </a>
<CambiadorImg/>
<span className={css(estilosGlobales.contenedor, estilosGlobales.inlineBlock)}>2021-A</span> <span className={css(estilosGlobales.contenedor, estilosGlobales.inlineBlock)}>2021-A</span>
<span className={css(estilosGlobales.contenedor, estilosGlobales.inlineBlock)}>Ingeniería de Sistemas</span> <span className={css(estilosGlobales.contenedor, estilosGlobales.inlineBlock)}>Ingeniería de Sistemas</span>
<CambiadorImg/>
</header>; </header>;
} }

View File

@ -17,7 +17,7 @@ export function Wallpaper() {
cover: { cover: {
width: "100vw", width: "100vw",
height: "100vh", height: "100vh",
backgroundPosition: "bottom", backgroundPosition: "center",
backgroundSize: "cover", backgroundSize: "cover",
zIndex: -1, zIndex: -1,
transition: `opacity ${duracionTransicion}ms` transition: `opacity ${duracionTransicion}ms`