Hacer que el selector de img sea circular
10259
pnpm-lock.yaml
Normal file
Before Width: | Height: | Size: 2.3 MiB After Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 383 KiB After Width: | Height: | Size: 136 KiB |
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 262 KiB After Width: | Height: | Size: 59 KiB |
BIN
public/img/wall16.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 309 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 168 KiB |
BIN
public/img/wall17.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 132 KiB |
BIN
public/img/wall18.png
Normal file
After Width: | Height: | Size: 295 KiB |
BIN
public/img/wall18.webp
Normal file
After Width: | Height: | Size: 45 KiB |
BIN
public/img/wall19.jpg
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
public/img/wall19.webp
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
public/img/wall20.png
Normal file
After Width: | Height: | Size: 781 KiB |
BIN
public/img/wall20.webp
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
public/img/wall21.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
public/img/wall21.webp
Normal file
After Width: | Height: | Size: 174 KiB |
@ -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>;
|
||||||
}
|
}
|
||||||
|
@ -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`
|
||||||
|