-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdictation.css
More file actions
286 lines (248 loc) · 6.25 KB
/
dictation.css
File metadata and controls
286 lines (248 loc) · 6.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/* dictation.css */
:root {
--top-bar-height: 60px;
--correct-color: #28a745;
--incorrect-color: #dc3545;
--current-highlight-color: #e7f3ff; /* Light blue */
--current-highlight-border: #007bff;
}
body {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
.top-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
height: var(--top-bar-height);
background-color: var(--background-color);
border-bottom: 1px solid var(--medium-gray);
flex-shrink: 0;
}
#dictation-container {
display: flex;
flex-grow: 1;
height: calc(100vh - var(--top-bar-height));
}
#main-content {
flex-grow: 1;
display: flex;
flex-direction: column;
padding: 20px;
background-color: #fdfdfd;
gap: 20px;
}
#text-display-container {
flex: 1;
border: 1px solid var(--medium-gray);
border-radius: 8px;
padding: 20px;
overflow-y: auto;
}
#writing-input {
flex: 1; /* Take up the same amount of space as the display container */
padding: 20px;
border-radius: 8px;
border: 1px solid var(--medium-gray);
resize: none; /* Disable manual resizing */
background-color: #fdfdfd; /* Match the main content background */
box-sizing: border-box; /* Ensure padding is included in width/height */
line-height: inherit; /* Inherit from text-display-styling */
font-family: inherit; /* Inherit from text-display-styling */
overflow-y: auto; /* Match scrollbar behavior of display container */
}
.text-display-styling {
font-size: 28px;
line-height: 1.8;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
#text-display span {
cursor: pointer;
transition: background-color 0.2s;
border-radius: 4px;
padding: 2px 0;
}
#text-display span.correct {
background-color: var(--success-message-bg);
color: var(--success-message-text);
}
#text-display span.incorrect {
background-color: var(--danger-message-bg);
color: var(--danger-message-text);
text-decoration: underline wavy red 2px;
}
#text-display span.current {
background-color: var(--current-highlight-color);
box-shadow: 0 0 0 2px var(--current-highlight-border);
}
#hotkey-bar {
padding-top: 10px;
display: flex;
gap: 10px;
}
#hotkey-bar button {
font-size: 0.9em;
padding: 8px 12px;
margin: 0;
}
.dictation-page-container {
display: flex;
flex-direction: row;
height: calc(100vh - var(--top-bar-height));
align-items: stretch; /* Ensure children stretch to fill height */
}
#dictation-container {
flex: 1; /* Allow this container to grow and shrink */
display: flex;
flex-direction: column;
min-width: 0; /* Prevent flexbox from overflowing */
}
.menu-toggle-btn {
font-size: 1.5em;
background: none;
border: none;
cursor: pointer;
position: relative;
z-index: 101;
}
/* Config Panel */
#config-panel {
width: 350px;
height: 100%;
position: fixed;
top: 0;
right: 0;
background-color: var(--background-color);
border-left: 1px solid var(--medium-gray);
padding: 20px;
display: flex;
flex-direction: column;
gap: 20px;
overflow-y: auto;
z-index: 100;
transform: translateX(100%);
transition: transform 0.3s ease-in-out;
}
#config-panel.config-panel-visible {
transform: translateX(0);
}
.config-section {
border-bottom: 1px solid #eee;
padding-bottom: 20px;
}
.config-section:last-of-type {
border-bottom: none;
}
.config-grid {
display: grid;
grid-template-columns: auto 1fr;
gap: 15px;
align-items: center;
}
.master-detail-container {
display: flex;
flex-direction: column;
gap: 10px;
}
#text-list-container {
height: 150px;
overflow-y: auto;
}
#text-select {
width: 100%;
height: 100%;
}
#text-editor-container {
display: flex;
flex-direction: column;
gap: 10px;
}
#text-editor-container input,
#text-editor-container textarea {
width: 100%;
padding: 8px;
border-radius: 4px;
border: 1px solid var(--medium-gray);
}
.editor-buttons {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 10px;
}
.editor-buttons button {
font-size: 0.9em;
padding: 8px 10px;
margin: 0;
}
/* Notification Area */
#notification-area {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background-color: var(--success-notification-bg);
color: var(--text-color-light);
padding: 15px 25px;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
z-index: 200;
opacity: 0;
transition: opacity 0.3s, bottom 0.3s;
pointer-events: none;
}
#notification-area:not(.hidden) {
opacity: 1;
bottom: 30px;
}
/* Utility */
.hidden {
display: none !important;
}
#speaker-icon {
font-size: 5em;
text-align: center;
color: rgba(128, 128, 128, 0.2); /* Make icon semi-transparent */
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: -1; /* Place it behind the text/diff */
pointer-events: none; /* Make it unclickable */
}
#text-display-container {
position: relative; /* Needed for absolute positioning of speaker icon */
}
#diff-display .diff-added {
background-color: var(--success-message-bg);
color: var(--success-message-text);
text-decoration: none;
}
#diff-display .diff-removed {
background-color: var(--danger-message-bg);
color: var(--danger-message-text);
text-decoration: line-through;
}
.diff-removed {
text-decoration: line-through;
}
/* Font size classes */
.font-size-20 { font-size: 20px; }
.font-size-24 { font-size: 24px; }
.font-size-28 { font-size: 28px; }
.font-size-32 { font-size: 32px; }
.font-size-40 { font-size: 40px; }
/* Font family classes */
.font-family-arial { font-family: Arial, sans-serif; }
.font-family-verdana { font-family: Verdana, sans-serif; }
.font-family-times-new-roman { font-family: 'Times New Roman', Times, serif; }
.font-family-courier-new { font-family: 'Courier New', Courier, monospace; }
.input-incorrect-flash {
border-color: var(--incorrect-color);
box-shadow: 0 0 3px 1px var(--incorrect-color);
transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}