Browse Source

modif style

master V2
BARRAUX Arthur 3 years ago
parent
commit
82cc066a60
  1. 6
      referant/js/admin.js
  2. 30
      stylepage.css

6
referant/js/admin.js

@ -2,19 +2,17 @@ function Edit(clas) {
let obj = document.getElementsByClassName(clas);
let data = new FormData();
if (obj[2].querySelector('input').value == 'edit') {
obj[1].innerHTML = '<input type="text" style="width: 80%;" value="' + obj[1].textContent + '">';
obj[1].innerHTML = '<input type="text" style="width: 100px;" value="' + obj[1].textContent + '">';
obj[2].querySelector('input').value = 'ok';
}
else {
let value = {};
value.login = obj[0].textContent;
value.pwd = obj[1].querySelector('input').value;
console.log(value);
let xhr = new XMLHttpRequest();
data.append('value', JSON.stringify(value));
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log(this.response);
obj[1].innerHTML = this.response[1];
obj[2].querySelector('input').value = 'edit';
}
@ -23,4 +21,4 @@ function Edit(clas) {
xhr.responseType = 'json';
xhr.send(data);
}
}
}

30
stylepage.css

@ -8,6 +8,7 @@
body{
z-index: 1;
font-family: monofonto;
background-color: #e5e5e5;
margin: 20px;
text-align: center;
@ -35,10 +36,13 @@ p{
form{
width: 400px;
position: relative;
width: 20%;
min-width: 300px;
background-color: #ffffff;
display: block;
position: relative;
margin: auto;
border-radius: 30px;
padding: 20px;
@ -94,10 +98,8 @@ form{
resize: none;
outline: none;
width: 100%;
text-align: inherit;
background-color: inherit;
-webkit-appearance: none;
-moz-appearance: none;
text-align: center;
background-color: rgba(0, 0, 0, 0);
appearance: none;
}
@ -134,6 +136,10 @@ form{
position: relative;
}
.help img{
border-radius: 15px;
}
code {
background-color: #aaa;
border-radius: 5px;
@ -185,7 +191,7 @@ nav> ul > li > a{
.menu:hover{
background-color: #59184E;
transition: 1s;
transition: .25s;
border-radius: 10px;
}
@ -213,10 +219,15 @@ table{
border: 1px solid #84878C;
}
th{
width: 100%;
}
td {
background-color: #e5e5e5;
border: 1px solid #84878C;
min-width: 20px;
border-radius: 5px;
text-align: center;
@ -224,8 +235,9 @@ td {
color: #84878C;
}
th{
width: 100%;
td img {
width: 40%;
max-width: 40px;
}

Loading…
Cancel
Save