Spaces:
Running
Running
add . function like notion - Initial Deployment
Browse files- README.md +7 -5
- index.html +516 -18
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: task
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: yellow
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,517 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="pt-BR">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Taskesphere | Painel de Produtividade</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
|
| 9 |
+
<script>
|
| 10 |
+
tailwind.config = {
|
| 11 |
+
darkMode: 'class',
|
| 12 |
+
theme: {
|
| 13 |
+
extend: {
|
| 14 |
+
colors: {
|
| 15 |
+
primary: '#0E0E10',
|
| 16 |
+
secondary: '#1F1F22',
|
| 17 |
+
surface: '#121212',
|
| 18 |
+
accent: '#D2996C',
|
| 19 |
+
soft: '#CEC8C3',
|
| 20 |
+
text: '#EAEAEA',
|
| 21 |
+
blue: '#3B82F6',
|
| 22 |
+
green: '#10B981',
|
| 23 |
+
red: '#EF4444',
|
| 24 |
+
glass: 'rgba(31, 31, 34, 0.75)'
|
| 25 |
+
},
|
| 26 |
+
typography: ({ theme }) => ({
|
| 27 |
+
DEFAULT: {
|
| 28 |
+
css: {
|
| 29 |
+
'--tw-prose-body': theme('colors.gray[700]'),
|
| 30 |
+
'--tw-prose-headings': theme('colors.gray[900]'),
|
| 31 |
+
'--tw-prose-lead': theme('colors.gray[600]'),
|
| 32 |
+
'--tw-prose-links': theme('colors.amber[600]'),
|
| 33 |
+
'--tw-prose-bold': theme('colors.gray[900]'),
|
| 34 |
+
'--tw-prose-counters': theme('colors.gray[500]'),
|
| 35 |
+
'--tw-prose-bullets': theme('colors.gray[300]'),
|
| 36 |
+
'--tw-prose-hr': theme('colors.gray[200]'),
|
| 37 |
+
'--tw-prose-quotes': theme('colors.gray[900]'),
|
| 38 |
+
'--tw-prose-quote-borders': theme('colors.gray[200]'),
|
| 39 |
+
'--tw-prose-captions': theme('colors.gray[500]'),
|
| 40 |
+
'--tw-prose-code': theme('colors.gray[900]'),
|
| 41 |
+
'--tw-prose-pre-code': theme('colors.gray[200]'),
|
| 42 |
+
'--tw-prose-pre-bg': theme('colors.gray[800]'),
|
| 43 |
+
'--tw-prose-th-borders': theme('colors.gray[300]'),
|
| 44 |
+
'--tw-prose-td-borders': theme('colors.gray[200]'),
|
| 45 |
+
'--tw-prose-invert-body': theme('colors.soft'),
|
| 46 |
+
'--tw-prose-invert-headings': theme('colors.text'),
|
| 47 |
+
'--tw-prose-invert-lead': theme('colors.soft'),
|
| 48 |
+
'--tw-prose-invert-links': theme('colors.accent'),
|
| 49 |
+
'--tw-prose-invert-bold': theme('colors.text'),
|
| 50 |
+
'--tw-prose-invert-counters': theme('colors.soft'),
|
| 51 |
+
'--tw-prose-invert-bullets': theme('colors.secondary'),
|
| 52 |
+
'--tw-prose-invert-hr': theme('colors.secondary'),
|
| 53 |
+
'--tw-prose-invert-quotes': theme('colors.text'),
|
| 54 |
+
'--tw-prose-invert-quote-borders': theme('colors.secondary'),
|
| 55 |
+
'--tw-prose-invert-captions': theme('colors.soft'),
|
| 56 |
+
'--tw-prose-invert-code': theme('colors.text'),
|
| 57 |
+
'--tw-prose-invert-pre-code': theme('colors.gray[300]'),
|
| 58 |
+
'--tw-prose-invert-pre-bg': 'rgba(0,0,0,0.2)',
|
| 59 |
+
'--tw-prose-invert-th-borders': theme('colors.secondary'),
|
| 60 |
+
'--tw-prose-invert-td-borders': theme('colors.secondary'),
|
| 61 |
+
},
|
| 62 |
+
},
|
| 63 |
+
}),
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
</script>
|
| 68 |
+
<script>
|
| 69 |
+
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
| 70 |
+
document.documentElement.classList.add('dark');
|
| 71 |
+
} else {
|
| 72 |
+
document.documentElement.classList.remove('dark');
|
| 73 |
+
}
|
| 74 |
+
</script>
|
| 75 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
| 76 |
+
<style>
|
| 77 |
+
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
|
| 78 |
+
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
|
| 79 |
+
@keyframes toast-in { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
|
| 80 |
+
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; } }
|
| 81 |
+
.toast { animation: toast-in 0.3s ease-out, toast-out 0.3s ease-in 2.7s forwards; }
|
| 82 |
+
|
| 83 |
+
.card {
|
| 84 |
+
background: rgba(255, 255, 255, 0.7);
|
| 85 |
+
border: 1px solid rgba(0, 0, 0, 0.08);
|
| 86 |
+
backdrop-filter: blur(16px);
|
| 87 |
+
-webkit-backdrop-filter: blur(16px);
|
| 88 |
+
transition: all 0.3s ease;
|
| 89 |
+
}
|
| 90 |
+
.dark .card {
|
| 91 |
+
background-color: rgba(31, 31, 34, 0.75);
|
| 92 |
+
border-color: rgba(255, 255, 255, 0.1);
|
| 93 |
+
}
|
| 94 |
+
.card:hover {
|
| 95 |
+
transform: translateY(-2px);
|
| 96 |
+
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
| 97 |
+
}
|
| 98 |
+
.dark .card:hover { box-shadow: 0 0 20px rgba(210, 153, 108, 0.1); }
|
| 99 |
+
|
| 100 |
+
.sidebar { scrollbar-width: thin; }
|
| 101 |
+
.dark .sidebar { scrollbar-color: rgba(255, 255, 255, 0.1) transparent; }
|
| 102 |
+
.sidebar { scrollbar-color: rgba(0, 0, 0, 0.1) transparent; }
|
| 103 |
+
.sidebar::-webkit-scrollbar { width: 6px; }
|
| 104 |
+
.sidebar::-webkit-scrollbar-track { background: transparent; }
|
| 105 |
+
.sidebar::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.1); border-radius: 20px; }
|
| 106 |
+
.dark .sidebar::-webkit-scrollbar-thumb { background-color: rgba(255, 255, 255, 0.1); }
|
| 107 |
+
|
| 108 |
+
.note-editor { background: transparent; resize: none; min-height: 250px; }
|
| 109 |
+
.note-editor:focus { outline: none; }
|
| 110 |
+
.note-editor[data-placeholder]:empty:before {
|
| 111 |
+
content: attr(data-placeholder);
|
| 112 |
+
color: #9ca3af;
|
| 113 |
+
pointer-events: none;
|
| 114 |
+
display: block;
|
| 115 |
+
}
|
| 116 |
+
.dark .note-editor[data-placeholder]:empty:before { color: rgba(206, 200, 195, 0.5); }
|
| 117 |
+
|
| 118 |
+
.slash-command-menu {
|
| 119 |
+
position: absolute;
|
| 120 |
+
z-index: 100;
|
| 121 |
+
width: 240px;
|
| 122 |
+
max-height: 330px;
|
| 123 |
+
overflow: auto;
|
| 124 |
+
background: white;
|
| 125 |
+
border-radius: 8px;
|
| 126 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
| 127 |
+
padding: 8px;
|
| 128 |
+
transform: translateY(10px);
|
| 129 |
+
}
|
| 130 |
+
.dark .slash-command-menu {
|
| 131 |
+
background: #1F1F22;
|
| 132 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
| 133 |
+
}
|
| 134 |
+
.slash-command-item {
|
| 135 |
+
padding: 8px 12px;
|
| 136 |
+
border-radius: 4px;
|
| 137 |
+
cursor: pointer;
|
| 138 |
+
display: flex;
|
| 139 |
+
align-items: center;
|
| 140 |
+
}
|
| 141 |
+
.slash-command-item:hover {
|
| 142 |
+
background: rgba(55,53,47,0.08);
|
| 143 |
+
}
|
| 144 |
+
.dark .slash-command-item:hover {
|
| 145 |
+
background: rgba(255,255,255,0.1);
|
| 146 |
+
}
|
| 147 |
+
.slash-command-icon {
|
| 148 |
+
margin-right: 8px;
|
| 149 |
+
width: 20px;
|
| 150 |
+
height: 20px;
|
| 151 |
+
display: flex;
|
| 152 |
+
align-items: center;
|
| 153 |
+
justify-content: center;
|
| 154 |
+
background: rgba(55,53,47,0.08);
|
| 155 |
+
border-radius: 4px;
|
| 156 |
+
}
|
| 157 |
+
.dark .slash-command-icon {
|
| 158 |
+
background: rgba(255,255,255,0.1);
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.theme-switcher { display: flex; padding: 3px; border-radius: 9px; background-color: rgba(120, 120, 128, 0.12); }
|
| 162 |
+
.theme-switcher button { flex: 1; padding: 4px 8px; border-radius: 7px; font-size: 13px; font-weight: 500; transition: all 0.2s ease-in-out; border: none; background: none; cursor: pointer; color: #6b7280; }
|
| 163 |
+
.dark .theme-switcher button { color: #9ca3af; }
|
| 164 |
+
.theme-switcher button.active { background-color: white; color: black; box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06); }
|
| 165 |
+
.dark .theme-switcher button.active { background-color: #374151; color: #f3f4f6; }
|
| 166 |
+
</style>
|
| 167 |
+
</head>
|
| 168 |
+
<body class="bg-gray-50 text-gray-900 dark:bg-surface dark:text-text font-sans min-h-screen flex flex-col transition-colors duration-300">
|
| 169 |
+
<div id="toast-container" class="fixed top-5 right-5 z-[100]"></div>
|
| 170 |
+
|
| 171 |
+
<!-- Barra de Navegação -->
|
| 172 |
+
<nav aria-label="Main navigation" class="bg-white/80 dark:bg-black/30 backdrop-blur-lg border-b border-gray-200 dark:border-secondary fixed top-0 left-0 right-0 z-30">
|
| 173 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 174 |
+
<div class="flex items-center justify-between h-16">
|
| 175 |
+
<div class="flex items-center">
|
| 176 |
+
<button id="sidebar-toggle" aria-label="Toggle sidebar" aria-expanded="false" class="md:hidden text-gray-700 dark:text-text hover:text-amber-600 dark:hover:text-accent mr-4 focus:outline-none focus:ring-2 focus:ring-amber-500 dark:focus:ring-accent rounded"><svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg></button>
|
| 177 |
+
<h1 class="text-xl font-semibold">Taskesphere</h1>
|
| 178 |
+
</div>
|
| 179 |
+
<div class="flex items-center space-x-4">
|
| 180 |
+
<div id="greeting" class="text-sm font-medium" aria-live="polite">Bom dia, John</div>
|
| 181 |
+
<div class="h-8 w-8 rounded-full bg-amber-500 dark:bg-accent flex items-center justify-center" aria-hidden="true"><span class="text-white dark:text-surface font-medium">J</span></div>
|
| 182 |
+
</div>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
</nav>
|
| 186 |
+
|
| 187 |
+
<!-- Conteúdo Principal -->
|
| 188 |
+
<div class="flex flex-1 pt-16">
|
| 189 |
+
<!-- Barra Lateral -->
|
| 190 |
+
<aside id="sidebar" class="bg-white/80 dark:bg-black/30 backdrop-blur-lg w-64 border-r border-gray-200 dark:border-secondary fixed top-16 bottom-0 left-0 z-20 transform -translate-x-full md:translate-x-0 transition-transform duration-300 ease-in-out flex flex-col">
|
| 191 |
+
<div class="h-full overflow-y-auto sidebar flex-grow">
|
| 192 |
+
<div class="px-4 py-6"><div class="flex items-center space-x-3"><div class="h-10 w-10 rounded-full bg-amber-500 dark:bg-accent flex items-center justify-center"><span class="text-white dark:text-surface font-medium text-lg">J</span></div><div><p class="text-sm font-medium">John Doe</p><p class="text-xs text-gray-500 dark:text-soft">Espaço de Trabalho Pessoal</p></div></div></div>
|
| 193 |
+
<nav class="px-4 space-y-1">
|
| 194 |
+
<button id="command-palette-toggle" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md w-full text-left hover:bg-gray-100 dark:hover:bg-glass"><svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5 text-gray-500 dark:text-soft group-hover:text-amber-600 dark:group-hover:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /></svg>Pesquisar...</button>
|
| 195 |
+
<a href="#" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md w-full text-left bg-gray-100 dark:bg-glass hover:bg-gray-200 dark:hover:bg-secondary"><svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>Painel</a>
|
| 196 |
+
<a href="#" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md w-full text-left hover:bg-gray-100 dark:hover:bg-glass"><svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5 text-gray-500 dark:text-soft group-hover:text-amber-600 dark:group-hover:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>Notas</a>
|
| 197 |
+
<a href="#" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md w-full text-left hover:bg-gray-100 dark:hover:bg-glass"><svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5 text-gray-500 dark:text-soft group-hover:text-amber-600 dark:group-hover:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>Leituras</a>
|
| 198 |
+
<a href="#" class="group flex items-center px-2 py-2 text-sm font-medium rounded-md w-full text-left hover:bg-gray-100 dark:hover:bg-glass"><svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5 text-gray-500 dark:text-soft group-hover:text-amber-600 dark:group-hover:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /></svg>Hábitos</a>
|
| 199 |
+
</nav>
|
| 200 |
+
</div>
|
| 201 |
+
<div class="px-4 py-4 border-t border-gray-200 dark:border-secondary">
|
| 202 |
+
<div class="theme-switcher">
|
| 203 |
+
<button id="light-theme-button">Claro</button>
|
| 204 |
+
<button id="dark-theme-button">Escuro</button>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
</aside>
|
| 208 |
+
<div id="sidebar-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-10 hidden md:hidden"></div>
|
| 209 |
+
<main class="flex-1 md:ml-64 transition-all duration-300">
|
| 210 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
|
| 211 |
+
<div class="mb-8"><h2 class="text-2xl font-semibold">Painel</h2><p class="text-gray-500 dark:text-soft mt-1">Bem-vindo de volta. Aqui está o seu resumo de hoje.</p></div>
|
| 212 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
|
| 213 |
+
<div class="card rounded-xl p-6 animate-fade-in" style="animation-delay: 0.1s;"><div class="flex items-start"><div class="flex-shrink-0 h-10 w-10 rounded-full bg-gray-100 dark:bg-glass border border-gray-200 dark:border-secondary flex items-center justify-center"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" /></svg></div><div class="ml-4 flex-1"><h3 class="text-lg font-medium">Enquanto você esteve fora...</h3><p class="mt-1 text-sm text-gray-500 dark:text-soft">Sua nota sobre "filosofia estóica" foi adicionada à Wiki e uma tarefa foi criada para o "relatório do projeto Atlas".</p><div class="mt-3 flex space-x-3"><button class="px-3 py-1 bg-gray-100 dark:bg-glass border border-gray-200 dark:border-secondary rounded-lg text-sm font-medium hover:bg-gray-200 dark:hover:bg-secondary">Ver detalhes</button></div></div></div></div>
|
| 214 |
+
<div id="open-note-modal-card" class="card rounded-xl p-6 animate-fade-in cursor-pointer flex flex-col" style="animation-delay: 0.2s;"><h3 class="font-medium mb-2 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.5L15.232 5.232z" /></svg>Nota Rápida</h3><p class="text-sm text-gray-500 dark:text-soft flex-grow">Anote um pensamento rápido, uma ideia ou um lembrete...</p><span class="text-xs text-gray-400 dark:text-soft/50 mt-auto pt-2">Clique para abrir o editor avançado</span></div>
|
| 215 |
+
</div>
|
| 216 |
+
<div class="mb-8"><h2 class="text-xl font-semibold mb-4">Foco do Dia</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-6"><div class="card rounded-xl p-5 animate-fade-in" style="animation-delay: 0.3s;"><h3 class="font-medium mb-4 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" /></svg>Tarefas de Hoje</h3><div id="task-list" class="space-y-3"><div class="task-item flex items-start"><input type="checkbox" class="task-checkbox mt-1 h-4 w-4 rounded border-gray-300 dark:border-secondary bg-transparent text-amber-600 dark:text-accent focus:ring-amber-500 dark:focus:ring-accent"><div class="ml-3"><p class="text-sm">Finalizar relatório do projeto Atlas</p><p class="text-xs text-gray-500 dark:text-soft mt-1">Prazo: Sexta-feira</p></div></div><div class="task-item flex items-start"><input type="checkbox" class="task-checkbox mt-1 h-4 w-4 rounded border-gray-300 dark:border-secondary bg-transparent text-amber-600 dark:text-accent focus:ring-amber-500 dark:focus:ring-accent"><div class="ml-3"><p class="text-sm">Reunião com a equipe de design</p><p class="text-xs text-gray-500 dark:text-soft mt-1">14:30 - 15:15</p></div></div></div></div><div class="card rounded-xl p-5 animate-fade-in" style="animation-delay: 0.4s;"><h3 class="font-medium mb-4 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" /></svg>Leituras Atuais</h3><div class="space-y-4"><div><div class="flex items-start"><img src="https://images-na.ssl-images-amazon.com/images/S/compressed.photo.goodreads.com/books/1447957962l/25744928.jpg" class="flex-shrink-0 w-10 h-14 rounded-md object-cover shadow-lg" alt="Capa do livro Deep Work" onerror="this.onerror=null;this.src='https://placehold.co/40x56/1F1F22/EAEAEA?text=Capa';"><div class="ml-4 flex-1"><p class="text-sm font-medium">Deep Work</p><p class="text-xs text-gray-500 dark:text-soft mt-1">Cal Newport</p><div class="mt-2 w-full bg-gray-200 dark:bg-secondary rounded-full h-1.5"><div class="progress-bar bg-amber-500 dark:bg-accent h-1.5 rounded-full" style="width: 72%"></div></div></div></div></div><div><div class="flex items-start"><img src="https://images-na.ssl-images-amazon.com/images/S/compressed.photo.goodreads.com/books/1535115320l/40121378.jpg" class="flex-shrink-0 w-10 h-14 rounded-md object-cover shadow-lg" alt="Capa do livro Atomic Habits" onerror="this.onerror=null;this.src='https://placehold.co/40x56/1F1F22/EAEAEA?text=Capa';"><div class="ml-4 flex-1"><p class="text-sm font-medium">Atomic Habits</p><p class="text-xs text-gray-500 dark:text-soft mt-1">James Clear</p><div class="mt-2 w-full bg-gray-200 dark:bg-secondary rounded-full h-1.5"><div class="progress-bar bg-green h-1.5 rounded-full" style="width: 35%"></div></div></div></div></div></div></div></div></div>
|
| 217 |
+
<div class="mb-8"><h2 class="text-xl font-semibold mb-4">Desenvolvimento Pessoal</h2><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"><div class="card rounded-xl p-5 animate-fade-in" style="animation-delay: 0.5s;"><h3 class="font-medium mb-4 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" /></svg>Rastreador de Hábitos</h3><div class="space-y-3"><div class="flex items-center justify-between"><p class="text-sm">Meditação</p><div class="flex space-x-1.5"><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-gray-200 dark:bg-secondary"></span></div></div><div class="flex items-center justify-between"><p class="text-sm">Ler 20 páginas</p><div class="flex space-x-1.5"><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-gray-200 dark:bg-secondary"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span></div></div><div class="flex items-center justify-between"><p class="text-sm">Treino matinal</p><div class="flex space-x-1.5"><span class="h-3 w-3 rounded-full bg-gray-200 dark:bg-secondary"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-green"></span><span class="h-3 w-3 rounded-full bg-gray-200 dark:bg-secondary"></span></div></div></div></div><div class="card rounded-xl p-5 animate-fade-in md:col-span-2 lg:col-span-2" style="animation-delay: 0.6s;"><h3 class="font-medium mb-2 flex items-center"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2 text-amber-600 dark:text-accent" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4M4 7v4c0 2.21 3.582 4 8 4s8-1.79 8-4V7" /></svg>Inbox Inteligente</h3><p class="text-xs text-gray-500 dark:text-soft mb-4">Itens capturados aguardando categorização.</p><div id="inbox-list" class="space-y-3"><div class="inbox-item bg-gray-100 dark:bg-secondary/80 p-3 rounded-lg"><p class="text-sm">"Revisar Atomic Habits amanhã"</p><div class="mt-2 flex items-center flex-wrap gap-2"><button class="inbox-action-btn text-xs px-2.5 py-1.5 rounded-md flex items-center bg-white dark:bg-gray-600/50 hover:bg-gray-200 dark:hover:bg-gray-500/50 transition-colors"><svg class="w-4 h-4 mr-1.5 text-gray-700 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" /></svg><span>Leitura</span></button><button class="inbox-action-btn text-xs px-2.5 py-1.5 rounded-md flex items-center bg-white dark:bg-gray-600/50 hover:bg-gray-200 dark:hover:bg-gray-500/50 transition-colors"><svg class="w-4 h-4 mr-1.5 text-gray-700 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg><span>Tarefa</span></button></div></div><div class="inbox-item bg-gray-100 dark:bg-secondary/80 p-3 rounded-lg"><p class="text-sm">"Ideia para post: Os 3 pilares do estoicismo moderno"</p><div class="mt-2 flex items-center flex-wrap gap-2"><button class="inbox-action-btn text-xs px-2.5 py-1.5 rounded-md flex items-center bg-white dark:bg-gray-600/50 hover:bg-gray-200 dark:hover:bg-gray-500/50 transition-colors"><svg class="w-4 h-4 mr-1.5 text-gray-700 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 18v-5.25m0 0a6.01 6.01 0 001.5-.189m-1.5.189a6.01 6.01 0 01-1.5-.189m3.75 7.478a12.06 12.06 0 01-4.5 0m3.75 2.311l.401.201a12.06 12.06 0 01-4.5 0l.401-.201M11.25 12a.75.75 0 01.75-.75h.008a.75.75 0 01.75.75v.008a.75.75 0 01-.75.75H12a.75.75 0 01-.75-.75v-.008z" /></svg><span>Wiki</span></button><button class="inbox-action-btn text-xs px-2.5 py-1.5 rounded-md flex items-center bg-white dark:bg-gray-600/50 hover:bg-gray-200 dark:hover:bg-gray-500/50 transition-colors"><svg class="w-4 h-4 mr-1.5 text-gray-700 dark:text-gray-300" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.5 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0111.186 0z" /></svg><span>Reflexão</span></button></div></div></div></div></div></div>
|
| 218 |
+
</main>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<!-- Painel de Notas Lateral -->
|
| 223 |
+
<div id="note-panel" class="fixed right-0 top-16 bottom-0 w-full max-w-xl bg-white dark:bg-primary shadow-xl transform translate-x-full transition-transform duration-300 ease-in-out flex flex-col z-30">
|
| 224 |
+
<div class="flex items-center justify-between p-4 border-b border-gray-200 dark:border-secondary">
|
| 225 |
+
<div class="theme-switcher">
|
| 226 |
+
<button id="editor-write-btn" class="active">Escrever</button>
|
| 227 |
+
<button id="editor-preview-btn">Pré-visualizar</button>
|
| 228 |
+
</div>
|
| 229 |
+
<button id="close-note-panel-button" class="text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300">
|
| 230 |
+
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
| 231 |
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
| 232 |
+
</svg>
|
| 233 |
+
</button>
|
| 234 |
+
</div>
|
| 235 |
+
<div class="flex-grow relative overflow-y-auto p-4">
|
| 236 |
+
<div id="note-editor" contenteditable="true" class="note-editor w-full h-full p-1" data-placeholder="Escreva ou digite '/' para ver os comandos..."></div>
|
| 237 |
+
<div id="note-preview" class="prose dark:prose-invert max-w-none p-1 hidden"></div>
|
| 238 |
+
<div id="slash-command-menu" class="slash-command-menu hidden">
|
| 239 |
+
<div class="slash-command-item">
|
| 240 |
+
<div class="slash-command-icon">📝</div>
|
| 241 |
+
<div>Texto</div>
|
| 242 |
+
</div>
|
| 243 |
+
<div class="slash-command-item">
|
| 244 |
+
<div class="slash-command-icon">📋</div>
|
| 245 |
+
<div>Lista de Tarefas</div>
|
| 246 |
+
</div>
|
| 247 |
+
<div class="slash-command-item">
|
| 248 |
+
<div class="slash-command-icon">🔢</div>
|
| 249 |
+
<div>Lista Numerada</div>
|
| 250 |
+
</div>
|
| 251 |
+
<div class="slash-command-item">
|
| 252 |
+
<div class="slash-command-icon">📅</div>
|
| 253 |
+
<div>Data</div>
|
| 254 |
+
</div>
|
| 255 |
+
<div class="slash-command-item">
|
| 256 |
+
<div class="slash-command-icon">📍</div>
|
| 257 |
+
<div>Título 1</div>
|
| 258 |
+
</div>
|
| 259 |
+
<div class="slash-command-item">
|
| 260 |
+
<div class="slash-command-icon">📍</div>
|
| 261 |
+
<div>Título 2</div>
|
| 262 |
+
</div>
|
| 263 |
+
</div>
|
| 264 |
+
</div>
|
| 265 |
+
<div class="p-4 border-t border-gray-200 dark:border-secondary flex justify-between">
|
| 266 |
+
<button id="new-note-button" class="px-4 py-2 bg-gray-100 dark:bg-secondary text-gray-700 dark:text-text rounded-lg text-sm font-medium hover:bg-gray-200 dark:hover:bg-secondary/80 transition-colors">
|
| 267 |
+
Nova Nota
|
| 268 |
+
</button>
|
| 269 |
+
<button id="save-note-button" class="px-5 py-2 bg-amber-600 text-white rounded-lg text-sm font-medium hover:bg-amber-700 dark:bg-accent dark:hover:bg-opacity-80 transition-colors">
|
| 270 |
+
Concluir
|
| 271 |
+
</button>
|
| 272 |
+
</div>
|
| 273 |
+
</div>
|
| 274 |
+
|
| 275 |
+
<!-- Paleta de Comandos -->
|
| 276 |
+
<div id="command-palette" class="fixed inset-0 z-50 hidden items-start justify-center pt-24 p-4">
|
| 277 |
+
<div id="command-palette-backdrop" class="absolute inset-0 bg-black/50 backdrop-blur-sm"></div>
|
| 278 |
+
<div class="relative card rounded-xl w-full max-w-xl m-4 animate-fade-in flex flex-col shadow-2xl">
|
| 279 |
+
<div class="p-4"><input id="command-input" type="text" placeholder="Pesquisar notas, tarefas ou comandos..." class="w-full bg-transparent text-lg text-gray-800 dark:text-text placeholder-gray-400 dark:placeholder-soft/50 focus:outline-none"></div>
|
| 280 |
+
<div id="command-results" class="border-t border-gray-200 dark:border-secondary p-2 max-h-96 overflow-y-auto">
|
| 281 |
+
<!-- Resultados serão inseridos aqui via JS -->
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<script>
|
| 287 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 288 |
+
// --- Lógica do Painel ---
|
| 289 |
+
const showToast = (message) => {
|
| 290 |
+
const container = document.getElementById('toast-container');
|
| 291 |
+
const toast = document.createElement('div');
|
| 292 |
+
toast.className = 'toast bg-green-500 text-white text-sm font-medium px-4 py-2 rounded-lg shadow-lg mb-2';
|
| 293 |
+
toast.textContent = message;
|
| 294 |
+
toast.setAttribute('role', 'alert');
|
| 295 |
+
toast.setAttribute('aria-live', 'assertive');
|
| 296 |
+
container.appendChild(toast);
|
| 297 |
+
setTimeout(() => {
|
| 298 |
+
toast.remove();
|
| 299 |
+
}, 3000);
|
| 300 |
+
};
|
| 301 |
+
|
| 302 |
+
const setTheme = (theme) => {
|
| 303 |
+
document.documentElement.classList.toggle('dark', theme === 'dark');
|
| 304 |
+
document.getElementById('light-theme-button').classList.toggle('active', theme === 'light');
|
| 305 |
+
document.getElementById('dark-theme-button').classList.toggle('active', theme === 'dark');
|
| 306 |
+
localStorage.theme = theme;
|
| 307 |
+
};
|
| 308 |
+
|
| 309 |
+
document.getElementById('light-theme-button').addEventListener('click', () => setTheme('light'));
|
| 310 |
+
document.getElementById('dark-theme-button').addEventListener('click', () => setTheme('dark'));
|
| 311 |
+
|
| 312 |
+
const toggleSidebar = () => {
|
| 313 |
+
const sidebar = document.getElementById('sidebar');
|
| 314 |
+
const isExpanded = sidebar.classList.toggle('-translate-x-full');
|
| 315 |
+
document.getElementById('sidebar-overlay').classList.toggle('hidden');
|
| 316 |
+
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', !isExpanded);
|
| 317 |
+
};
|
| 318 |
+
document.getElementById('sidebar-toggle').addEventListener('click', toggleSidebar);
|
| 319 |
+
document.getElementById('sidebar-overlay').addEventListener('click', toggleSidebar);
|
| 320 |
+
|
| 321 |
+
// --- Lógica do Painel de Notas ---
|
| 322 |
+
const notePanel = document.getElementById('note-panel');
|
| 323 |
+
const editor = document.getElementById('note-editor');
|
| 324 |
+
const preview = document.getElementById('note-preview');
|
| 325 |
+
const writeBtn = document.getElementById('editor-write-btn');
|
| 326 |
+
const previewBtn = document.getElementById('editor-preview-btn');
|
| 327 |
+
const showdownConverter = new showdown.Converter();
|
| 328 |
+
|
| 329 |
+
const toggleNotePanel = () => {
|
| 330 |
+
notePanel.classList.toggle('translate-x-full');
|
| 331 |
+
// Clear editor when opening
|
| 332 |
+
if (!notePanel.classList.contains('translate-x-full')) {
|
| 333 |
+
editor.innerHTML = '';
|
| 334 |
+
editor.focus();
|
| 335 |
+
|
| 336 |
+
// Setup slash command handler
|
| 337 |
+
editor.addEventListener('keydown', handleSlashCommand);
|
| 338 |
+
}
|
| 339 |
+
};
|
| 340 |
+
|
| 341 |
+
const createNewNote = () => {
|
| 342 |
+
editor.innerHTML = '';
|
| 343 |
+
editor.focus();
|
| 344 |
+
showToast('Nova nota criada!');
|
| 345 |
+
};
|
| 346 |
+
|
| 347 |
+
document.getElementById('open-note-modal-card').addEventListener('click', toggleNotePanel);
|
| 348 |
+
document.getElementById('close-note-panel-button').addEventListener('click', toggleNotePanel);
|
| 349 |
+
document.getElementById('new-note-button').addEventListener('click', createNewNote);
|
| 350 |
+
document.getElementById('save-note-button').addEventListener('click', () => {
|
| 351 |
+
toggleNotePanel();
|
| 352 |
+
showToast('Nota guardada!');
|
| 353 |
+
});
|
| 354 |
+
|
| 355 |
+
writeBtn.addEventListener('click', () => {
|
| 356 |
+
preview.classList.add('hidden');
|
| 357 |
+
editor.classList.remove('hidden');
|
| 358 |
+
writeBtn.classList.add('active');
|
| 359 |
+
previewBtn.classList.remove('active');
|
| 360 |
+
editor.focus();
|
| 361 |
+
});
|
| 362 |
+
|
| 363 |
+
previewBtn.addEventListener('click', () => {
|
| 364 |
+
const markdownText = editor.innerText;
|
| 365 |
+
const html = showdownConverter.makeHtml(markdownText);
|
| 366 |
+
preview.innerHTML = html;
|
| 367 |
+
editor.classList.add('hidden');
|
| 368 |
+
preview.classList.remove('hidden');
|
| 369 |
+
previewBtn.classList.add('active');
|
| 370 |
+
writeBtn.classList.remove('active');
|
| 371 |
+
});
|
| 372 |
+
|
| 373 |
+
// --- Lógica da Paleta de Comandos ---
|
| 374 |
+
const commandPalette = document.getElementById('command-palette');
|
| 375 |
+
const commandInput = document.getElementById('command-input');
|
| 376 |
+
const commandResults = document.getElementById('command-results');
|
| 377 |
+
const openPaletteBtn = document.getElementById('command-palette-toggle');
|
| 378 |
+
|
| 379 |
+
const openCommandPalette = () => { commandPalette.classList.remove('hidden'); commandPalette.classList.add('flex'); commandInput.focus(); commandInput.value = ''; renderCommands(); };
|
| 380 |
+
const closeCommandPalette = () => { commandPalette.classList.add('hidden'); commandPalette.classList.remove('flex'); };
|
| 381 |
+
|
| 382 |
+
openPaletteBtn.addEventListener('click', openCommandPalette);
|
| 383 |
+
document.getElementById('command-palette-backdrop').addEventListener('click', closeCommandPalette);
|
| 384 |
+
document.addEventListener('keydown', (e) => {
|
| 385 |
+
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
|
| 386 |
+
e.preventDefault();
|
| 387 |
+
openCommandPalette();
|
| 388 |
+
}
|
| 389 |
+
if (e.key === 'Escape') {
|
| 390 |
+
closeCommandPalette();
|
| 391 |
+
closeNoteModal();
|
| 392 |
+
}
|
| 393 |
+
});
|
| 394 |
+
|
| 395 |
+
const allCommands = [
|
| 396 |
+
{ type: 'Ação', name: 'Nova Nota Rápida', action: toggleNotePanel },
|
| 397 |
+
{ type: 'Ação', name: 'Mudar Tema', action: () => setTheme(localStorage.theme === 'dark' ? 'light' : 'dark') },
|
| 398 |
+
{ type: 'Nota', name: 'Ideias para o Projeto Atlas' },
|
| 399 |
+
{ type: 'Leitura', name: 'Atomic Habits' },
|
| 400 |
+
{ type: 'Tarefa', name: 'Finalizar relatório' }
|
| 401 |
+
];
|
| 402 |
+
|
| 403 |
+
const renderCommands = (filter = '') => {
|
| 404 |
+
commandResults.innerHTML = '';
|
| 405 |
+
const filtered = allCommands.filter(c => c.name.toLowerCase().includes(filter.toLowerCase()));
|
| 406 |
+
filtered.forEach(cmd => {
|
| 407 |
+
const item = document.createElement('div');
|
| 408 |
+
item.className = 'p-3 rounded-lg hover:bg-gray-100 dark:hover:bg-secondary cursor-pointer flex justify-between items-center';
|
| 409 |
+
item.innerHTML = `<span>${cmd.name}</span><span class="text-xs text-gray-400 dark:text-soft">${cmd.type}</span>`;
|
| 410 |
+
if (cmd.action) {
|
| 411 |
+
item.onclick = () => {
|
| 412 |
+
cmd.action();
|
| 413 |
+
closeCommandPalette();
|
| 414 |
+
};
|
| 415 |
+
}
|
| 416 |
+
commandResults.appendChild(item);
|
| 417 |
+
});
|
| 418 |
+
};
|
| 419 |
+
|
| 420 |
+
commandInput.addEventListener('input', () => renderCommands(commandInput.value));
|
| 421 |
+
|
| 422 |
+
// --- Task Modal Logic ---
|
| 423 |
+
const taskModal = document.getElementById('task-modal');
|
| 424 |
+
const openTaskModal = () => {
|
| 425 |
+
taskModal.classList.remove('hidden');
|
| 426 |
+
taskModal.classList.add('flex');
|
| 427 |
+
document.getElementById('task-title').focus();
|
| 428 |
+
};
|
| 429 |
+
const closeTaskModal = () => {
|
| 430 |
+
taskModal.classList.add('hidden');
|
| 431 |
+
taskModal.classList.remove('flex');
|
| 432 |
+
document.getElementById('task-title').value = '';
|
| 433 |
+
document.getElementById('task-due').value = '';
|
| 434 |
+
document.getElementById('task-notes').value = '';
|
| 435 |
+
};
|
| 436 |
+
|
| 437 |
+
document.getElementById('save-task-button').addEventListener('click', () => {
|
| 438 |
+
const title = document.getElementById('task-title').value;
|
| 439 |
+
const due = document.getElementById('task-due').value;
|
| 440 |
+
const notes = document.getElementById('task-notes').value;
|
| 441 |
+
|
| 442 |
+
if (title) {
|
| 443 |
+
// Here you would normally save the task to your backend
|
| 444 |
+
const taskList = document.getElementById('task-list');
|
| 445 |
+
const taskItem = document.createElement('div');
|
| 446 |
+
taskItem.className = 'task-item flex items-start';
|
| 447 |
+
taskItem.innerHTML = `
|
| 448 |
+
<input type="checkbox" class="task-checkbox mt-1 h-4 w-4 rounded border-gray-300 dark:border-secondary bg-transparent text-amber-600 dark:text-accent focus:ring-amber-500 dark:focus:ring-accent">
|
| 449 |
+
<div class="ml-3">
|
| 450 |
+
<p class="text-sm">${title}</p>
|
| 451 |
+
${due ? `<p class="text-xs text-gray-500 dark:text-soft mt-1">Prazo: ${new Date(due).toLocaleDateString()}</p>` : ''}
|
| 452 |
+
</div>
|
| 453 |
+
`;
|
| 454 |
+
taskList.appendChild(taskItem);
|
| 455 |
+
showToast('Tarefa adicionada!');
|
| 456 |
+
closeTaskModal();
|
| 457 |
+
}
|
| 458 |
+
});
|
| 459 |
+
|
| 460 |
+
document.getElementById('close-task-modal-button').addEventListener('click', closeTaskModal);
|
| 461 |
+
document.getElementById('task-modal-backdrop').addEventListener('click', closeTaskModal);
|
| 462 |
+
document.getElementById('cancel-task-button').addEventListener('click', closeTaskModal);
|
| 463 |
+
|
| 464 |
+
// --- Slash Command Functionality ---
|
| 465 |
+
const handleSlashCommand = (e) => {
|
| 466 |
+
const menu = document.getElementById('slash-command-menu');
|
| 467 |
+
if (e.key === '/' && editor.innerText.trim() === '') {
|
| 468 |
+
e.preventDefault();
|
| 469 |
+
menu.classList.remove('hidden');
|
| 470 |
+
menu.style.left = editor.getBoundingClientRect().left + 'px';
|
| 471 |
+
menu.style.top = (editor.getBoundingClientRect().top + editor.offsetHeight) + 'px';
|
| 472 |
+
} else if (e.key === 'Escape' && !menu.classList.contains('hidden')) {
|
| 473 |
+
menu.classList.add('hidden');
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
// Close menu if not a slash command
|
| 477 |
+
if (!editor.innerText.startsWith('/') && !menu.classList.contains('hidden')) {
|
| 478 |
+
menu.classList.add('hidden');
|
| 479 |
+
}
|
| 480 |
+
};
|
| 481 |
+
|
| 482 |
+
// Handle selecting slash command items
|
| 483 |
+
document.querySelectorAll('.slash-command-item').forEach(item => {
|
| 484 |
+
item.addEventListener('click', (e) => {
|
| 485 |
+
const commandText = e.currentTarget.lastElementChild.textContent;
|
| 486 |
+
editor.innerHTML = '';
|
| 487 |
+
|
| 488 |
+
// Handle different commands
|
| 489 |
+
if (commandText === 'Lista de Tarefas') {
|
| 490 |
+
editor.innerHTML = '<div contenteditable="false"><input type="checkbox" class="mr-2"/>Tarefa 1</div>';
|
| 491 |
+
} else if (commandText === 'Lista Numerada') {
|
| 492 |
+
editor.innerHTML = '<div>1. Item 1</div><div>2. Item 2</div>';
|
| 493 |
+
} else if (commandText === 'Título 1') {
|
| 494 |
+
editor.innerHTML = '<h1>Título</h1>';
|
| 495 |
+
} else if (commandText === 'Título 2') {
|
| 496 |
+
editor.innerHTML = '<h2>Subtítulo</h2>';
|
| 497 |
+
} else {
|
| 498 |
+
editor.innerHTML = commandText;
|
| 499 |
+
}
|
| 500 |
+
|
| 501 |
+
document.getElementById('slash-command-menu').classList.add('hidden');
|
| 502 |
+
editor.focus();
|
| 503 |
+
});
|
| 504 |
+
});
|
| 505 |
+
|
| 506 |
+
// --- Inicialização Geral ---
|
| 507 |
+
const greetingElement = document.getElementById('greeting');
|
| 508 |
+
if (greetingElement) {
|
| 509 |
+
const hour = new Date().getHours();
|
| 510 |
+
greetingElement.textContent = hour < 12 ? 'Bom dia, John' : hour < 18 ? 'Boa tarde, John' : 'Boa noite, John';
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
setTheme(localStorage.theme || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'));
|
| 514 |
+
});
|
| 515 |
+
</script>
|
| 516 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Xterminator/task" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 517 |
</html>
|