This commit is contained in:
Elias Jansson
2024-10-20 09:03:17 +02:00
parent 4d3f340602
commit ff90b86fd2
10 changed files with 700 additions and 244 deletions

View File

@@ -1,18 +1,257 @@
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
html {
position: relative;
min-height: 100%;
}
/* Base Styles */
body {
margin-bottom: 60px;
}
background-color: #1F2C3C;
color: #4b004b;
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 20px; /* Keep padding for general layout */
}
/* Container for Centering and Max Width */
.budget-page {
width: 100%; /* Make the page full width */
max-width: 1900px; /* You can adjust or remove this */
margin: 0 auto; /* Centering */
padding: 0; /* Removed extra padding for budget page */
}
/* Grid Layout */
.grid-container {
display: grid;
grid-template-columns: 250px 1fr 250px;
gap: 10px; /* Keep existing gap */
padding: 0; /* Removed padding for grid container */
margin: 0; /* Removed margin for grid container */
}
.left-sidebar, .sidebar-budget-right {
background-color: #f4f4f4;
border-radius: 12px;
padding: 10px; /* Adjusted padding for sidebars */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.main-content {
padding: 10px;
background-color: #f4f4f4; /* Light gray instead of white */
border-radius: 12px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.nav-link {
color: #4b004b;
}
.nav-link:hover {
text-decoration: underline;
}
@media (max-width: 768px) {
.grid-container {
grid-template-columns: 1fr; /* Responsive layout */
}
}
/* Budget Container */
.budget-container {
display: flex;
flex-wrap: wrap;
gap: 10px; /* Reduced gap for tighter layout */
padding: 0; /* Removed padding */
margin: 0; /* Removed margin */
}
/* Category Block */
.category-block {
flex: 1 1 300px;
max-width: 230px;
min-width: 180px;
margin: 0; /* Removed margin */
}
.category-header {
display: flex;
justify-content: space-between; /* Aligns the category name and total */
align-items: center; /* Center vertically */
padding: 5px; /* Retain padding */
background-color: #6a0dad; /* Adjust color as needed */
color: #ffffff;
border-radius: 8px;
margin-bottom: 10px;
font-weight: bold;
max-width: 100%; /* Ensures the header doesn't exceed the width of its container */
box-sizing: border-box; /* Include padding in width calculation */
}
.total {
font-weight: bold;
color: #ffffff; /* Keep white for visibility */
background-color: rgba(106, 13, 173, 0.7); /* Add a semi-transparent background for contrast */
padding: 5px 10px; /* Add some padding for spacing */
border-radius: 5px; /* Rounded corners */
}
/* Items Layout */
.items-wrapper {
display: flex;
min-width: 200px;
flex-direction: column;
padding: 0; /* Removed padding */
margin: 0; /* Removed margin */
}
/* Item Styles */
.item {
display: flex;
align-items: center;
margin-bottom: 5px; /* Space between items */
gap: 5px; /* Reduced gap between item components */
}
/* Input Styles */
.item-name input {
flex: 1; /* Compact size for amount field */
max-width: 20ch; /* Allow up to 7 characters */
padding: 6px; /* Slightly reduced padding */
border: none;
border-radius: 5px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.item-amount input {
flex: 1; /* Compact size for amount field */
max-width: 7ch; /* Allow up to 7 characters */
padding: 6px; /* Slightly reduced padding */
border: none;
border-radius: 5px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
background-color: #f9f9f9;
transition: background-color 0.3s;
}
/* Focus Effect */
.item-name input:focus,
.item-amount input:focus {
background-color: #e6e6e6;
}
/* Add Item Button */
.add-item {
display: flex; /* Use flex to center the "+" */
align-items: center; /* Center the "+" vertically */
justify-content: center; /* Center the "+" horizontally */
height: 25px; /* Adjusted height to match input fields */
cursor: pointer;
color: #ffffff; /* White text color for contrast */
background-color: #6a0dad; /* Use the same color as the header for consistency */
margin-top: 5px; /* Reduced space above the button */
border: none; /* No border */
border-radius: 5px; /* Rounded corners */
font-size: 15px; /* Adjusted font size for better fit */
transition: background-color 0.3s, transform 0.3s; /* Transition for hover effect */
}
/* Hover Effect for Add Item Button */
.add-item:hover {
background-color: #5a0c9a; /* Darker shade on hover */
transform: scale(1.05); /* Slightly enlarge on hover for emphasis */
}
.header-container {
display: flex;
justify-content: flex-start; /* Aligns the header to the left */
align-items: center; /* Centers items vertically */
margin-bottom: 0px; /* Adjust space below the header as needed */
}
.family-header {
text-align: left; /* Ensures text aligns to the left */
margin: 0; /* Removes default margin */
}
.initial {
font-weight: bold; /* Adjust as needed */
font-size: 1.2em; /* Adjust size for initials */
}
.name {
color: #FFFFFF; /* White for names */
font-size: 0.4em; /* Adjust size as needed */
}
/* Specific colors for initials */
.initial.L {
color: #FF0000; /* Red for first L */
}
.initial.E {
color: #FF7F00; /* Orange for first E */
}
.initial.W {
color: #FFFF00; /* Yellow */
}
.initial.E2 { /* Second E */
color: #00FF00; /* Green */
}
.initial.L2 { /* Second L */
color: #0088CC; /* Blue */
}
.navbar-nav {
list-style-type: none; /* Remove bullet points */
padding: 0; /* Remove padding */
}
.nav-item {
margin: 10px 0; /* Adjust spacing between links */
}
.nav-link {
text-decoration: none; /* Remove underline */
color: #000; /* Link color */
display: flex; /* Use flexbox to align icon and text */
align-items: center; /* Center items vertically */
}
.nav-link i {
margin-right: 8px; /* Space between icon and text */
font-size: 1.2em; /* Adjust icon size */
}
/* Sidebar Right Styles */
.right-sidebar {
background-color: #f8f9fa; /* Use your existing background color */
padding: 10px; /* Reduce padding for compactness */
margin: 0; /* Remove any margins */
border-radius: 8px; /* Optional: Add rounded corners */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: Add shadow for depth */
}
.sidebar-budget-header {
cursor: pointer; /* Indicate clickable header */
font-weight: bold; /* Make header bold */
margin: 0; /* Remove default margin */
padding-bottom: 5px; /* Space below header */
}
.sidebar-budget-container {
margin-top: 10px; /* Space above budget items */
}
.sidebar-budget-item {
display: flex;
justify-content: space-between; /* Space out name and amount */
padding: 5px 0; /* Reduced padding for compactness */
border-bottom: 1px solid #e0e0e0; /* Optional: Divider line */
}
.sidebar-budget-item:last-child {
border-bottom: none; /* Remove border from last item */
}