reconstruire UC inceput
@@ -15,6 +15,8 @@ body, html {
|
||||
}
|
||||
|
||||
.container {
|
||||
opacity: 0;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-evenly;
|
||||
|
||||
@@ -13,78 +13,9 @@ body, html {
|
||||
background-repeat: no-repeat;
|
||||
|
||||
}
|
||||
|
||||
.overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.85);
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ceo-validation-form {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 300px;
|
||||
padding: 20px;
|
||||
background: #1B1A55;
|
||||
border-radius: 10px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.ceo-validation-form h2 {
|
||||
text-align: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.form-actions button {
|
||||
padding: 10px 20px;
|
||||
margin: 0 10px;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input {
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
width: 80%;
|
||||
padding: 1rem;
|
||||
margin: 0.7rem;
|
||||
background-color: #1B1A55;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#back_button {
|
||||
background-color: #f44336;
|
||||
width: 35%;
|
||||
height: auto;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#submit_button {
|
||||
background-color: #4CAF50;
|
||||
width: 35%;
|
||||
height: auto;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.container {
|
||||
opacity: 0;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-evenly;
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
.fade-in {
|
||||
animation: fadeInAnimation 0.5s ease-in forwards;
|
||||
}
|
||||
|
||||
.fade-out {
|
||||
animation: fadeOutAnimation 0.5s ease-out forwards;
|
||||
}
|
||||
|
||||
@keyframes fadeInAnimation {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadeOutAnimation {
|
||||
from {
|
||||
opacity: 1;
|
||||
}
|
||||
to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,28 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="/images/hard-disk.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" type="text/css" href="/css/login.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/transition.css">
|
||||
<script src="/js/login.js"></script>
|
||||
<script>
|
||||
function fadeIn() {
|
||||
document.querySelector('.container').classList.remove('fade-out');
|
||||
document.querySelector('.container').classList.add('fade-in');
|
||||
}
|
||||
|
||||
function fadeOut(destination) {
|
||||
const container = document.querySelector('.container');
|
||||
container.classList.remove('fade-in');
|
||||
container.classList.add('fade-out');
|
||||
|
||||
container.addEventListener('animationend', () => {
|
||||
window.location.href = destination;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<title>Login</title>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="fadeIn()">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>DO WE KNOW</h1>
|
||||
|
||||
@@ -5,12 +5,28 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="/images/hard-disk.ico" type="image/x-icon">
|
||||
<link rel="stylesheet" href="/css/main_menu.css">
|
||||
<link rel="stylesheet" href="/css/transition.css">
|
||||
|
||||
<script src="/js/main_menu.js"></script>
|
||||
<script>
|
||||
function fadeIn() {
|
||||
document.querySelector('.container').classList.remove('fade-out');
|
||||
document.querySelector('.container').classList.add('fade-in');
|
||||
}
|
||||
|
||||
function fadeOut() {
|
||||
document.querySelector('.container').classList.remove('fade-in');
|
||||
document.querySelector('.container').classList.add('fade-out');
|
||||
// Redirect after fadeOut animation completes (adjust timeout as needed)
|
||||
setTimeout(() => {
|
||||
window.location.href = 'your_redirect_url.html';
|
||||
}, 500);
|
||||
}
|
||||
</script>
|
||||
|
||||
<title>Main Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<body onload="fadeIn()">
|
||||
<div class="container">
|
||||
<div class="main_block">
|
||||
<div class="header">
|
||||
@@ -28,7 +44,10 @@
|
||||
</div>
|
||||
<div class="content_buttons">
|
||||
<button id="ceo_info" name="menu_button">Get CEO Info</button>
|
||||
<button id="set_conf" name="menu_button">Set Server Conf File</button>
|
||||
<button id="users_info" name="menu_button">Get All Users</button>
|
||||
</div>
|
||||
<div class="content_buttons">
|
||||
<button id="reset_uc" name="menu_button">Reset UC</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
|
||||
|
Before Width: | Height: | Size: 298 KiB After Width: | Height: | Size: 298 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -26,7 +26,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
document.cookie = `email=${result.user.email};`;
|
||||
document.cookie = `name=${result.user.name};`;
|
||||
|
||||
window.location.href = '/';
|
||||
fadeOut('/');
|
||||
} else {
|
||||
alert('Incorrect credentials. Please try again.');
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const startUcButton = document.getElementById('start_uc');
|
||||
const stopUcButton = document.getElementById('stop_uc');
|
||||
const ceoInfoButton = document.getElementById('ceo_info');
|
||||
const setConfButton = document.getElementById('set_conf');
|
||||
const usersInfoButton = document.getElementById('users_info');
|
||||
const resetUcButton = document.getElementById('reset_uc');
|
||||
const logoutButton = document.getElementById('logout');
|
||||
|
||||
startUcButton.addEventListener('click', () => {
|
||||
@@ -63,11 +64,15 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('Ceo Info Button pressed');
|
||||
})
|
||||
|
||||
setConfButton.addEventListener('click', () => {
|
||||
usersInfoButton.addEventListener('click', () => {
|
||||
console.log('Users Info Button pressed');
|
||||
})
|
||||
|
||||
resetUcButton.addEventListener('click', () => {
|
||||
console.log('Set Conf Button pressed');
|
||||
})
|
||||
|
||||
logoutButton.addEventListener('click', function() {
|
||||
logoutButton.addEventListener('click', () => {
|
||||
console.log('Logout button was clicked');
|
||||
|
||||
const deleteCookie = (name) => {
|
||||
@@ -77,6 +82,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
deleteCookie('email');
|
||||
deleteCookie('name');
|
||||
|
||||
window.location.href = '/login';
|
||||
fadeOut('/login');
|
||||
});
|
||||
});
|
||||
|
||||