jebin2 commited on
Commit
4fd459f
·
1 Parent(s): 6f520a9
Files changed (1) hide show
  1. index.html +180 -141
index.html CHANGED
@@ -8,29 +8,33 @@
8
  <title>Paper</title>
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
10
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
- <link
12
- href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Playfair+Display:wght@400;500;600&display=swap"
13
  rel="stylesheet">
14
  <style>
15
  :root {
16
- /* --- Cool Slate & Ink Palette --- */
17
- --bg-primary: #f9f9fb;
18
- --bg-secondary: #f1f3f6;
19
- --bg-tertiary: #e8ebf0;
20
- --text-primary: #2a324b;
21
- --text-secondary: #5c677d;
22
- --text-muted: #8a94a6;
23
- --accent: #4a69bd;
24
- --accent-hover: #3b5496;
25
- --success: #3e8e7e;
26
- --warning: #f0a500;
27
- --error: #d9534f;
28
- --border: #d1d8e0;
29
- --shadow: rgba(74, 105, 189, 0.1);
30
- --paper-shadow: rgba(42, 50, 75, 0.07);
31
- --radius: 8px;
32
- --transition: all 0.3s ease;
33
- --paper-texture: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f0ead6' fill-opacity='0.3'%3E%3Cpath d='M30 30c0-6.627-5.373-12-12-12s-12 5.373-12 12 5.373 12 12 12 12-5.373 12-12zm12 0c0-6.627-5.373-12-12-12s-12 5.373-12 12 5.373 12 12 12 12-5.373 12-12z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
 
 
 
 
 
34
  }
35
 
36
  * {
@@ -45,8 +49,8 @@
45
  }
46
 
47
  body {
48
- font-family: 'Lora', Georgia, serif;
49
- background: linear-gradient(135deg, #f9f6ef 0%, #f1ebe0 100%);
50
  background-attachment: fixed;
51
  color: var(--text-primary);
52
  line-height: 1.6;
@@ -56,16 +60,35 @@
56
  body::before {
57
  content: '';
58
  position: fixed;
59
- top: 0;
60
- left: 0;
61
- right: 0;
62
- bottom: 0;
63
- background: var(--paper-texture);
64
- opacity: 0.4;
 
 
 
65
  pointer-events: none;
66
  z-index: 1;
67
  }
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /* Login Screen */
70
  .login-screen {
71
  display: flex;
@@ -75,47 +98,53 @@
75
  padding: 20px;
76
  position: relative;
77
  z-index: 2;
78
- background: var(--bg-secondary);
79
  }
80
 
81
  .login-box {
82
  text-align: center;
83
- padding: 40px 35px;
84
  border-radius: var(--radius);
85
- background: var(--bg-primary);
86
  border: 2px solid var(--border);
87
- box-shadow:
88
- 0 8px 32px var(--paper-shadow),
89
- 0 2px 8px var(--paper-shadow),
90
- inset 0 1px 0 rgba(255, 255, 255, 0.8);
91
  position: relative;
92
  z-index: 1;
93
  width: 100%;
94
- max-width: 380px;
95
- min-height: auto;
96
- animation: slideUp 0.6s ease-out;
97
  }
98
 
99
- .login-box::before {
100
- content: '';
101
- position: absolute;
102
- top: 0;
103
- left: 0;
104
- right: 0;
105
- bottom: 0;
106
- background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(212, 175, 55, 0.03) 100%);
107
- border-radius: var(--radius);
108
- pointer-events: none;
 
 
 
 
109
  }
110
 
111
  .login-box h1 {
112
- margin-bottom: 8px;
113
- color: var(--text-primary);
114
- font-weight: 600;
115
  font-size: 42px;
116
- letter-spacing: -0.5px;
117
- font-family: 'Playfair Display', Georgia, serif;
118
- position: relative;
 
 
 
 
 
 
 
 
119
  }
120
 
121
  .login-subtitle {
@@ -123,80 +152,75 @@
123
  font-size: 16px;
124
  margin-bottom: 32px;
125
  font-weight: 500;
126
- font-style: italic;
127
- line-height: 1.5;
128
  }
129
 
130
  .input-group {
131
  position: relative;
132
- margin-bottom: 28px;
133
  }
134
 
135
  .password-input {
136
  width: 100%;
137
- padding: 18px 22px;
138
- font-size: 16px;
139
  border: 2px solid var(--border);
140
- border-radius: var(--radius);
141
  background: var(--bg-secondary);
142
  color: var(--text-primary);
143
  text-align: center;
144
- letter-spacing: 1px;
145
  outline: none;
146
  transition: var(--transition);
147
- font-family: 'Courier New', monospace;
148
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
149
  }
150
 
151
  .password-input:focus {
152
- border-color: var(--accent);
153
- box-shadow:
154
- inset 0 2px 4px rgba(0, 0, 0, 0.03),
155
- 0 0 0 3px rgba(212, 175, 55, 0.15);
156
- background: var(--bg-primary);
157
  }
158
 
159
  .password-input::placeholder {
160
  color: var(--text-muted);
161
  letter-spacing: normal;
162
- font-family: 'Lora', Georgia, serif;
163
- font-style: italic;
164
  }
165
 
166
  .enter-btn {
167
  width: 100%;
168
  padding: 18px 32px;
169
- background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
170
- color: var(--bg-primary);
171
  border: none;
172
- border-radius: var(--radius);
173
  font-size: 16px;
174
- font-weight: 500;
175
  cursor: pointer;
176
  transition: var(--transition);
177
  position: relative;
178
  overflow: hidden;
179
  text-transform: uppercase;
180
- letter-spacing: 0.5px;
181
- font-family: 'Lora', Georgia, serif;
182
- box-shadow:
183
- 0 4px 15px rgba(212, 175, 55, 0.3),
184
- inset 0 1px 0 rgba(255, 255, 255, 0.2);
185
  }
186
 
187
  .enter-btn:hover:not(:disabled) {
188
- transform: translateY(-2px);
189
- box-shadow:
190
- 0 6px 20px rgba(212, 175, 55, 0.4),
191
- inset 0 1px 0 rgba(255, 255, 255, 0.2);
192
  }
193
 
194
  .enter-btn:active {
195
- transform: translateY(0);
196
  }
197
 
198
  .enter-btn:disabled {
199
- opacity: 0.7;
200
  cursor: not-allowed;
201
  transform: none;
202
  }
@@ -206,43 +230,31 @@
206
  margin-top: 16px;
207
  font-size: 14px;
208
  min-height: 20px;
209
- font-weight: 400;
210
- font-style: italic;
211
  }
212
 
213
  /* Editor Screen */
214
  .editor-screen {
215
  display: none;
216
  height: 100%;
217
- background: var(--bg-primary);
218
  flex-direction: column;
219
  position: relative;
220
  z-index: 2;
221
  }
222
 
223
  .header {
224
- padding: 15px;
225
- background: var(--bg-secondary);
226
- border-bottom: 3px solid var(--border);
227
  display: flex;
228
  justify-content: space-between;
229
  align-items: center;
230
- box-shadow: 0 2px 10px var(--paper-shadow);
231
  position: relative;
232
  flex-shrink: 0;
233
  }
234
 
235
- .header::before {
236
- content: '';
237
- position: absolute;
238
- bottom: 0;
239
- left: 0;
240
- right: 0;
241
- height: 1px;
242
- background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
243
- opacity: 0.3;
244
- }
245
-
246
  .header-left {
247
  display: flex;
248
  align-items: center;
@@ -250,51 +262,80 @@
250
  }
251
 
252
  .app-title {
253
- font-size: 28px;
254
- font-weight: 600;
255
- color: var(--text-primary);
256
- font-family: 'Playfair Display', Georgia, serif;
257
  letter-spacing: -0.5px;
 
 
 
 
 
 
 
 
 
 
258
  }
259
 
260
  .header-right {
261
  display: flex;
262
  align-items: center;
263
- gap: 16px;
264
  flex-wrap: wrap;
265
  }
266
 
267
  .save-status {
268
- font-size: 13px;
269
- font-weight: 500;
270
- padding: 8px 14px;
271
- border-radius: 20px;
272
  background: var(--bg-tertiary);
273
  color: var(--text-secondary);
274
- border: 1px solid var(--border);
275
- min-width: 80px;
276
  text-align: center;
277
- font-family: 'Lora', Georgia, serif;
 
 
 
278
  }
279
 
280
  .save-status.saving {
281
- background: linear-gradient(135deg, var(--warning) 0%, #d4850f 100%);
282
  color: white;
283
- border-color: var(--warning);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  }
285
 
286
  .save-status.saved {
287
- background: linear-gradient(135deg, var(--success) 0%, #5a8a69 100%);
288
  color: white;
289
- border-color: var(--success);
 
290
  }
291
 
292
  .word-count {
293
- font-size: 13px;
294
- color: var(--text-muted);
295
- font-weight: 400;
296
- font-family: 'Lora', Georgia, serif;
297
- font-style: italic;
 
 
298
  }
299
 
300
  .editor-container {
@@ -302,56 +343,53 @@
302
  position: relative;
303
  margin: 20px;
304
  border-radius: var(--radius);
305
- background: var(--bg-primary);
306
  border: 2px solid var(--border);
307
- box-shadow:
308
- inset 0 2px 8px rgba(0, 0, 0, 0.03),
309
- 0 4px 20px var(--paper-shadow);
310
  animation: paperUnfold 0.5s ease-out;
311
  }
312
 
313
  .editor {
314
  width: 100%;
315
  height: 100%;
316
- padding: 25px 30px;
317
  border: none;
318
  outline: none;
319
- font-family: 'Lora', Georgia, serif;
320
- font-size: 18px;
321
  font-weight: 500;
322
- line-height: 1.8;
323
  resize: none;
324
  background: transparent;
325
  color: var(--text-primary);
326
  position: relative;
327
  z-index: 2;
328
  border-radius: var(--radius);
 
329
  }
330
 
331
  .editor::placeholder {
332
  color: var(--text-muted);
333
- font-style: italic;
334
- opacity: 0.7;
335
  }
336
 
337
  /* Scrollbar styling */
338
  .editor::-webkit-scrollbar {
339
- width: 12px;
340
  }
341
 
342
  .editor::-webkit-scrollbar-track {
343
  background: var(--bg-tertiary);
344
- border-radius: 6px;
345
  }
346
 
347
  .editor::-webkit-scrollbar-thumb {
348
- background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
349
- border-radius: 6px;
350
- border: 2px solid var(--bg-tertiary);
351
  }
352
 
353
  .editor::-webkit-scrollbar-thumb:hover {
354
- background: linear-gradient(135deg, var(--accent-hover) 0%, #9e7c15 100%);
355
  }
356
 
357
  /* Animation for mode switching */
@@ -712,7 +750,8 @@
712
  // Prevent accidental page close
713
  window.addEventListener('beforeunload', function (e) {
714
  const statusDiv = document.getElementById('saveStatus');
715
- if (statusDiv.className.includes(" saving")) {
 
716
  e.preventDefault();
717
  e.returnValue = '';
718
  }
 
8
  <title>Paper</title>
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
10
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap"
 
12
  rel="stylesheet">
13
  <style>
14
  :root {
15
+ /* --- Colorful & Playful DARK --- */
16
+ --bg-primary: #0f0f1a;
17
+ --bg-secondary: #1a1a2e;
18
+ --bg-tertiary: #252540;
19
+ --bg-card: rgba(25, 25, 45, 0.95);
20
+ --text-primary: #ffffff;
21
+ --text-secondary: #b8b8d0;
22
+ --text-muted: #7070a0;
23
+ --accent-pink: #ff6b9d;
24
+ --accent-purple: #a855f7;
25
+ --accent-blue: #3b82f6;
26
+ --accent-yellow: #fbbf24;
27
+ --gradient-primary: linear-gradient(135deg, #ff6b9d 0%, #a855f7 50%, #3b82f6 100%);
28
+ --gradient-hover: linear-gradient(135deg, #ff4d8a 0%, #9333ea 50%, #2563eb 100%);
29
+ --success: #22c55e;
30
+ --warning: #f59e0b;
31
+ --error: #ef4444;
32
+ --border: rgba(168, 85, 247, 0.25);
33
+ --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
34
+ --shadow-glow: 0 8px 40px rgba(168, 85, 247, 0.15);
35
+ --radius: 24px;
36
+ --radius-sm: 16px;
37
+ --transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
38
  }
39
 
40
  * {
 
49
  }
50
 
51
  body {
52
+ font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
53
+ background: linear-gradient(135deg, #0f0f1a 0%, #1a1025 50%, #0f1520 100%);
54
  background-attachment: fixed;
55
  color: var(--text-primary);
56
  line-height: 1.6;
 
60
  body::before {
61
  content: '';
62
  position: fixed;
63
+ top: -50%;
64
+ left: -50%;
65
+ width: 200%;
66
+ height: 200%;
67
+ background:
68
+ radial-gradient(circle at 20% 30%, rgba(255, 107, 157, 0.25) 0%, transparent 40%),
69
+ radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.2) 0%, transparent 40%),
70
+ radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 50%);
71
+ animation: floatBg 20s ease-in-out infinite;
72
  pointer-events: none;
73
  z-index: 1;
74
  }
75
 
76
+ @keyframes floatBg {
77
+
78
+ 0%,
79
+ 100% {
80
+ transform: translate(0, 0) rotate(0deg);
81
+ }
82
+
83
+ 33% {
84
+ transform: translate(2%, 2%) rotate(1deg);
85
+ }
86
+
87
+ 66% {
88
+ transform: translate(-1%, 1%) rotate(-1deg);
89
+ }
90
+ }
91
+
92
  /* Login Screen */
93
  .login-screen {
94
  display: flex;
 
98
  padding: 20px;
99
  position: relative;
100
  z-index: 2;
 
101
  }
102
 
103
  .login-box {
104
  text-align: center;
105
+ padding: 48px 44px;
106
  border-radius: var(--radius);
107
+ background: var(--bg-card);
108
  border: 2px solid var(--border);
109
+ box-shadow: var(--shadow-soft), var(--shadow-glow);
 
 
 
110
  position: relative;
111
  z-index: 1;
112
  width: 100%;
113
+ max-width: 420px;
114
+ animation: bounceIn 0.6s var(--transition);
 
115
  }
116
 
117
+ @keyframes bounceIn {
118
+ 0% {
119
+ opacity: 0;
120
+ transform: scale(0.9) translateY(20px);
121
+ }
122
+
123
+ 50% {
124
+ transform: scale(1.02) translateY(-5px);
125
+ }
126
+
127
+ 100% {
128
+ opacity: 1;
129
+ transform: scale(1) translateY(0);
130
+ }
131
  }
132
 
133
  .login-box h1 {
134
+ margin-bottom: 12px;
135
+ font-weight: 800;
 
136
  font-size: 42px;
137
+ letter-spacing: -1px;
138
+ font-family: 'Plus Jakarta Sans', sans-serif;
139
+ background: var(--gradient-primary);
140
+ -webkit-background-clip: text;
141
+ -webkit-text-fill-color: transparent;
142
+ background-clip: text;
143
+ }
144
+
145
+ .login-box h1::after {
146
+ content: ' ✨';
147
+ -webkit-text-fill-color: initial;
148
  }
149
 
150
  .login-subtitle {
 
152
  font-size: 16px;
153
  margin-bottom: 32px;
154
  font-weight: 500;
155
+ line-height: 1.6;
 
156
  }
157
 
158
  .input-group {
159
  position: relative;
160
+ margin-bottom: 24px;
161
  }
162
 
163
  .password-input {
164
  width: 100%;
165
+ padding: 18px 24px;
166
+ font-size: 17px;
167
  border: 2px solid var(--border);
168
+ border-radius: var(--radius-sm);
169
  background: var(--bg-secondary);
170
  color: var(--text-primary);
171
  text-align: center;
172
+ letter-spacing: 3px;
173
  outline: none;
174
  transition: var(--transition);
175
+ font-family: 'Plus Jakarta Sans', monospace;
176
+ font-weight: 600;
177
  }
178
 
179
  .password-input:focus {
180
+ border-color: var(--accent-purple);
181
+ box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25), 0 0 30px rgba(168, 85, 247, 0.15);
182
+ background: var(--bg-tertiary);
183
+ transform: scale(1.02);
 
184
  }
185
 
186
  .password-input::placeholder {
187
  color: var(--text-muted);
188
  letter-spacing: normal;
189
+ font-family: 'Plus Jakarta Sans', sans-serif;
190
+ font-weight: 500;
191
  }
192
 
193
  .enter-btn {
194
  width: 100%;
195
  padding: 18px 32px;
196
+ background: var(--gradient-primary);
197
+ color: #ffffff;
198
  border: none;
199
+ border-radius: var(--radius-sm);
200
  font-size: 16px;
201
+ font-weight: 700;
202
  cursor: pointer;
203
  transition: var(--transition);
204
  position: relative;
205
  overflow: hidden;
206
  text-transform: uppercase;
207
+ letter-spacing: 1.5px;
208
+ font-family: 'Plus Jakarta Sans', sans-serif;
209
+ box-shadow: 0 6px 25px rgba(255, 107, 157, 0.35);
 
 
210
  }
211
 
212
  .enter-btn:hover:not(:disabled) {
213
+ transform: translateY(-3px) scale(1.02);
214
+ box-shadow: 0 10px 35px rgba(255, 107, 157, 0.45);
215
+ background: var(--gradient-hover);
 
216
  }
217
 
218
  .enter-btn:active {
219
+ transform: translateY(0) scale(0.98);
220
  }
221
 
222
  .enter-btn:disabled {
223
+ opacity: 0.6;
224
  cursor: not-allowed;
225
  transform: none;
226
  }
 
230
  margin-top: 16px;
231
  font-size: 14px;
232
  min-height: 20px;
233
+ font-weight: 500;
 
234
  }
235
 
236
  /* Editor Screen */
237
  .editor-screen {
238
  display: none;
239
  height: 100%;
240
+ background: transparent;
241
  flex-direction: column;
242
  position: relative;
243
  z-index: 2;
244
  }
245
 
246
  .header {
247
+ padding: 16px 24px;
248
+ background: var(--bg-card);
249
+ border-bottom: 2px solid var(--border);
250
  display: flex;
251
  justify-content: space-between;
252
  align-items: center;
253
+ backdrop-filter: blur(10px);
254
  position: relative;
255
  flex-shrink: 0;
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
258
  .header-left {
259
  display: flex;
260
  align-items: center;
 
262
  }
263
 
264
  .app-title {
265
+ font-size: 26px;
266
+ font-weight: 800;
267
+ font-family: 'Plus Jakarta Sans', sans-serif;
 
268
  letter-spacing: -0.5px;
269
+ background: var(--gradient-primary);
270
+ -webkit-background-clip: text;
271
+ -webkit-text-fill-color: transparent;
272
+ background-clip: text;
273
+ cursor: pointer;
274
+ transition: var(--transition);
275
+ }
276
+
277
+ .app-title:hover {
278
+ transform: scale(1.05);
279
  }
280
 
281
  .header-right {
282
  display: flex;
283
  align-items: center;
284
+ gap: 12px;
285
  flex-wrap: wrap;
286
  }
287
 
288
  .save-status {
289
+ font-size: 12px;
290
+ font-weight: 700;
291
+ padding: 10px 18px;
292
+ border-radius: 50px;
293
  background: var(--bg-tertiary);
294
  color: var(--text-secondary);
295
+ border: 2px solid var(--border);
296
+ min-width: 90px;
297
  text-align: center;
298
+ font-family: 'Plus Jakarta Sans', sans-serif;
299
+ text-transform: uppercase;
300
+ letter-spacing: 0.5px;
301
+ transition: var(--transition);
302
  }
303
 
304
  .save-status.saving {
305
+ background: var(--gradient-primary);
306
  color: white;
307
+ border-color: transparent;
308
+ box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
309
+ animation: wiggle 0.5s ease-in-out infinite;
310
+ }
311
+
312
+ @keyframes wiggle {
313
+
314
+ 0%,
315
+ 100% {
316
+ transform: rotate(-2deg);
317
+ }
318
+
319
+ 50% {
320
+ transform: rotate(2deg);
321
+ }
322
  }
323
 
324
  .save-status.saved {
325
+ background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
326
  color: white;
327
+ border-color: transparent;
328
+ box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
329
  }
330
 
331
  .word-count {
332
+ font-size: 14px;
333
+ color: var(--text-secondary);
334
+ font-weight: 600;
335
+ font-family: 'Plus Jakarta Sans', sans-serif;
336
+ background: var(--bg-tertiary);
337
+ padding: 6px 14px;
338
+ border-radius: 20px;
339
  }
340
 
341
  .editor-container {
 
343
  position: relative;
344
  margin: 20px;
345
  border-radius: var(--radius);
346
+ background: var(--bg-card);
347
  border: 2px solid var(--border);
348
+ box-shadow: var(--shadow-soft);
 
 
349
  animation: paperUnfold 0.5s ease-out;
350
  }
351
 
352
  .editor {
353
  width: 100%;
354
  height: 100%;
355
+ padding: 28px 32px;
356
  border: none;
357
  outline: none;
358
+ font-family: 'Plus Jakarta Sans', sans-serif;
359
+ font-size: 17px;
360
  font-weight: 500;
361
+ line-height: 1.9;
362
  resize: none;
363
  background: transparent;
364
  color: var(--text-primary);
365
  position: relative;
366
  z-index: 2;
367
  border-radius: var(--radius);
368
+ caret-color: var(--accent-purple);
369
  }
370
 
371
  .editor::placeholder {
372
  color: var(--text-muted);
373
+ font-weight: 500;
 
374
  }
375
 
376
  /* Scrollbar styling */
377
  .editor::-webkit-scrollbar {
378
+ width: 10px;
379
  }
380
 
381
  .editor::-webkit-scrollbar-track {
382
  background: var(--bg-tertiary);
383
+ border-radius: 10px;
384
  }
385
 
386
  .editor::-webkit-scrollbar-thumb {
387
+ background: var(--gradient-primary);
388
+ border-radius: 10px;
 
389
  }
390
 
391
  .editor::-webkit-scrollbar-thumb:hover {
392
+ background: var(--gradient-hover);
393
  }
394
 
395
  /* Animation for mode switching */
 
750
  // Prevent accidental page close
751
  window.addEventListener('beforeunload', function (e) {
752
  const statusDiv = document.getElementById('saveStatus');
753
+ // Check if there are unsaved changes
754
+ if (!statusDiv.className.includes('saved')) {
755
  e.preventDefault();
756
  e.returnValue = '';
757
  }