scss cleaning

This commit is contained in:
Candifloss 2024-10-28 16:38:40 +05:30
parent e2359a5c1b
commit 297ce7be55
9 changed files with 350 additions and 319 deletions

View File

@ -44,6 +44,7 @@ body .form-container form {
body .form-container form .form-group { body .form-container form .form-group {
flex: 1 1 calc(50% - 20px); flex: 1 1 calc(50% - 20px);
min-width: 250px; min-width: 250px;
--value: 50;
} }
body .form-container form .form-group label { body .form-container form .form-group label {
display: block; display: block;
@ -78,20 +79,20 @@ body .form-container form .form-group select:focus {
border-color: #007b8a; border-color: #007b8a;
outline: none; outline: none;
} }
body .form-container form .admin-access label { body .form-container form .form-group.checkbox-set label {
display: block; display: block;
color: #4e4e4e; color: #4e4e4e;
font-size: 16px; font-size: 16px;
margin-bottom: 5px; margin-bottom: 5px;
} }
body .form-container form .admin-access .checkbox-group { body .form-container form .form-group.checkbox-set .checkboxes {
display: flex; display: flex;
gap: 10px; gap: 10px;
} }
body .form-container form .admin-access .checkbox-group input[type=checkbox] { body .form-container form .form-group.checkbox-set .checkboxes input[type=checkbox] {
display: none; display: none;
} }
body .form-container form .admin-access .checkbox-group label.checkbox { body .form-container form .form-group.checkbox-set .checkboxes label.checkbox {
cursor: pointer; cursor: pointer;
padding: 12px; padding: 12px;
border: 1px solid rgba(220, 220, 220, 0.8); border: 1px solid rgba(220, 220, 220, 0.8);
@ -103,28 +104,32 @@ body .form-container form .admin-access .checkbox-group label.checkbox {
transition: background-color 0.3s, color 0.3s, border-color 0.3s; transition: background-color 0.3s, color 0.3s, border-color 0.3s;
user-select: none; user-select: none;
} }
body .form-container form .admin-access .checkbox-group label.checkbox:hover, body .form-container form .admin-access .checkbox-group label.checkbox:focus { body .form-container form .form-group.checkbox-set .checkboxes label.checkbox:hover, body .form-container form .form-group.checkbox-set .checkboxes label.checkbox:focus {
background-color: rgba(232, 232, 232, 0.9); background-color: rgba(232, 232, 232, 0.9);
border-color: #007b8a; border-color: #007b8a;
} }
body .form-container form .admin-access .checkbox-group input[type=checkbox]:checked + label.checkbox { body .form-container form .form-group.checkbox-set .checkboxes input[type=checkbox]:checked + label.checkbox {
background-color: #009299; background-color: #009299;
color: #ffffff; color: #ffffff;
border-color: rgba(0, 170, 179, 0.8); border-color: rgba(0, 170, 179, 0.8);
} }
body .form-container form .role-dropdown { body .form-container form .form-group.dropdown-menu {
flex: 1 1 calc(50% - 20px); flex: 1 1 calc(50% - 20px);
min-width: 250px; min-width: 250px;
padding: 0; padding: 0;
} }
body .form-container form .radio-group { body .form-container form .form-group.radio-input .radio-group {
display: flex; display: flex;
gap: 10px; gap: 10px;
} }
body .form-container form .radio-group input[type=radio] { body .form-container form .form-group.radio-input .radio-group input[type=radio] {
display: none; display: none;
} }
body .form-container form .radio-group label.radio { body .form-container form .form-group.radio-input .radio-group label.radio {
width: 100%;
height: 100%;
border-radius: 6px;
background: linear-gradient(to right, rgba(245, 245, 245, 0.9) 0%, rgba(245, 245, 245, 0.9) var(--value), rgba(245, 245, 245, 0.9) var(--value));
cursor: pointer; cursor: pointer;
padding: 12px; padding: 12px;
border: 1px solid rgba(220, 220, 220, 0.8); border: 1px solid rgba(220, 220, 220, 0.8);
@ -136,21 +141,20 @@ body .form-container form .radio-group label.radio {
transition: background-color 0.3s, color 0.3s, border-color 0.3s; transition: background-color 0.3s, color 0.3s, border-color 0.3s;
user-select: none; user-select: none;
} }
body .form-container form .radio-group label.radio:hover, body .form-container form .radio-group label.radio:focus { body .form-container form .form-group.radio-input .radio-group label.radio:hover, body .form-container form .form-group.radio-input .radio-group label.radio:focus {
background-color: rgba(232, 232, 232, 0.9); background-color: rgba(232, 232, 232, 0.9);
border-color: #007b8a; border-color: #007b8a;
} }
body .form-container form .radio-group input[type=radio]:checked + label.radio { body .form-container form .form-group.radio-input .radio-group input[type=radio]:checked + label.radio {
background-color: #009299; background-color: #009299;
color: #ffffff; color: #ffffff;
border-color: rgba(0, 170, 179, 0.8); border-color: rgba(0, 170, 179, 0.8);
} }
body .form-container form input[type=range] { body .form-container form .form-group input[type=range] {
--value: 0;
width: 100%;
height: 45px;
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
width: 100%;
height: 45px;
border-radius: 6px; border-radius: 6px;
background-color: rgba(245, 245, 245, 0.9); background-color: rgba(245, 245, 245, 0.9);
border: 1px solid rgba(220, 220, 220, 0.8); border: 1px solid rgba(220, 220, 220, 0.8);
@ -158,75 +162,73 @@ body .form-container form input[type=range] {
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
} }
body .form-container form input[type=range]::-webkit-slider-runnable-track { body .form-container form .form-group input[type=range]::-webkit-slider-runnable-track {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6px; border-radius: 6px;
background: linear-gradient(to right, #007b8a 0%, #007b8a var(--value), rgba(245, 245, 245, 0.9) var(--value)); background-color: linear-gradient(to right, rgba(245, 245, 245, 0.9) 0%, rgba(245, 245, 245, 0.9) var(--value), rgba(245, 245, 245, 0.9) 100%);
} }
body .form-container form input[type=range]::-moz-range-track { body .form-container form .form-group input[type=range]::-moz-range-track {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6px; border-radius: 6px;
background: linear-gradient(to right, #007b8a 0%, #007b8a var(--value), rgba(245, 245, 245, 0.9) var(--value)); background-color: linear-gradient(to right, rgba(245, 245, 245, 0.9) 0%, rgba(245, 245, 245, 0.9) var(--value), rgba(245, 245, 245, 0.9) 100%);
} }
body .form-container form input[type=range]::-webkit-slider-thumb { body .form-container form .form-group input[type=range]::-webkit-slider-thumb {
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
width: 0; width: 10px;
height: 45px;
border-radius: 6px;
background-color: #007b8a;
cursor: pointer;
margin: 0;
padding: 0;
}
body .form-container form input[type=range]::-moz-range-thumb {
width: 0;
height: 45px; height: 45px;
border: none; border: none;
border-radius: 6px; border-radius: 6px;
background-color: #007b8a; background-color: rgba(245, 245, 245, 0.9);
cursor: pointer; cursor: pointer;
margin: 0; margin: 0;
padding: 0; padding: 0;
background-color: green;
} }
body .form-container form input[type=range]:focus { body .form-container form .form-group input[type=range]::-moz-range-thumb {
width: 10px;
height: 45px;
border: none;
border-radius: 6px;
background-color: rgba(245, 245, 245, 0.9);
cursor: pointer;
margin: 0;
padding: 0;
background-color: green;
}
body .form-container form .form-group input[type=range]:focus {
outline: none; outline: none;
border-color: #007b8a; border-color: #007b8a;
} }
body .form-container form .submit-button { body .form-container form .form-group.submit-buttons {
flex: 1 1 100%; flex: 1 1 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 20px; margin-top: 20px;
} }
body .form-container form .submit-button button { body .form-container form .form-group.submit-buttons button {
width: 48%; width: 48%;
text-align: center; text-align: center;
padding: 12px; padding: 12px;
border-radius: 6px; border-radius: 6px;
} }
body .form-container form .submit-button button.clear-button { body .form-container form .form-group.submit-buttons button.clear-button {
background-color: #c4c4c4; background-color: #c4c4c4;
color: #ffffff; color: #ffffff;
} }
body .form-container form .submit-button button.clear-button:hover { body .form-container form .form-group.submit-buttons button.clear-button:hover {
background-color: #8f9091; background-color: #8f9091;
} }
body .form-container form .submit-button button.clear-button:active { body .form-container form .form-group.submit-buttons button.submit {
transform: translateY(2px);
}
body .form-container form .submit-button button:not(.clear-button) {
background-color: #007b8a; background-color: #007b8a;
color: #ffffff; color: #ffffff;
border: none; border: none;
} }
body .form-container form .submit-button button:not(.clear-button):hover { body .form-container form .form-group.submit-buttons button.submit:hover {
background-color: #006b7a; background-color: #006b7a;
} }
body .form-container form .submit-button button:not(.clear-button):active { body .form-container form .form-group.submit-buttons button:active {
transform: translateY(2px); transform: translateY(2px);
} }
/*# sourceMappingURL=adduser.css.map */

View File

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["../scss/_common.scss","../scss/adduser.scss","../scss/_colors.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA;EACA;;;AAIJ;EACI;;;ACLJ;EACC;EACA,YCc2B;EDb3B;EACA;EACA;EACA;EACA;;AAGA;EACC,kBCOyB;EDNzB;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACC,OCFyB;EDGzB;EACA;EACA;EACA;;AAID;EACC;EACA;EACA;EACA;;AAGA;EACC;EACA;;AAGA;EACC;EACA,OCxBuB;EDyBvB;EACA;;AAID;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAQC;EACA;EACA;EACA;EACA,kBCxCuB;EDyCvB;EACA;;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EACC,cC3C8B;ED4C9B;;AAMF;EACC;EACA,OCxDuB;EDyDvB;EACA;;AAGD;EACC;EACA;;AAGA;EACC;;AAID;EACC;EACA;EACA;EACA;EACA,kBC1EsB;ED2EtB;EACA;EACA;EACA;EACA;;AAGA;EAEC,kBCtEiC;EDuEjC,cCjEwC;;ADsE1C;EACC,kBC5EmC;ED6EnC,OC1EwC;ED2ExC,cCxE0C;;AD8E7C;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAGA;EACC;;AAID;EACC;EACA;EACA;EACA;EACA,kBCxHuB;EDyHvB;EACA;EACA;EACA;EACA;;AAGA;EAEC,kBC1G+B;ED2G/B,cCrGsC;;AD0GxC;EACC,kBChHiC;EDiHjC,OC9GsC;ED+GtC,cC5GwC;;ADiH1C;EACC;EACA;EACA;EACA;EACA;EACA;EACA,kBCvJwB;EDwJxB;EACA;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;;AAID;EACC;EACA;EACA;EACA;EACA;EACA,kBC/KmB;EDiLnB;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA,kBC3LmB;ED4LnB;EACA;EACA;;AAGD;EACC;EACA,cCrM+B;;AD0MjC;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAGA;EACC,kBCjNwB;EDkNxB,OChN6B;;ADkN7B;EACC,kBCpN6B;;ADuN9B;EACC;;AAKF;EACC,kBCpOkB;EDqOlB,OCnOuB;EDoOvB;;AAEA;EACC,kBCxOuB;;AD2OxB;EACC","file":"adduser.css"}

View File

@ -101,5 +101,3 @@ body .login-container form button:active {
transform: translateY(0); transform: translateY(0);
box-shadow: 0 2px 6px rgba(70, 70, 70, 0.2); box-shadow: 0 2px 6px rgba(70, 70, 70, 0.2);
} }
/*# sourceMappingURL=login.css.map */

View File

@ -1 +0,0 @@
{"version":3,"sourceRoot":"","sources":["../scss/_common.scss","../scss/login.scss","../scss/_colors.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA;EACA;;;AAIJ;EACI;;;ACNJ;EAEI;EACA,YCL0B;EDM1B;EACA;EACA;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;;AAKJ;EACI;EACA,OChCe;EDiCf;;AAIJ;EACI;EACA,OCtCmB;;AD2C3B;EACI,kBC1CgB;ED2ChB;EACA;EACA;EACA;EACA;;AAGA;EACI;EACA;EACA,OCnDa;EDoDb;;AAGJ;EACI;EACA;EACA;;AAGA;AAAA;EAEI;EACA;EACA;EACA;EACA;EACA;EACA,kBCpEc;EDqEd;;AAEA;AAAA;EACI,cCrEkB;;ADuEtB;AAAA;EACI,cCvEkB;EDwElB,kBC3EkB;ED4ElB;;AAIR;EACI;EACA;EACA,kBC/EK;EDgFL,OC5EU;ED6EV;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI,kBCzFO;;AD4FX;EACI;EACA","file":"login.css"}

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/home/lcm/Works/ldapmanager/test/css/adduser.css"> <link rel="stylesheet" href="/home/ucadmin/Documents/Scripts/b/Test/ldapmanager/test/css/adduser.css">
<title>Add New User</title> <title>Add New User</title>
</head> </head>
<body> <body>
@ -71,7 +71,7 @@
<input type="range" class="range-slider" id="experience_level" name="experience_level" min="0" max="100" step="1"> <input type="range" class="range-slider" id="experience_level" name="experience_level" min="0" max="100" step="1">
</div> </div>
<div class="form-group role-dropdown"> <div class="form-group dropdown-menu">
<label for="role">User Role</label> <label for="role">User Role</label>
<select id="role" name="role" required> <select id="role" name="role" required>
<option value="" class="placeholder-option">--Select Role--</option> <option value="" class="placeholder-option">--Select Role--</option>
@ -81,9 +81,9 @@
</select> </select>
</div> </div>
<div class="form-group admin-access"> <div class="form-group checkbox-set">
<label>Admin Access</label> <label>Admin Access</label>
<div class="checkbox-group"> <div class="checkboxes">
<input type="checkbox" id="add-access" name="add_access"> <input type="checkbox" id="add-access" name="add_access">
<label class="checkbox" for="add-access">Add</label> <label class="checkbox" for="add-access">Add</label>
@ -100,7 +100,7 @@
<input type="datetime-local" id="password-expire-at" name="password_expire_at" value="2018-06-12T19:30"> <input type="datetime-local" id="password-expire-at" name="password_expire_at" value="2018-06-12T19:30">
</div> </div>
<div class="form-group"> <div class="form-group radio-input">
<label>Account Status</label> <label>Account Status</label>
<div class="radio-group"> <div class="radio-group">
<input type="radio" id="active" name="account_status" value="active"> <input type="radio" id="active" name="account_status" value="active">
@ -111,14 +111,14 @@
</div> </div>
</div> </div>
<div class="form-group submit-button"> <div class="form-group submit-buttons">
<button type="reset" class="clear-button">Clear</button> <button type="reset" class="clear-button">Clear</button>
<button type="submit">Add User</button> <button type="submit" class="submit">Add User</button>
</div> </div>
</form> </form>
</div> </div>
</body> </body>
<script src="/home/lcm/Works/ldapmanager/test/js/rangeslider.js"></script> <script src="/home/ucadmin/Documents/Scripts/b/Test/ldapmanager/test/js/rangeslider.js"></script >
</html> </html>

View File

@ -6,7 +6,7 @@ document.addEventListener('DOMContentLoaded', function () {
const max = rangeInput.max; const max = rangeInput.max;
// Get the initial value; if not set, default to 0 // Get the initial value; if not set, default to 0
const initialValue = rangeInput.value ? Number(rangeInput.value) : 0; // This may not work on all browsers. Firefox defaults this to 50 const initialValue = rangeInput.value ? Number(rangeInput.value) : 50; // This may not work on all browsers. Firefox defaults this to 50
// console.log("initial val: " + initialValue); // console.log("initial val: " + initialValue);
const initialPercentage = (initialValue / max) * 100; const initialPercentage = (initialValue / max) * 100;

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
idir="/home/lcm/Works/ldapmanager/test/scss" idir="/home/ucadmin/Documents/Scripts/b/Test/ldapmanager/test/scss"
odir="/home/lcm/Works/ldapmanager/test/css" odir="/home/ucadmin/Documents/Scripts/b/Test/ldapmanager/test/css"
inotifywait -e modify -m -r $idir | while read events; do inotifywait -e modify -m -r $idir | while read events; do
sass $idir/:$odir/ sass $idir/:$odir/ --no-source-map
done; done;

View File

@ -1,58 +1,83 @@
// Login page colors // Login page ///////////////////////////////////////
// Page
$login-page-background-color: linear-gradient(135deg, #5b727a, #355347); $login-page-background-color: linear-gradient(135deg, #5b727a, #355347);
$login-page-appname-color: #ffffff; $login-page-appname-color: #ffffff;
$login-page-description-color: rgba(207, 217, 215, 0.9); $login-page-description-color: rgba(207, 217, 215, 0.9);
//$login-page-logo-shadow-color: rgba(0, 0, 0, 0.2); //$login-page-logo-shadow-color: rgba(0, 0, 0, 0.2);
// Log in form
$login-form-background: rgba(255, 255, 255, 0.9); $login-form-background: rgba(255, 255, 255, 0.9);
$login-form-shadow-color: rgba(0, 0, 0, 0.2); $login-form-shadow-color: rgba(0, 0, 0, 0.2);
$login-form-title-color: #5f5f5f; $login-form-title-color: #5f5f5f;
// Input fields
$login-form-input-background: rgba(255, 255, 255, 0.95); $login-form-input-background: rgba(255, 255, 255, 0.95);
$login-form-input-focused-background: #fff; $login-form-input-focused-background: #fff;
$login-form-input-border-color: rgba(232, 232, 232, 0.7); $login-form-input-border-color: rgba(232, 232, 232, 0.7);
$login-form-input-hover-border-color: #005f73; $login-form-input-hover-border-color: #005f73;
$login-form-input-focus-border-color: #005f73; $login-form-input-focus-border-color: #005f73;
// Submit button
$login-button-color: #003f5c; $login-button-color: #003f5c;
$login-button-hover-color: #2f798a; $login-button-hover-color: #2f798a;
$login-button-shadow: rgba(0, 95, 115, 0.3); $login-button-shadow: rgba(0, 95, 115, 0.3);
$login-button-active-shadow: rgba(70, 70, 70, 0.2); $login-button-active-shadow: rgba(70, 70, 70, 0.2);
$login-button-text-color: #fff; $login-button-text-color: #fff;
// Add New User Page Colors // Add New User Page ////////////////////////////////
$add-user-background-color: linear-gradient(135deg, #283e4a, #1c2e38); // Background gradient
$add-user-header-color: #ffffff; // Header text color (white for contrast) // Page
$add-user-background-color: linear-gradient(135deg, #283e4a, #1c2e38); // Background gradient
// Form
//$add-user-header-color: #ffffff; // Header text color (white for contrast)
$add-user-form-background: rgba(255, 255, 255, 0.92); // Form background color $add-user-form-background: rgba(255, 255, 255, 0.92); // Form background color
$add-user-form-shadow-color: rgba(0, 0, 0, 0.25); // Form shadow color $add-user-form-shadow-color: rgba(0, 0, 0, 0.25); // Form shadow color
$add-user-form-title-color: #4e4e4e; // Form title color $add-user-form-title-color: #4e4e4e; // Form title color
// Input fileds
$add-user-input-background: rgba(245, 245, 245, 0.9); // Input field background color $add-user-input-background: rgba(245, 245, 245, 0.9); // Input field background color
$add-user-input-border-color: rgba(220, 220, 220, 0.8); // Input field border color $add-user-input-border-color: rgba(220, 220, 220, 0.8);
$add-user-input-focus-border-color: #007b8a; // Focus border color for inputs $add-user-input-focus-border-color: #007b8a;
$add-user-button-color: #007b8a; // Primary button color // Submit button
$add-user-button-color: #007b8a; // Normal button color
$add-user-button-hover-color: #006b7a; // Button hover color $add-user-button-hover-color: #006b7a; // Button hover color
$add-user-button-text-color: #ffffff; // Button text color $add-user-button-text-color: #ffffff; // Button text color
$add-user-button-shadow: rgba(0, 123, 138, 0.3); // Button shadow color $add-user-button-shadow: rgba(0, 123, 138, 0.3); // Button shadow color
// Reset button
$add-user-clear-button-color: #c4c4c4;; $add-user-clear-button-color: #c4c4c4;;
$add-user-clear-button-hover-color: #8f9091; $add-user-clear-button-hover-color: #8f9091;
$add-user-clear-button-text-color: #ffffff; $add-user-clear-button-text-color: #ffffff;
// Check-box buttons
// Unchecked
$user-form-checkbox-button-color: #007b8a; $user-form-checkbox-button-color: #007b8a;
$user-form-checkbox-button-hover-color: rgba(232, 232, 232, 0.9);
$user-form-checkbox-button-active-color: #009299;
$user-form-checkbox-button-text-color: #007b8a; $user-form-checkbox-button-text-color: #007b8a;
$user-form-checkbox-button-hover-text-color: #007b8a;
$user-form-checkbox-button-active-text-color: #ffffff;
$user-form-checkbox-button-border-color: rgba(220, 220, 220, 0.8); $user-form-checkbox-button-border-color: rgba(220, 220, 220, 0.8);
// Hover
$user-form-checkbox-button-hover-color: rgba(232, 232, 232, 0.9);
$user-form-checkbox-button-hover-text-color: #007b8a;
$user-form-checkbox-button-hover-border-color: #007b8a; $user-form-checkbox-button-hover-border-color: #007b8a;
// Checked
$user-form-checkbox-button-active-color: #009299;
$user-form-checkbox-button-active-text-color: #ffffff;
$user-form-checkbox-button-active-border-color: rgba(0, 170, 179, 0.8); $user-form-checkbox-button-active-border-color: rgba(0, 170, 179, 0.8);
$user-form-radio-button-color: #007b8a; // Radio buttons
$user-form-radio-button-hover-color: rgba(232, 232, 232, 0.9); // Unselected
$user-form-radio-button-active-color: #009299; $user-form-radio-button-color: $user-form-checkbox-button-color;
$user-form-radio-button-text-color: #007b8a; $user-form-radio-button-text-color: $user-form-checkbox-button-text-color;
$user-form-radio-button-hover-text-color: #007b8a; $user-form-radio-button-border-color: $user-form-checkbox-button-border-color;
$user-form-radio-button-active-text-color: #ffffff; // Hover
$user-form-radio-button-border-color: rgba(220, 220, 220, 0.8); $user-form-radio-button-hover-color: $user-form-checkbox-button-hover-color;
$user-form-radio-button-hover-border-color: #007b8a; $user-form-radio-button-hover-text-color: $user-form-checkbox-button-hover-text-color;
$user-form-radio-button-active-border-color: rgba(0, 170, 179, 0.8); $user-form-radio-button-hover-border-color: $user-form-checkbox-button-hover-border-color;
// Selected
$user-form-radio-button-active-color: $user-form-checkbox-button-active-color;
$user-form-radio-button-active-text-color: $user-form-checkbox-button-active-text-color;
$user-form-radio-button-active-border-color: $user-form-checkbox-button-active-border-color;
//Range slider
$user-form-range-slider-background: $add-user-input-background;
$user-form-range-slider-filled: $add-user-input-background;
$form-range-slider-background-gradient: linear-gradient(to right, $user-form-range-slider-filled 0%, $user-form-range-slider-filled var(--value), $user-form-range-slider-background var(--value));

View File

@ -3,273 +3,281 @@
// Basic styling for the body // Basic styling for the body
body { body {
font-family: 'Arial', sans-serif; font-family: 'Arial', sans-serif;
background: $add-user-background-color; // Use background gradient for the page background: $add-user-background-color; // Use background gradient for the page
display: flex; display: flex;
justify-content: center; // Center the form horizontally justify-content: center; // Center the form horizontally
align-items: center; // Center the form vertically align-items: center; // Center the form vertically
height: 100%; height: 100%;
padding: 20px; // Add some padding for mobile responsiveness padding: 20px; // Add some padding for mobile responsiveness
// Container for the form // Container for the form
.form-container { .form-container {
background-color: $add-user-form-background; // Form background color background-color: $add-user-form-background; // Form background color
padding: 40px; padding: 40px;
border-radius: 12px; // Rounded corners for the form border-radius: 12px; // Rounded corners for the form
box-shadow: 0 8px 15px $add-user-form-shadow-color; box-shadow: 0 8px 15px $add-user-form-shadow-color;
width: 100%; width: 100%;
max-width: 800px; // Increase the maximum width for a wider form max-width: 800px; // Increase the maximum width for a wider form
text-align: left; // Left-align text text-align: left; // Left-align text
margin: auto; margin: auto;
// Form header // Form header
h2 { h2 {
color: $add-user-form-title-color; // Form title color color: $add-user-form-title-color; // Form title color
font-size: 28px; font-size: 28px;
margin-bottom: 20px; margin-bottom: 20px;
text-align: left; text-align: left;
display: block; display: block;
} }
// Form element // Form element
form { form {
display: flex; display: flex;
flex-wrap: wrap; // Allow wrapping for form groups flex-wrap: wrap; // Allow wrapping for form groups
gap: 20px; // Add consistent gap between elements gap: 20px; // Add consistent gap between elements
margin-bottom: 20px; // Add space below the form for submit button margin-bottom: 20px; // Add space below the form for submit button
// Form groups for each input // Form groups for each input
.form-group { .form-group {
flex: 1 1 calc(50% - 20px); // Take up half the row, accounting for gap flex: 1 1 calc(50% - 20px); // Take up half the row, accounting for gap
min-width: 250px; // Minimum width to prevent shrinking too much min-width: 250px; // Minimum width to prevent shrinking too much
$input-field-border-radius: 6px;
// Label styling // Label styling
label { label {
display: block; display: block;
color: $add-user-form-title-color; color: $add-user-form-title-color;
font-size: 16px; font-size: 16px;
margin-bottom: 5px; margin-bottom: 5px;
} }
// Input and select styling // Input and select styling
input[type="text"], input[type="text"],
input[type="password"], input[type="password"],
input[type="email"], input[type="email"],
input[type="date"], input[type="date"],
input[type="number"], input[type="number"],
input[type="datetime-local"], input[type="datetime-local"],
input[type="tel"], input[type="tel"],
select { select {
width: 100%; // Full width of the form group width: 100%; // Full width of the form group
padding: 12px; padding: 12px;
border: 1px solid $add-user-input-border-color; // Input field border color border: 1px solid $add-user-input-border-color; // Input field border color
border-radius: 6px; border-radius: $input-field-border-radius;
background-color: $add-user-input-background; // Input background color background-color: $add-user-input-background; // Input background color
font-size: 16px; font-size: 16px;
transition: border-color 0.3s, background-color 0.3s; transition: border-color 0.3s, background-color 0.3s;
&:focus { &:focus {
border-color: $add-user-input-focus-border-color; // Focus border color border-color: $add-user-input-focus-border-color; // Focus border color
outline: none; outline: none;
} }
} }
}
.admin-access { &.checkbox-set {
label { label {
display: block; display: block;
color: $add-user-form-title-color; color: $add-user-form-title-color;
font-size: 16px; font-size: 16px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.checkbox-group { .checkboxes {
display: flex; display: flex;
gap: 10px; gap: 10px;
// Hide the checkboxes // Hide the checkboxes
input[type="checkbox"] { input[type="checkbox"] {
display: none; display: none;
} }
// Style the label as a button to match input fields // Style the label as a button to match input fields
label.checkbox { label.checkbox {
cursor: pointer; cursor: pointer;
padding: 12px; // Match the padding with the input fields padding: 12px; // Match the padding with the input fields
border: 1px solid $user-form-checkbox-button-border-color; // Use the same border style border: 1px solid $user-form-checkbox-button-border-color; // Use the same border style
border-radius: 6px; // Match the border radius with other inputs border-radius: $input-field-border-radius; // Match the border radius with other inputs
background-color: $add-user-input-background; // Use the same background color background-color: $add-user-input-background; // Use the same background color
font-size: 16px; // Font size consistency font-size: 16px; // Font size consistency
text-align: center; text-align: center;
width: 100%; // Make the label full-width width: 100%; // Make the label full-width
transition: background-color 0.3s, color 0.3s, border-color 0.3s; transition: background-color 0.3s, color 0.3s, border-color 0.3s;
user-select: none; user-select: none;
// Change background when active or focused // Change background when active or focused
&:hover, &:hover,
&:focus { &:focus {
background-color: $user-form-checkbox-button-hover-color; background-color: $user-form-checkbox-button-hover-color;
border-color: $user-form-checkbox-button-hover-border-color; // Use focus border color border-color: $user-form-checkbox-button-hover-border-color; // Use focus border color
} }
} }
// Change styles when the checkbox is checked // Change styles when the checkbox is checked
input[type="checkbox"]:checked + label.checkbox { input[type="checkbox"]:checked + label.checkbox {
background-color: $user-form-checkbox-button-active-color; background-color: $user-form-checkbox-button-active-color;
color: $user-form-checkbox-button-active-text-color; color: $user-form-checkbox-button-active-text-color;
border-color: $user-form-checkbox-button-active-border-color; border-color: $user-form-checkbox-button-active-border-color;
} }
} }
} }
// Dropdown Menu for Admin Role // Dropdown Menu
.role-dropdown { &.dropdown-menu {
flex: 1 1 calc(50% - 20px); // Explicitly set to half width, considering gap flex: 1 1 calc(50% - 20px); // Explicitly set to half width, considering gap
min-width: 250px; // Minimum width to avoid shrinking too much min-width: 250px; // Minimum width to avoid shrinking too much
padding: 0; // Reset any padding padding: 0; // Reset any padding
} }
.radio-group { &.radio-input {
display: flex; .radio-group {
gap: 10px; display: flex;
gap: 10px;
// Hide the radio buttons // Hide the radio buttons
input[type="radio"] { input[type="radio"] {
display: none; display: none;
} }
// Style the label as a button to match the checkboxes // Style the label as a button to match the checkboxes
label.radio { label.radio {
cursor: pointer; width: 100%;
padding: 12px; // Match the padding with the other styled elements height: 100%;
border: 1px solid $add-user-input-border-color; border-radius: $input-field-border-radius;
border-radius: 6px; background: $form-range-slider-background-gradient;
background-color: $add-user-input-background; cursor: pointer;
font-size: 16px; padding: 12px; // Match the padding with the other styled elements
text-align: center; border: 1px solid $add-user-input-border-color;
width: 100%; // Make the label full-width border-radius: $input-field-border-radius;
transition: background-color 0.3s, color 0.3s, border-color 0.3s; background-color: $add-user-input-background;
user-select: none; font-size: 16px;
text-align: center;
width: 100%; // Make the label full-width
transition: background-color 0.3s, color 0.3s, border-color 0.3s;
user-select: none;
// Change background when active or focused // Change background when active or focused
&:hover, &:hover,
&:focus { &:focus {
background-color: $user-form-radio-button-hover-color; background-color: $user-form-radio-button-hover-color;
border-color: $user-form-radio-button-hover-border-color; border-color: $user-form-radio-button-hover-border-color;
} }
} }
// Change styles when the radio button is checked // Change styles when the radio button is checked
input[type="radio"]:checked + label.radio { input[type="radio"]:checked + label.radio {
background-color: $user-form-radio-button-active-color; background-color: $user-form-radio-button-active-color;
color: $user-form-radio-button-active-text-color; color: $user-form-radio-button-active-text-color;
border-color: $user-form-radio-button-active-border-color; border-color: $user-form-radio-button-active-border-color;
} }
} }
}
// Style the range input to match the other form inputs // Style the range input to match the other form inputs
input[type="range"] { --value: 50;
--value: 0; $form-range-slider-background-gradient:
width: 100%; linear-gradient(
height: 45px; to right,
-webkit-appearance: none; $user-form-range-slider-filled 0%,
appearance: none; $user-form-range-slider-filled var(--value),
border-radius: 6px; $user-form-range-slider-background 100%
background-color: $add-user-input-background; );
border: 1px solid $add-user-input-border-color; $form-range-slider-height: 45px;
cursor: pointer; @mixin slider_track {
padding: 0; width: 100%;
box-sizing: border-box; height: 100%;
border-radius: $input-field-border-radius;
background-color: $form-range-slider-background-gradient;
}
@mixin slider_thumb {
width: 10px;
height: $form-range-slider-height;
border: none;
border-radius: $input-field-border-radius;
background-color: $user-form-range-slider-filled;
cursor: pointer;
margin: 0;
padding: 0;
background-color: green;
}
input[type="range"] {
-webkit-appearance: none;
appearance: none;
width: 100%;
height: $form-range-slider-height;
border-radius: $input-field-border-radius;
background-color: $user-form-range-slider-background;
border: 1px solid $add-user-input-border-color;
cursor: pointer;
padding: 0;
box-sizing: border-box;
// Style the filled portion of the track // Style the filled portion of the track
&::-webkit-slider-runnable-track { &::-webkit-slider-runnable-track {
width: 100%; @include slider_track;
height: 100%; }
border-radius: 6px;
background: linear-gradient(to right, $add-user-button-color 0%, $add-user-button-color var(--value), $add-user-input-background var(--value));
}
&::-moz-range-track { &::-moz-range-track {
width: 100%; @include slider_track;
height: 100%; }
border-radius: 6px;
background: linear-gradient(to right, $add-user-button-color 0%, $add-user-button-color var(--value), $add-user-input-background var(--value));
}
// Slider thumb // Slider thumb
&::-webkit-slider-thumb { &::-webkit-slider-thumb {
-webkit-appearance: none; -webkit-appearance: none;
appearance: none; appearance: none;
width: 0; // Smaller thumb size @include slider_thumb;
height: 45px; //border: 2px solid $add-user-input-border-color;
border-radius: 6px; }
background-color: $add-user-button-color;
//border: 2px solid $add-user-input-border-color;
cursor: pointer;
margin: 0;
padding: 0;
}
&::-moz-range-thumb { &::-moz-range-thumb {
width: 0; // Smaller thumb size @include slider_thumb;
height: 45px; }
border: none;
border-radius: 6px;
background-color: $add-user-button-color;
cursor: pointer;
margin: 0;
padding: 0;
}
&:focus { &:focus {
outline: none; outline: none;
border-color: $add-user-input-focus-border-color; border-color: $add-user-input-focus-border-color;
} }
} }
// Submit button styling
&.submit-buttons {
flex: 1 1 100%; // Full width for the submit button
display: flex; // Use flex to align the buttons
justify-content: space-between; // Space between buttons
margin-top: 20px; // Space above the buttons
// Submit button styling button {
.submit-button { width: 48%; // Set both buttons to take up nearly half of the width
flex: 1 1 100%; // Full width for the submit button text-align: center;
display: flex; // Use flex to align the buttons padding: 12px; // Padding for button
justify-content: space-between; // Space between buttons border-radius: $input-field-border-radius;
margin-top: 20px; // Space above the buttons
button { // Add styles for the clear button
width: 48%; // Set both buttons to take up nearly half of the width &.clear-button {
text-align: center; background-color: $add-user-clear-button-color; // Define your clear button color in colors.scss
padding: 12px; // Padding for button color: $add-user-clear-button-text-color; // Define clear button text color in colors.scss
border-radius: 6px;
// Add styles for the clear button &:hover {
&.clear-button { background-color: $add-user-clear-button-hover-color; // Hover effect color
background-color: $add-user-clear-button-color; // Define your clear button color in colors.scss }
color: $add-user-clear-button-text-color; // Define clear button text color in colors.scss }
&:hover { // Existing styles for submit button
background-color: $add-user-clear-button-hover-color; // Hover effect color &.submit {
} background-color: $add-user-button-color; // Primary button color
color: $add-user-button-text-color;
border: none;
&:active { &:hover {
transform: translateY(2px); // Subtle press effect background-color: $add-user-button-hover-color; // Button hover color
} }
} }
// Existing styles for submit button &:active {
&:not(.clear-button) { transform: translateY(2px); // Subtle press effect
background-color: $add-user-button-color; // Primary button color }
color: $add-user-button-text-color; }
border: none; }
}
&:hover { }
background-color: $add-user-button-hover-color; // Button hover color }
}
&:active {
transform: translateY(2px); // Subtle press effect
}
}
}
}
}
}
} }