The first working Theme Settings

This commit is contained in:
sageTheDM 2024-09-23 11:55:58 +02:00
parent 1718c9cf69
commit f5b1e80c6d
16 changed files with 517 additions and 250 deletions

View file

@ -12,18 +12,27 @@
z-index: 10000;
}
.settings-container{
.settings-main h2 {
margin-bottom: 1em;
}
.settings-main p {
padding-bottom: 7px;
}
/* Main container for the settings */
.settings-container {
display: grid;
grid-template-columns: 1fr 3fr; /* 1fr for sidebar, 3fr for main content */
grid-auto-flow: column;
overflow-x:hidden;
overflow-x: hidden;
height: 100%; /* Ensure it takes full height */
}
/* Settings content */
.settings-content {
background: #f5f5f5;
color: #333;
background: var(--history-background-color);
color: var(--text-color);
padding: 20px;
border-radius: 10px;
width: 90%;
@ -31,13 +40,15 @@
height: 90%;
max-height: 600px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
overflow: scroll; /* Prevents overflow of the content */
overflow: hidden; /* Prevents overflow of the content */
position: relative; /* Needed for absolute positioning of close button */
display: flex;
flex-direction: column; /* Flexbox for vertical stacking */
}
/* Sidebar styles */
.sidebar {
background: #e0e0e0;
background: var(--settings-background-color);
padding: 20px;
border-radius: 10px 0 0 10px; /* Rounded corners on the left side */
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
@ -45,15 +56,17 @@
display: flex;
flex-direction: column;
grid-column: 1; /* Places sidebar in the first grid column */
height: 100%; /* Ensures sidebar takes full height */
}
/* Sidebar item styles */
.sidebar ul {
list-style-type: none;
padding: 0;
margin: 0; /* Ensure no margin for the list */
margin: 0;
display: flex;
flex-direction: column; /* Make the ul a column */
flex-grow: 1; /* Allows the list to take available space */
}
.sidebar li {
@ -65,11 +78,11 @@
}
.sidebar li:hover {
background: #d0d0d0; /* Highlight on hover */
background: var(--input-button-hover-color); /* Highlight on hover */
}
.sidebar li.active {
background: #b0b0b0; /* Active section highlight */
background: var(--button-hover-background-color); /* Active section highlight */
}
/* Main settings area */
@ -78,14 +91,14 @@
padding: 20px;
border-radius: 0 10px 10px 0; /* Rounded corners on the right side */
overflow-y: auto; /* Scroll if content exceeds height */
display: flex; /* Ensure main settings area displays content correctly */
display: flex;
flex-direction: column; /* Stack content vertically */
}
/* Close button positioning */
.close-popup {
background-color: #ff4d4d;
color: #fff;
background-color: var(--close-button-color);
color: var(--user-message-text-color);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
border: none;
@ -98,21 +111,39 @@
}
.close-popup:hover {
background-color: #e63939; /* Darker red on hover */
background-color: var(--close-button-hover-color); /* Darker red on hover */
}
/* Additional styles for inputs and options */
.settings-option {
margin-bottom: 20px; /* Adds space between each setting option */
padding-bottom: 10px; /* Adds internal spacing */
border-bottom: 1px solid var(--input-border-color); /* Optional, creates a separator between options */
}
.settings-option:last-child {
margin-bottom: 0; /* Removes bottom margin from last option */
border-bottom: none; /* Removes separator from last option */
}
.settings-option input[type="text"],
.settings-option input[type="email"],
.settings-option input[type="password"],
.settings-option input[type="color"],
.settings-option input[type="range"],
.settings-option select {
border-color: #ccc;
color: #333;
border-color: var(--input-border-color);
color: var(--text-color);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
padding: 10px;
border-radius: 5px;
width: 100%;
margin-bottom: 10px; /* Add spacing between inputs */
margin-bottom: 10px; /* Adds spacing between inputs */
}
/* Optional additional spacing for labels */
.settings-option label {
margin-bottom: 5px;
display: block;
font-weight: bold;
}