credit abis

This commit is contained in:
root
2026-03-27 00:14:49 +07:00
parent f89fcbee1c
commit 937033ea07
6 changed files with 265 additions and 75 deletions

View File

@@ -112,22 +112,25 @@ $notes = $stmt->fetchAll();
$all_users = query("SELECT id, username FROM users WHERE id != ?", [$user_id])->fetchAll();
$all_groups = query("SELECT * FROM groups")->fetchAll();
// Define note colors
// Define note colors — Google Keep inspired
$note_colors = [
null => ['bg'=>'var(--surface)', 'label'=>'Default'],
'#fff9c4' => ['bg'=>'#fff9c4', 'label'=>'Yellow'],
'#d4edda' => ['bg'=>'#d4edda', 'label'=>'Green'],
'#cce5ff' => ['bg'=>'#cce5ff', 'label'=>'Blue'],
'#f8d7da' => ['bg'=>'#f8d7da', 'label'=>'Pink'],
'#e2d9f3' => ['bg'=>'#e2d9f3', 'label'=>'Purple'],
'#fde8d8' => ['bg'=>'#fde8d8', 'label'=>'Orange'],
'#f5f5f5' => ['bg'=>'#f5f5f5', 'label'=>'Gray'],
'' => ['bg'=>'var(--surface)', 'label'=>'Default', 'hex'=>'#ffffff'],
'#fff9c4' => ['bg'=>'#fff9c4', 'label'=>'Yellow', 'hex'=>'#fff9c4'],
'#ccff90' => ['bg'=>'#ccff90', 'label'=>'Lime', 'hex'=>'#ccff90'],
'#d4edda' => ['bg'=>'#d4edda', 'label'=>'Sage', 'hex'=>'#d4edda'],
'#80cbc4' => ['bg'=>'#80cbc4', 'label'=>'Teal', 'hex'=>'#80cbc4'],
'#b3e5fc' => ['bg'=>'#b3e5fc', 'label'=>'Sky', 'hex'=>'#b3e5fc'],
'#cce5ff' => ['bg'=>'#cce5ff', 'label'=>'Blue', 'hex'=>'#cce5ff'],
'#e2d9f3' => ['bg'=>'#e2d9f3', 'label'=>'Lavender', 'hex'=>'#e2d9f3'],
'#f8d7da' => ['bg'=>'#f8d7da', 'label'=>'Rose', 'hex'=>'#f8d7da'],
'#ef9a9a' => ['bg'=>'#ef9a9a', 'label'=>'Red', 'hex'=>'#ef9a9a'],
'#ffcc80' => ['bg'=>'#ffcc80', 'label'=>'Peach', 'hex'=>'#ffcc80'],
'#fde8d8' => ['bg'=>'#fde8d8', 'label'=>'Orange', 'hex'=>'#fde8d8'],
'#d7ccc8' => ['bg'=>'#d7ccc8', 'label'=>'Sand', 'hex'=>'#d7ccc8'],
];
// dark mode color overrides handled via JS
?>
<div class="header" style="margin-bottom:1rem;">
<h1 style="font-size:1.5rem; font-weight:700;">📝 Notes</h1>
<div style="display:flex; justify-content:flex-end; align-items:center; margin-bottom:1rem;">
<button class="btn" onclick="document.getElementById('new-note-modal').classList.add('active')">
<i class="fa fa-plus"></i> New Note
</button>
@@ -135,8 +138,11 @@ $note_colors = [
<!-- ── New Note Modal ─────────────────────────────────────────────────────── -->
<div class="modal-overlay" id="new-note-modal">
<div class="modal-content" style="max-width:600px; max-height:90vh; overflow-y:auto;">
<h3 style="margin-bottom:1rem;">New Note</h3>
<div class="modal-content" style="max-width:580px; max-height:92vh; overflow-y:auto; padding:1.5rem;">
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem;">
<h3 style="font-size:1rem; font-weight:700;">New Note</h3>
<button type="button" style="background:none;border:none;color:var(--text-light);cursor:pointer;font-size:1.2rem;" onclick="document.getElementById('new-note-modal').classList.remove('active')">×</button>
</div>
<form method="POST" enctype="multipart/form-data" id="new-note-form">
<input type="hidden" name="create_note" value="1">
<div class="form-group">