expensesync-dashboard / settings.html
Noss's picture
Make ui elements work, add a user settings dashboard
07688b1 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings - ExpenseSync</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3B82F6',
secondary: '#10B981',
accent: '#8B5CF6',
dark: '#1F2937',
light: '#F9FAFB'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.settings-nav-item.active {
background-color: #EFF6FF;
color: #3B82F6;
border-left: 3px solid #3B82F6;
}
.settings-nav-item:hover:not(.active) {
background-color: #F9FAFB;
}
.form-input:focus, .form-select:focus {
border-color: #3B82F6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.toggle-switch {
position: relative;
display: inline-block;
width: 50px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 24px;
}
.slider:before {
position: absolute;
content: "";
height: 16px;
width: 16px;
left: 4px;
bottom: 4px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .slider {
background-color: #3B82F6;
}
input:checked + .slider:before {
transform: translateX(26px);
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-sm border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="dollar-sign" class="h-8 w-8 text-primary"></i>
<span class="ml-2 text-xl font-bold text-gray-900">ExpenseSync</span>
</div>
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="index.html" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Dashboard
</a>
<a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Expenses
</a>
<a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Reports
</a>
<a href="settings.html" class="border-primary text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Settings
</a>
</div>
</div>
<div class="flex items-center">
<div class="ml-3 relative">
<div>
<button class="bg-gray-800 flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
<img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/1" alt="Profile">
</button>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
<div class="px-4 py-6 sm:px-0">
<h1 class="text-3xl font-bold text-gray-900">Settings</h1>
<p class="mt-2 text-gray-600">Manage your account settings and preferences</p>
</div>
<div class="mt-6 grid grid-cols-1 lg:grid-cols-4 gap-6">
<!-- Settings Navigation -->
<div class="lg:col-span-1">
<div class="bg-white shadow-sm rounded-lg overflow-hidden">
<nav class="space-y-1">
<a href="#" class="settings-nav-item active group flex items-center px-4 py-3 text-sm font-medium">
<i data-feather="user" class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"></i>
<span>Profile</span>
</a>
<a href="#" class="settings-nav-item group flex items-center px-4 py-3 text-sm font-medium">
<i data-feather="users" class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"></i>
<span>Partner Settings</span>
</a>
<a href="#" class="settings-nav-item group flex items-center px-4 py-3 text-sm font-medium">
<i data-feather="credit-card" class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"></i>
<span>Accounts</span>
</a>
<a href="#" class="settings-nav-item group flex items-center px-4 py-3 text-sm font-medium">
<i data-feather="tag" class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"></i>
<span>Categories</span>
</a>
<a href="#" class="settings-nav-item group flex items-center px-4 py-3 text-sm font-medium">
<i data-feather="bell" class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"></i>
<span>Notifications</span>
</a>
<a href="#" class="settings-nav-item group flex items-center px-4 py-3 text-sm font-medium">
<i data-feather="lock" class="mr-3 h-5 w-5 text-gray-400 group-hover:text-gray-500"></i>
<span>Privacy</span>
</a>
</nav>
</div>
</div>
<!-- Settings Content -->
<div class="lg:col-span-3">
<div class="bg-white shadow-sm rounded-lg overflow-hidden">
<div class="px-6 py-5 border-b border-gray-200">
<h2 class="text-xl font-semibold text-gray-900">Profile Settings</h2>
<p class="mt-1 text-sm text-gray-500">Update your profile information and preferences</p>
</div>
<div class="px-6 py-6">
<form class="space-y-8 divide-y divide-gray-200">
<div class="grid grid-cols-1 gap-y-6 gap-x-4 sm:grid-cols-6">
<div class="sm:col-span-6">
<label class="block text-sm font-medium text-gray-700">Profile Photo</label>
<div class="mt-1 flex items-center">
<img class="h-12 w-12 rounded-full" src="http://static.photos/people/200x200/1" alt="Profile">
<div class="ml-4 flex">
<div class="relative flex cursor-pointer bg-white rounded-md font-medium text-primary hover:text-blue-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-primary">
<span>Change</span>
<input type="file" class="sr-only">
</div>
<button type="button" class="ml-3 bg-transparent rounded-md font-medium text-gray-700 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Remove
</button>
</div>
</div>
</div>
<div class="sm:col-span-3">
<label for="first-name" class="block text-sm font-medium text-gray-700">First name</label>
<div class="mt-1">
<input type="text" name="first-name" id="first-name" autocomplete="given-name" class="form-input block w-full shadow-sm sm:text-sm rounded-md">
</div>
</div>
<div class="sm:col-span-3">
<label for="last-name" class="block text-sm font-medium text-gray-700">Last name</label>
<div class="mt-1">
<input type="text" name="last-name" id="last-name" autocomplete="family-name" class="form-input block w-full shadow-sm sm:text-sm rounded-md">
</div>
</div>
<div class="sm:col-span-4">
<label for="email" class="block text-sm font-medium text-gray-700">Email address</label>
<div class="mt-1">
<input id="email" name="email" type="email" autocomplete="email" class="form-input block w-full shadow-sm sm:text-sm rounded-md">
</div>
</div>
<div class="sm:col-span-4">
<label for="currency" class="block text-sm font-medium text-gray-700">Default Currency</label>
<div class="mt-1">
<select id="currency" name="currency" class="form-select block w-full shadow-sm sm:text-sm rounded-md">
<option>USD - US Dollar</option>
<option>EUR - Euro</option>
<option>GBP - British Pound</option>
<option>INR - Indian Rupee</option>
<option>JPY - Japanese Yen</option>
</select>
</div>
</div>
<div class="sm:col-span-6">
<label for="partner-email" class="block text-sm font-medium text-gray-700">Partner's Email</label>
<div class="mt-1">
<input type="email" name="partner-email" id="partner-email" class="form-input block w-full shadow-sm sm:text-sm rounded-md">
</div>
<p class="mt-2 text-sm text-gray-500">Enter your partner's email to sync expenses</p>
</div>
</div>
<div class="pt-8">
<div>
<h3 class="text-lg font-medium leading-6 text-gray-900">Notifications</h3>
<p class="mt-1 text-sm text-gray-500">Configure how you receive notifications</p>
</div>
<div class="mt-6 space-y-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-900">Email notifications</p>
<p class="text-sm text-gray-500">Receive email updates about your expenses</p>
</div>
<label class="toggle-switch">
<input type="checkbox" checked>
<span class="slider"></span>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-900">Weekly summary</p>
<p class="text-sm text-gray-500">Get a weekly summary of your expenses</p>
</div>
<label class="toggle-switch">
<input type="checkbox" checked>
<span class="slider"></span>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-900">Partner activity</p>
<p class="text-sm text-gray-500">Notify me when my partner adds an expense</p>
</div>
<label class="toggle-switch">
<input type="checkbox">
<span class="slider"></span>
</label>
</div>
</div>
</div>
<div class="pt-8">
<div>
<h3 class="text-lg font-medium leading-6 text-gray-900">Privacy</h3>
<p class="mt-1 text-sm text-gray-500">Control who can see your data</p>
</div>
<div class="mt-6 space-y-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-900">Make expenses public</p>
<p class="text-sm text-gray-500">Allow others to view your expense data</p>
</div>
<label class="toggle-switch">
<input type="checkbox">
<span class="slider"></span>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-900">Share with partner</p>
<p class="text-sm text-gray-500">Share all expenses with your partner</p>
</div>
<label class="toggle-switch">
<input type="checkbox" checked>
<span class="slider"></span>
</label>
</div>
</div>
</div>
<div class="pt-5">
<div class="flex justify-end">
<button type="button" class="bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Cancel
</button>
<button type="submit" class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-primary hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Save
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize Feather Icons
feather.replace();
// Settings navigation
document.addEventListener('DOMContentLoaded', function() {
const navItems = document.querySelectorAll('.settings-nav-item');
navItems.forEach(item => {
item.addEventListener('click', function(e) {
e.preventDefault();
// Remove active class from all items
navItems.forEach(navItem => {
navItem.classList.remove('active');
});
// Add active class to clicked item
this.classList.add('active');
});
});
// Set form values
document.getElementById('first-name').value = 'Alex';
document.getElementById('last-name').value = 'Johnson';
document.getElementById('email').value = 'alex.johnson@example.com';
document.getElementById('partner-email').value = 'sarah.johnson@example.com';
});
</script>
</body>
</html>