[Arreglar] los input para cambiar la imagen de efil y de fondo

This commit is contained in:
francisco-solis99 2022-05-17 22:27:40 -05:00
parent ca3e9bf93a
commit cee32ae7ca
3 changed files with 27 additions and 8 deletions

View File

@ -43,6 +43,9 @@ body {
margin: 0;
position: relative;
min-height: 100vh;
min-width: 320px;
max-width: 2048px;
margin: 0 auto;
}
/**

View File

@ -112,7 +112,19 @@ header::before {
visibility: hidden;
}
.edit__btn-photo::before {
.edit__btn-photo::-moz-file-upload-button {
visibility: hidden;
}
input[type="file"] {
-moz-appearance:initial; // Hack for Firefox Browsers
opacity: 0;
visibility: hidden;
color: black;
background-color: red;
}
.edit__field-out::before {
content: '✎';
color: white;
display: inline-block;
@ -129,17 +141,17 @@ header::before {
transition: all ease-in 300ms;
}
.btn-photo::before {
top: -70px;
.edit__field-avatar::before {
top: -90px;
left: 50%;
transform: translateX(-50%);
font-size: 1.8rem;
background-color: rgba(0, 0, 0, 0.2);
}
.btn-backPhoto::before {
.edit__field-background::before {
right: 0;
top: -25%;
top: -40%;
font-size: 2rem;
}

View File

@ -54,10 +54,14 @@
<form method="POST" action="<?= NABU_ROUTES['edit-profile'] ?>" enctype="multipart/form-data" class='edit__form'>
<input type="hidden" name="csrf" value="<?= $token ?>">
<input type="file" id="avatar" name="avatar" accept="<?= NABU_DEFAULT['image-formats'] ?>" class='edit__btn-photo btn-photo'>
<label for="avatar" class="edit__field-out edit__field-avatar">
<input type="file" id="avatar" name="avatar" accept="<?= NABU_DEFAULT['image-formats'] ?>" class='edit__btn-photo btn-photo'>
</label>
<label for="background" class="edit__field-out edit__field-background">
<input type="file" id="background" name="background" accept="<?= NABU_DEFAULT['image-formats'] ?>" class='edit__btn-photo btn-backPhoto'>
</label>
<input type="file" id="background" name="background" accept="<?= NABU_DEFAULT['image-formats'] ?>" class='edit__btn-photo btn-backPhoto'>
<label for="username" class="edit__field">
<span class="edit__entry">Nombre de Usuario</span>