Files
noteflow/public/index.html
T
2025-11-06 15:03:14 +01:00

488 lines
14 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Notes & Todos</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');
:root {
/* Colors */
--bg-gradient: linear-gradient(to bottom right, #ffffff, #f8fafc);
--primary: #0ea5e9;
--primary-light: #e0f2fe;
--primary-dark: #0369a1;
--surface: #ffffff;
--text: #0f172a;
--text-light: #64748b;
--border: #e2e8f0;
--success: #10b981;
--error: #ef4444;
/* Effects */
--shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
--shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.12);
--glow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Plus Jakarta Sans', sans-serif;
background: var(--bg-gradient);
color: var(--text);
min-height: 100vh;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
/* Layout */
.app {
display: grid;
grid-template-columns: 320px 1fr;
gap: 1rem;
height: 100vh;
padding: 1rem;
}
/* Sidebar */
.sidebar {
background: var(--surface);
border-radius: 24px;
padding: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
box-shadow: var(--shadow);
height: calc(100vh - 2rem);
position: relative;
overflow: hidden;
}
.sidebar::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 80px;
background: linear-gradient(to bottom, var(--surface) 60%, transparent);
z-index: 2;
pointer-events: none;
}
.sidebar::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 80px;
background: linear-gradient(to top, var(--surface) 60%, transparent);
z-index: 2;
pointer-events: none;
}
/* Main Content */
.main-content {
background: var(--surface);
border-radius: 24px;
padding: 2rem;
box-shadow: var(--shadow);
height: calc(100vh - 2rem);
overflow-y: auto;
position: relative;
}
/* Header */
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2rem;
position: relative;
z-index: 3;
}
.app-title {
font-size: 1.5rem;
font-weight: 600;
background: linear-gradient(135deg, var(--primary), var(--primary-dark));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
}
/* Search */
.search-container {
position: relative;
z-index: 3;
}
.search-input {
width: 100%;
padding: 0.875rem 1rem 0.875rem 2.75rem;
border: 1px solid var(--border);
border-radius: 12px;
font-size: 0.9375rem;
background: #f8fafc;
transition: all 0.2s ease;
}
.search-input:focus {
outline: none;
border-color: var(--primary);
box-shadow: var(--glow);
background: var(--surface);
}
.search-icon {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
color: var(--text-light);
pointer-events: none;
transition: all 0.2s ease;
}
.search-input:focus + .search-icon {
color: var(--primary);
}
/* Notes List */
.notes-list {
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
padding: 0.5rem;
overflow-y: auto;
max-height: calc(100% - 140px);
position: relative;
z-index: 1;
}
.note-item {
padding: 1rem;
background: #f8fafc;
border-radius: 12px;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid transparent;
}
.note-item:hover {
transform: translateY(-2px);
background: var(--surface);
border-color: var(--border);
box-shadow: var(--shadow-sm);
}
.note-item.active {
background: var(--primary-light);
border-color: var(--primary);
}
.note-title {
font-weight: 600;
color: var(--text);
margin-bottom: 0.25rem;
}
.note-preview {
font-size: 0.875rem;
color: var(--text-light);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* Editor */
.editor {
background: var(--surface);
border-radius: 16px;
height: 100%;
}
.editor-title {
width: 100%;
padding: 1rem;
font-size: 1.5rem;
font-weight: 600;
border: none;
border-bottom: 1px solid var(--border);
background: transparent;
transition: all 0.2s ease;
}
.editor-title:focus {
outline: none;
border-color: var(--primary);
}
.editor-content {
padding: 1rem;
min-height: 300px;
outline: none;
}
/* Buttons */
.btn {
padding: 0.75rem 1.5rem;
border-radius: 12px;
font-weight: 500;
font-size: 0.9375rem;
transition: all 0.2s ease;
border: none;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-primary {
background: var(--primary);
color: white;
}
.btn-primary:hover {
background: var(--primary-dark);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
.btn-icon {
padding: 0.5rem;
border-radius: 10px;
color: var(--text-light);
background: transparent;
transition: all 0.2s ease;
}
.btn-icon:hover {
background: var(--primary-light);
color: var(--primary);
transform: translateY(-1px);
}
/* Todo Items */
.todo-item {
display: flex;
align-items: center;
padding: 0.75rem;
background: #f8fafc;
border-radius: 10px;
margin-bottom: 0.5rem;
transition: all 0.2s ease;
}
.todo-item:hover {
background: var(--surface);
box-shadow: var(--shadow-sm);
}
.todo-checkbox {
appearance: none;
width: 20px;
height: 20px;
border: 2px solid var(--border);
border-radius: 6px;
margin-right: 0.75rem;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
}
.todo-checkbox:checked {
background: var(--success);
border-color: var(--success);
}
.todo-checkbox:checked::after {
content: '✓';
position: absolute;
color: white;
font-size: 12px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.todo-text {
flex: 1;
transition: all 0.2s ease;
}
.todo-item.completed .todo-text {
color: var(--text-light);
text-decoration: line-through;
}
/* Images Grid */
.images-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
gap: 1rem;
padding: 1rem;
}
.image-item {
position: relative;
border-radius: 12px;
overflow: hidden;
aspect-ratio: 1;
transition: all 0.2s ease;
}
.image-item:hover {
transform: scale(1.05);
box-shadow: var(--shadow);
}
.image-item img {
width: 100%;
height: 100%;
object-fit: cover;
}
.image-delete {
position: absolute;
top: 0.5rem;
right: 0.5rem;
padding: 0.25rem;
background: rgba(0, 0, 0, 0.5);
border-radius: 6px;
color: white;
opacity: 0;
transition: all 0.2s ease;
}
.image-item:hover .image-delete {
opacity: 1;
}
/* Scrollbar */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-light);
}
/* Animations */
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.fade-in {
animation: fadeIn 0.3s ease forwards;
}
/* Responsive */
@media (max-width: 768px) {
.app {
grid-template-columns: 1fr;
}
.sidebar {
display: none;
}
.main-content {
margin-left: 0;
}
}
</style>
</head>
<body>
<div class="app">
<aside class="sidebar">
<div class="header">
<h1 class="app-title">Notes</h1>
<button class="btn-icon" id="new-note-btn">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
<div class="search-container">
<input type="text" class="search-input" placeholder="Rechercher...">
<svg class="search-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</div>
<div class="notes-list" id="notes-list">
<!-- Notes will be dynamically inserted here -->
</div>
</aside>
<main class="main-content">
<div class="editor">
<input type="text" class="editor-title" placeholder="Titre de la note" id="note-title">
<div class="editor-content" contenteditable="true" id="note-content"></div>
<div class="todos-section">
<div class="header">
<h2>Tâches</h2>
<button class="btn-icon" id="add-todo-btn">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
<div id="todos-list">
<!-- Todos will be dynamically inserted here -->
</div>
</div>
<div class="images-section">
<div class="header">
<h2>Images</h2>
<label class="btn-icon" for="image-upload">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
</label>
<input type="file" id="image-upload" hidden accept="image/*">
</div>
<div class="images-grid" id="images-list">
<!-- Images will be dynamically inserted here -->
</div>
</div>
</div>
</main>
</div>
<script src="/js/auth.js"></script>
<script src="/js/notes.js"></script>
<script src="/js/admin.js"></script>
<script src="/js/app.js"></script>
</body>
</html>