Abmacode12 commited on
Commit
6f4b8e1
·
verified ·
1 Parent(s): 618d2ae

Colonne 1 (gauche) : menu + titre « Espace Codage »

Browse files

Colonne 2 (milieu) : vide + barre en bas avec :

à gauche : + et trombone

au centre : barre de recherche / saisie

à droite : micro + flèche envoyer

Colonne 3 (droite) : panneau “Aperçu” avec une barre d’outils + message “Échec du chargement de l’aperçu.”

Copie-colle tout ça dans un fichier : espace-codage.html puis ouvre-le dans ton navigateur.

<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Espace Codage</title>
<style>
:root{
--bg:#0b0f16;
--panel:#0f1521;
--panel2:#0c111b;
--line:rgba(255,255,255,.08);
--text:rgba(255,255,255,.92);
--muted:rgba(255,255,255,.65);
--muted2:rgba(255,255,255,.45);
--shadow: 0 18px 60px rgba(0,0,0,.45);
--r:16px;
--r2:14px;
--focus: rgba(93, 173, 255, .35);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
margin:0;
background: radial-gradient(1200px 700px at 18% 10%, rgba(93,173,255,.12), transparent 55%),
radial-gradient(1200px 800px at 85% 20%, rgba(255,145,85,.08), transparent 60%),
var(--bg);
color:var(--text);
font: 14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial;
overflow:hidden;
}

/* Layout 3 colonnes */
.app{
height:100%;
display:grid;
grid-template-columns: 320px 1fr 520px;
gap:14px;
padding:14px;
}

.col{
background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
border:1px solid var(--line);
border-radius: var(--r);
box-shadow: var(--shadow);
overflow:hidden;
min-width: 0;
}

/* Colonne gauche */
.sidebar{
display:flex;
flex-direction:column;
background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
}

.sidebarTop{
padding:14px 14px 10px;
border-bottom:1px solid var(--line);
display:flex;
align-items:center;
gap:10px;
}

.brandDot{
width:10px;height:10px;border-radius:50%;
background: radial-gradient(circle at 30% 30%, #7fd3ff, #3a78ff);
box-shadow:0 0 0 4px rgba(58,120,255,.14);
}

.brandTitle{
font-weight:700;
letter-spacing:.2px;
font-size:14px;
}

.sidebarSearch{
padding:12px 14px;
display:flex;
gap:10px;
align-items:center;
border-bottom:1px solid var(--line);
background: rgba(0,0,0,.12);
}

.sIcon{
width:34px;height:34px;border-radius:12px;
display:grid;place-items:center;
background: rgba(255,255,255,.04);
border:1px solid var(--line);
color:var(--muted);
user-select:none;
}

.sInput{
flex:1;
display:flex;align-items:center;
background: rgba(255,255,255,.03);
border:1px solid var(--line);
border-radius:12px;
padding:9px 10px;
color:var(--muted);
gap:8px;
}
.sInput input{
width:100%;
border:0; outline:0;
background:transparent;
color:var(--text);
font: inherit;
}
.sInput input::placeholder{color:var(--muted2)}

.nav{
padding:10px 10px 14px;
overflow:auto;
}
.navSection{
padding:10px 8px 6px;
color:var(--muted2);
font-size:12px;
text-transform:uppercase;
letter-spacing:.12em;
}
.navItem{
display:flex;
align-items:center;
gap:10px;
padding:10px 10px;
border-radius:12px;
cursor:pointer;
color:var(--muted);
border:1px solid transparent;
user-select:none;
}
.navItem:hover{
background: rgba(255,255,255,.04);
border-color: rgba(255,255,255,.06);
color:var(--text);
}
.navItem.active{
background: rgba(93,173,255,.10);
border-color: rgba(93,173,255,.18);
color:var(--text);
}
.navItem .ico{
width:30px;height:30px;border-radius:12px;
display:grid;place-items:center;
background: rgba(255,255,255,.04);
border:1px solid var(--line);
color:var(--muted);
flex:0 0 auto;
}
.navItem .label{
flex:1;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.sidebarFooter{
margin-top:auto;
padding:12px 14px;
border-top:1px solid var(--line);
background: rgba(0,0,0,.10);
display:flex;
justify-content:space-between;
align-items:center;
gap:10px;
}
.tinyBtn{
display:flex;align-items:center;gap:8px;
background: rgba(255,255,255,.04);
border:1px solid var(--line);
padding:9px 10px;
border-radius:12px;
color:var(--muted);
cursor:pointer;
user-select:none;
}
.tinyBtn:hover{color:var(--text); background: rgba(255,255,255,.055);}
.tinyBtn span{font-size:12px;color:var(--muted2)}

/* Colonne milieu (vide + barre en bas) */
.center{
display:flex;
flex-direction:column;
background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.06));
}

.centerTop{
padding:12px 14px;
border-bottom:1px solid var(--line);
display:flex;
align-items:center;
gap:10px;
background: rgba(0,0,0,.10);
}
.pill{
padding:7px 10px;
border-radius:999px;
border:1px solid var(--line);
background: rgba(255,255,255,.03);
color:var(--muted);
font-size:12px;
}

.centerBody{
flex:1;
position:relative;
overflow:auto;
}

.emptyHint{
position:absolute;
inset:0;
display:grid;
place-items:center;
color:var(--muted2);
padding:24px;
text-align:center;
}

.composerWrap{
padding:12px 12px 14px;
border-top:1px solid var(--line);
background: rgba(0,0,0,.18);
}

.composer{
display:flex;
align-items:center;
gap:10px;
padding:10px;
border-radius: 16px;
border:1px solid var(--line);
background: rgba(255,255,255,.03);
}

.iconBtn{
width:40px;height:40px;border-radius:14px;
display:grid;place-items:center;
background: rgba(255,255,255,.04);
border:1px solid var(--line);
color:var(--muted);
cursor:pointer;
user-select:none;
flex:0 0 auto;
}
.iconBtn:hover{color:var(--text); background: rgba(255,255,255,.06)}
.iconBtn:active{transform: translateY(1px)}

.composerInput{
flex:1;
display:flex;
align-items:center;
gap:10px;
padding:0 8px;
min-width: 0;
}
.composerInput input{
width:100%;
border:0; outline:0;
background:transparent;
color:var(--text);
font: 14px/1.4 inherit;
padding: 8px 0;
min-width:0;
}
.composerInput input::placeholder{color:var(--muted2)}
.composerInput input:focus{
filter: drop-shadow(0 0 0 var(--focus));
}

.sendBtn{
width:44px;height:44px;border-radius:16px;
display:grid;place-items:center;
border:1px solid rgba(93,173,255,.35);
background: radial-gradient(circle at 30% 30%, rgba(127,211,255,.28), rgba(58,120,255,.22));
color:var(--text);
cursor:pointer;
user-select:none;
flex:0 0 auto;
}
.sendBtn:disabled{
opacity:.45;
cursor:not-allowed;
filter: grayscale(30%);
}

/* Colonne droite (aperçu) */
.preview{
display:flex;
flex-direction:column;
background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}

.previewTop{
padding:12px 14px;
border-bottom:1px solid var(--line);
display:flex;
align-items:center;
justify-content:space-between;
gap:10px;
background: rgba(0,0,0,.10);
}
.previewTopLeft{
display:flex;align-items:center;gap:10px;
min-width:0;
}
.previewTitle{
font-weight:700;
}
.toolRow{
display:flex;align-items:center;gap:8px;
flex-wrap:wrap;
justify-content:flex-end;
}
.tool{
height:34px;
padding:0 10px;
border-radius:12px;
border:1px solid var(--line);
background: rgba(255,255,255,.03);
color:var(--muted);
display:flex;align-items:center;gap:8px;
cursor:pointer;
user-select:none;
}
.tool:hover{color:var(--text); background: rgba(255,255,255,.055)}
.tool .k{color:var(--muted2); font-size:12px}

.previewBody{
flex:1;
display:flex;
flex-direction:column;
background: rgba(0,0,0,.10);
}

.previewCanvas{
flex:1;
display:grid;
place-items:center;
padding:22px;
}

.previewCard{
width:min(420px, 92%);
border-radius: 18px;
border:1px solid var(--line);
background: rgba(255,255,255,.03);
padding:18px;
text-align:center;
color:var(--muted);
}
.ghost{
height:140px;
border-radius:16px;
border:1px dashed rgba(255,255,255,.14);
background:
linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.02), rgba(255,255,255,.04));
opacity:.9;
margin:0 auto 14px;
max-width: 340px;
}
.failTitle{
font-weight:700;
color:var(--text);
margin-bottom:6px;
}
.failMsg{color:var(--muted)}
.previewBottom{
padding:12px 14px;
border-top:1px solid var(--line);
display:flex;
justify-content:space-between;
align-items:center;
gap:10px;
background: rgba(0,0,0,.14);
}

/* Responsive */


@media
(max-width: 1200px){
.app{grid-template-columns: 300px 1fr 460px;}
}


@media
(max-width: 980px){
body{overflow:auto}
.app{
height:auto;
grid-template-columns: 1fr;
}
.col{min-height: 360px;}
}
</style>
</head>

<body>
<div class="app">

<!-- Colonne 1 : Espace Codage -->
<aside class="col sidebar">
<div class="sidebarTop">
<div class

Files changed (5) hide show
  1. README.md +8 -5
  2. components/nav-item.js +87 -0
  3. index.html +176 -19
  4. script.js +44 -0
  5. style.css +46 -19
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Code Whisperer Haven
3
- emoji: 🐢
4
- colorFrom: purple
5
- colorTo: green
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: Code Whisperer Haven 🚀
3
+ colorFrom: pink
4
+ colorTo: pink
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
components/nav-item.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class NavItem extends HTMLElement {
2
+ constructor() {
3
+ super();
4
+ this.attachShadow({ mode: 'open' });
5
+ }
6
+
7
+ connectedCallback() {
8
+ this.render();
9
+ }
10
+
11
+ static get observedAttributes() {
12
+ return ['icon', 'label', 'active'];
13
+ }
14
+
15
+ attributeChangedCallback(name, oldValue, newValue) {
16
+ if (oldValue !== newValue) {
17
+ this.render();
18
+ }
19
+ }
20
+
21
+ render() {
22
+ const icon = this.getAttribute('icon') || 'code';
23
+ const label = this.getAttribute('label') || 'Item';
24
+ const active = this.hasAttribute('active');
25
+
26
+ this.shadowRoot.innerHTML = `
27
+ <style>
28
+ :host {
29
+ display: block;
30
+ margin-bottom: 0.25rem;
31
+ }
32
+
33
+ .nav-item {
34
+ display: flex;
35
+ align-items: center;
36
+ gap: 0.75rem;
37
+ padding: 0.5rem;
38
+ border-radius: 0.5rem;
39
+ cursor: pointer;
40
+ color: rgba(255, 255, 255, 0.7);
41
+ transition: all 0.2s ease;
42
+ }
43
+
44
+ .nav-item:hover {
45
+ background: rgba(255, 255, 255, 0.05);
46
+ color: rgba(255, 255, 255, 0.9);
47
+ }
48
+
49
+ .nav-item.active {
50
+ background: rgba(59, 130, 246, 0.1);
51
+ color: rgba(255, 255, 255, 0.9);
52
+ }
53
+
54
+ .icon-container {
55
+ width: 2rem;
56
+ height: 2rem;
57
+ border-radius: 0.5rem;
58
+ background: rgba(255, 255, 255, 0.05);
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ }
63
+
64
+ .label {
65
+ flex: 1;
66
+ overflow: hidden;
67
+ text-overflow: ellipsis;
68
+ white-space: nowrap;
69
+ }
70
+ </style>
71
+
72
+ <a href="#" class="nav-item ${active ? 'active' : ''}">
73
+ <div class="icon-container">
74
+ <i data-feather="${icon}"></i>
75
+ </div>
76
+ <span class="label">${label}</span>
77
+ </a>
78
+ `;
79
+
80
+ // Replace feather icons after rendering
81
+ if (this.shadowRoot.querySelector('[data-feather]')) {
82
+ feather.replace();
83
+ }
84
+ }
85
+ }
86
+
87
+ customElements.define('nav-item', NavItem);
index.html CHANGED
@@ -1,19 +1,176 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Code Whisperer Haven</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <link rel="stylesheet" href="style.css">
11
+ </head>
12
+ <body class="bg-gray-900 text-gray-100 h-screen overflow-hidden">
13
+ <div class="app-container h-full grid grid-cols-12 gap-2 p-2">
14
+ <!-- Left Column - Menu -->
15
+ <div class="col-span-3 bg-gray-800 rounded-xl shadow-xl flex flex-col border border-gray-700">
16
+ <div class="p-4 border-b border-gray-700 flex items-center gap-3">
17
+ <div class="w-3 h-3 rounded-full bg-gradient-to-br from-blue-400 to-blue-600 shadow-blue-500/30 shadow-md"></div>
18
+ <h1 class="font-bold text-lg">Espace Codage</h1>
19
+ </div>
20
+
21
+ <div class="p-3 border-b border-gray-700 flex items-center gap-2">
22
+ <button class="p-2 rounded-lg bg-gray-700 hover:bg-gray-600 transition">
23
+ <i data-feather="plus"></i>
24
+ </button>
25
+ <div class="flex-1 relative">
26
+ <i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
27
+ <input type="text" placeholder="Rechercher..."
28
+ class="w-full pl-10 pr-4 py-2 bg-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
29
+ </div>
30
+ </div>
31
+
32
+ <nav class="flex-1 overflow-y-auto p-2">
33
+ <h2 class="text-xs uppercase text-gray-500 px-2 py-1">Projets</h2>
34
+ <a href="#" class="flex items-center gap-3 p-2 rounded-lg bg-gray-700 mb-1">
35
+ <div class="p-2 bg-gray-600 rounded-lg">
36
+ <i data-feather="code" class="w-4 h-4"></i>
37
+ </div>
38
+ <span>Projet 1</span>
39
+ </a>
40
+ <a href="#" class="flex items-center gap-3 p-2 rounded-lg hover:bg-gray-700 mb-1">
41
+ <div class="p-2 bg-gray-600 rounded-lg">
42
+ <i data-feather="code" class="w-4 h-4"></i>
43
+ </div>
44
+ <span>Projet 2</span>
45
+ </a>
46
+
47
+ <h2 class="text-xs uppercase text-gray-500 px-2 py-1 mt-4">Raccourcis</h2>
48
+ <a href="#" class="flex items-center gap-3 p-2 rounded-lg hover:bg-gray-700 mb-1">
49
+ <div class="p-2 bg-gray-600 rounded-lg">
50
+ <i data-feather="book" class="w-4 h-4"></i>
51
+ </div>
52
+ <span>Bibliothèque</span>
53
+ </a>
54
+ <a href="#" class="flex items-center gap-3 p-2 rounded-lg hover:bg-gray-700 mb-1">
55
+ <div class="p-2 bg-gray-600 rounded-lg">
56
+ <i data-feather="settings" class="w-4 h-4"></i>
57
+ </div>
58
+ <span>Paramètres</span>
59
+ </a>
60
+ </nav>
61
+
62
+ <div class="p-3 border-t border-gray-700 flex justify-between">
63
+ <button class="text-sm flex items-center gap-1 px-3 py-1 bg-gray-700 rounded-lg hover:bg-gray-600">
64
+ <i data-feather="share-2" class="w-4 h-4"></i>
65
+ Partager
66
+ </button>
67
+ <button class="text-sm flex items-center gap-1 px-3 py-1 bg-gray-700 rounded-lg hover:bg-gray-600">
68
+ <i data-feather="user" class="w-4 h-4"></i>
69
+ Profil
70
+ </button>
71
+ </div>
72
+ </div>
73
+
74
+ <!-- Middle Column - Workspace -->
75
+ <div class="col-span-6 bg-gray-800 rounded-xl shadow-xl flex flex-col border border-gray-700">
76
+ <div class="p-3 border-b border-gray-700 flex gap-2">
77
+ <span class="text-xs px-3 py-1 bg-gray-700 rounded-full">Aperçu</span>
78
+ <span class="text-xs px-3 py-1 bg-gray-700 rounded-full">Projet</span>
79
+ <span class="text-xs px-3 py-1 bg-gray-700 rounded-full">/</span>
80
+ </div>
81
+
82
+ <div class="flex-1 flex items-center justify-center">
83
+ <div class="text-center p-6 max-w-md">
84
+ <div class="mx-auto w-32 h-32 bg-gradient-to-br from-gray-700 to-gray-800 rounded-xl mb-4 border border-dashed border-gray-600"></div>
85
+ <h3 class="font-bold text-lg mb-1">Zone centrale vide</h3>
86
+ <p class="text-gray-400">La barre de saisie reste en bas comme demandé</p>
87
+ </div>
88
+ </div>
89
+
90
+ <div class="p-3 border-t border-gray-700 bg-gray-900/50">
91
+ <div class="flex items-center gap-2 p-2 bg-gray-700 rounded-xl">
92
+ <button class="p-2 rounded-lg hover:bg-gray-600">
93
+ <i data-feather="plus"></i>
94
+ </button>
95
+ <button class="p-2 rounded-lg hover:bg-gray-600">
96
+ <i data-feather="paperclip"></i>
97
+ </button>
98
+
99
+ <input type="text" placeholder="Rechercher / écrire..."
100
+ class="flex-1 bg-transparent px-3 py-2 focus:outline-none">
101
+
102
+ <button class="p-2 rounded-lg hover:bg-gray-600">
103
+ <i data-feather="mic"></i>
104
+ </button>
105
+ <button class="p-2 rounded-lg bg-blue-600 hover:bg-blue-500 text-white">
106
+ <i data-feather="send"></i>
107
+ </button>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ <!-- Right Column - Preview -->
113
+ <div class="col-span-3 bg-gray-800 rounded-xl shadow-xl flex flex-col border border-gray-700">
114
+ <div class="p-3 border-b border-gray-700 flex justify-between items-center">
115
+ <h2 class="font-bold">Aperçu</h2>
116
+ <div class="flex gap-1">
117
+ <button class="p-2 rounded-lg hover:bg-gray-700">
118
+ <i data-feather="arrow-left"></i>
119
+ </button>
120
+ <button class="p-2 rounded-lg hover:bg-gray-700">
121
+ <i data-feather="arrow-right"></i>
122
+ </button>
123
+ <button class="p-2 rounded-lg hover:bg-gray-700">
124
+ <i data-feather="refresh-cw"></i>
125
+ </button>
126
+ <button class="p-2 rounded-lg hover:bg-gray-700">
127
+ <i data-feather="maximize"></i>
128
+ </button>
129
+ </div>
130
+ </div>
131
+
132
+ <div class="flex-1 flex items-center justify-center bg-gray-900/30">
133
+ <div class="text-center p-6 max-w-sm">
134
+ <div class="mx-auto w-40 h-32 bg-gradient-to-br from-gray-700 to-gray-800 rounded-xl mb-4 border border-dashed border-gray-600"></div>
135
+ <h3 class="font-bold text-lg mb-1">Échec du chargement de l'aperçu</h3>
136
+ <p class="text-gray-400">Vérifiez l'URL / le serveur local, puis rafraîchissez</p>
137
+ </div>
138
+ </div>
139
+
140
+ <div class="p-3 border-t border-gray-700 flex justify-between text-xs text-gray-400">
141
+ <span>Statut: <span class="text-gray-300">Hors ligne</span></span>
142
+ <span>Mode: <span class="text-gray-300">Preview</span></span>
143
+ </div>
144
+ </div>
145
+ </div>
146
+
147
+ <script>
148
+ feather.replace();
149
+
150
+ // Simple interaction for the message input
151
+ const messageInput = document.querySelector('.app-container input[placeholder="Rechercher / écrire..."]');
152
+ const sendButton = document.querySelector('.app-container button.bg-blue-600');
153
+
154
+ messageInput.addEventListener('input', () => {
155
+ if(messageInput.value.trim().length > 0) {
156
+ sendButton.classList.remove('bg-blue-600');
157
+ sendButton.classList.add('bg-blue-500');
158
+ } else {
159
+ sendButton.classList.add('bg-blue-600');
160
+ sendButton.classList.remove('bg-blue-500');
161
+ }
162
+ });
163
+
164
+ // Navigation items active state
165
+ const navItems = document.querySelectorAll('nav a');
166
+ navItems.forEach(item => {
167
+ item.addEventListener('click', (e) => {
168
+ e.preventDefault();
169
+ navItems.forEach(i => i.classList.remove('bg-gray-700'));
170
+ item.classList.add('bg-gray-700');
171
+ });
172
+ });
173
+ </script>
174
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
175
+ </body>
176
+ </html>
script.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Initialize tooltips for icons
3
+ const initTooltips = () => {
4
+ const buttons = document.querySelectorAll('button');
5
+ buttons.forEach(button => {
6
+ const icon = button.querySelector('[data-feather]');
7
+ if (icon) {
8
+ const iconName = icon.getAttribute('data-feather');
9
+ button.setAttribute('title', iconName.charAt(0).toUpperCase() + iconName.slice(1));
10
+ }
11
+ });
12
+ };
13
+
14
+ // Handle microphone functionality
15
+ const setupMicrophone = () => {
16
+ const micButton = document.querySelector('button i[data-feather="mic"]').parentElement;
17
+ micButton.addEventListener('click', async () => {
18
+ try {
19
+ const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
20
+ // Here you would typically connect to a speech recognition API
21
+ alert('Microphone access granted. Speech recognition would be implemented here.');
22
+ stream.getTracks().forEach(track => track.stop());
23
+ } catch (error) {
24
+ console.error('Error accessing microphone:', error);
25
+ alert('Could not access microphone. Please check permissions.');
26
+ }
27
+ });
28
+ };
29
+
30
+ // Initialize everything
31
+ feather.replace();
32
+ initTooltips();
33
+ setupMicrophone();
34
+ });
35
+
36
+ // Export functions if needed for modules
37
+ export const utils = {
38
+ initTooltips: () => {
39
+ // Tooltip initialization logic
40
+ },
41
+ setupMicrophone: () => {
42
+ // Microphone setup logic
43
+ }
44
+ };
style.css CHANGED
@@ -1,28 +1,55 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
 
 
 
 
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom scrollbar */
2
+ ::-webkit-scrollbar {
3
+ width: 8px;
4
+ height: 8px;
5
  }
6
 
7
+ ::-webkit-scrollbar-track {
8
+ background: rgba(255, 255, 255, 0.05);
9
+ border-radius: 4px;
10
  }
11
 
12
+ ::-webkit-scrollbar-thumb {
13
+ background: rgba(255, 255, 255, 0.1);
14
+ border-radius: 4px;
 
 
15
  }
16
 
17
+ ::-webkit-scrollbar-thumb:hover {
18
+ background: rgba(255, 255, 255, 0.2);
 
 
 
 
19
  }
20
 
21
+ /* Animation for empty state icons */
22
+ @keyframes pulse {
23
+ 0%, 100% {
24
+ opacity: 0.7;
25
+ }
26
+ 50% {
27
+ opacity: 0.3;
28
+ }
29
  }
30
+
31
+ .empty-state-icon {
32
+ animation: pulse 3s ease-in-out infinite;
33
+ }
34
+
35
+ /* Responsive adjustments */
36
+ @media (max-width: 1024px) {
37
+ .app-container {
38
+ grid-template-columns: 1fr;
39
+ }
40
+
41
+ .app-container > div {
42
+ min-height: 300px;
43
+ }
44
+ }
45
+
46
+ /* Custom focus styles */
47
+ input:focus, button:focus {
48
+ outline: none;
49
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
50
+ }
51
+
52
+ /* Transition effects */
53
+ button, a, input {
54
+ transition: all 0.2s ease;
55
+ }