-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmockup-annotation.html
More file actions
686 lines (650 loc) · 23.3 KB
/
mockup-annotation.html
File metadata and controls
686 lines (650 loc) · 23.3 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>RDFa Editor - Annotation UI Mockup</title>
<style type="text/css">
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
height: 100vh;
display: flex;
flex-direction: column;
background: #f5f5f5;
}
/* Top Toolbar */
.toolbar {
background: #2c3e50;
color: white;
padding: 10px 15px;
display: flex;
align-items: center;
gap: 15px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.toolbar-brand {
font-weight: bold;
font-size: 18px;
margin-right: 20px;
}
.toolbar-group {
display: flex;
align-items: center;
gap: 8px;
}
.toolbar select, .toolbar button {
padding: 6px 12px;
border: none;
border-radius: 4px;
background: #34495e;
color: white;
cursor: pointer;
font-size: 13px;
}
.toolbar button:hover {
background: #415a77;
}
.toolbar .btn-primary {
background: #3498db;
}
.toolbar .spacer {
flex-grow: 1;
}
/* Main Layout */
.main-container {
display: flex;
flex: 1;
overflow: hidden;
}
/* Left Sidebar */
.sidebar-left {
width: 250px;
background: white;
border-right: 1px solid #ddd;
display: flex;
flex-direction: column;
overflow-y: auto;
}
.sidebar-header {
padding: 12px 15px;
background: #ecf0f1;
font-weight: 600;
border-bottom: 1px solid #ddd;
font-size: 13px;
text-transform: uppercase;
color: #555;
}
/* Editor Area */
.editor-container {
flex: 1;
display: flex;
flex-direction: column;
background: white;
overflow: hidden;
position: relative;
}
.editor-toolbar {
padding: 10px 15px;
border-bottom: 1px solid #ddd;
display: flex;
gap: 5px;
background: #fafafa;
}
.editor-toolbar button {
padding: 6px 12px;
border: 1px solid #ddd;
border-radius: 3px;
background: white;
cursor: pointer;
font-size: 13px;
}
.editor-toolbar button:hover {
background: #ecf0f1;
}
.editor-toolbar .separator {
width: 1px;
background: #ddd;
margin: 0 5px;
}
.editor-content {
flex: 1;
padding: 40px 60px;
overflow-y: auto;
line-height: 1.6;
}
.editor-content h1 {
font-size: 32px;
margin-bottom: 20px;
}
.editor-content p {
margin-bottom: 15px;
}
/* Selection highlight */
.selected-text {
background: rgba(52, 152, 219, 0.3);
padding: 2px 4px;
border-radius: 2px;
}
/* Modal Overlay */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
/* Annotation Modal */
.annotation-modal {
background: white;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
width: 600px;
max-height: 80vh;
overflow-y: auto;
}
.modal-header {
padding: 20px 24px;
border-bottom: 1px solid #ddd;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-title {
font-size: 20px;
font-weight: 600;
color: #2c3e50;
}
.modal-close {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #999;
padding: 0;
width: 30px;
height: 30px;
}
.modal-close:hover {
color: #333;
}
.modal-body {
padding: 24px;
}
.modal-footer {
padding: 16px 24px;
border-top: 1px solid #ddd;
display: flex;
justify-content: flex-end;
gap: 10px;
background: #fafafa;
}
/* Form Elements */
.form-group {
margin-bottom: 20px;
}
.form-label {
display: block;
font-weight: 600;
margin-bottom: 8px;
font-size: 14px;
color: #333;
}
.form-label .optional {
font-weight: normal;
color: #999;
font-size: 12px;
}
.form-input {
width: 100%;
padding: 10px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
font-family: inherit;
}
.form-input:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.form-help {
font-size: 12px;
color: #666;
margin-top: 5px;
}
/* Autocomplete Dropdown */
.autocomplete-container {
position: relative;
}
.autocomplete-dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: white;
border: 1px solid #ddd;
border-top: none;
border-radius: 0 0 4px 4px;
max-height: 200px;
overflow-y: auto;
z-index: 10;
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.autocomplete-item {
padding: 10px 12px;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
}
.autocomplete-item:hover, .autocomplete-item.selected {
background: #ecf0f1;
}
.autocomplete-item-main {
flex: 1;
}
.autocomplete-item-name {
font-weight: 500;
margin-bottom: 2px;
}
.autocomplete-item-desc {
font-size: 12px;
color: #666;
}
.autocomplete-item-uri {
font-size: 11px;
color: #999;
font-family: 'Monaco', 'Courier New', monospace;
}
/* Radio Group */
.radio-group {
display: flex;
flex-direction: column;
gap: 10px;
}
.radio-option {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 12px;
border: 2px solid #ddd;
border-radius: 6px;
cursor: pointer;
}
.radio-option:hover {
border-color: #3498db;
background: rgba(52, 152, 219, 0.05);
}
.radio-option.selected {
border-color: #3498db;
background: rgba(52, 152, 219, 0.1);
}
.radio-option input[type="radio"] {
margin-top: 2px;
}
.radio-label {
flex: 1;
}
.radio-title {
font-weight: 600;
margin-bottom: 4px;
}
.radio-desc {
font-size: 13px;
color: #666;
}
/* Preview Box */
.preview-box {
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 6px;
padding: 16px;
margin-top: 20px;
}
.preview-title {
font-weight: 600;
margin-bottom: 12px;
font-size: 13px;
color: #555;
text-transform: uppercase;
}
.triple-preview {
font-family: 'Monaco', 'Courier New', monospace;
font-size: 13px;
line-height: 1.8;
}
.triple-subject { color: #3498db; font-weight: bold; }
.triple-predicate { color: #e67e22; }
.triple-object { color: #2ecc71; }
.triple-type { color: #9b59b6; }
/* Buttons */
.btn {
padding: 10px 20px;
border: none;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
font-weight: 500;
}
.btn-primary {
background: #3498db;
color: white;
}
.btn-primary:hover {
background: #2980b9;
}
.btn-secondary {
background: #ecf0f1;
color: #333;
}
.btn-secondary:hover {
background: #ddd;
}
/* Tabs */
.tabs {
display: flex;
border-bottom: 2px solid #ddd;
margin-bottom: 20px;
}
.tab {
padding: 10px 20px;
cursor: pointer;
border-bottom: 2px solid transparent;
margin-bottom: -2px;
font-weight: 500;
color: #666;
}
.tab:hover {
color: #333;
}
.tab.active {
color: #3498db;
border-bottom-color: #3498db;
}
/* Type Modal */
.type-modal {
background: white;
border-radius: 8px;
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
width: 500px;
max-height: 80vh;
overflow-y: auto;
}
/* Right sidebar minimal for this mockup */
.sidebar-right {
width: 280px;
background: white;
border-left: 1px solid #ddd;
}
/* Selection toolbar */
.selection-toolbar {
position: absolute;
background: #2c3e50;
border-radius: 6px;
padding: 6px;
display: flex;
gap: 4px;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
z-index: 100;
top: 180px;
left: 320px;
}
.selection-toolbar button {
padding: 8px 12px;
border: none;
background: transparent;
color: white;
cursor: pointer;
border-radius: 4px;
font-size: 13px;
}
.selection-toolbar button:hover {
background: rgba(255,255,255,0.1);
}
.selection-toolbar .separator {
width: 1px;
background: rgba(255,255,255,0.2);
margin: 0 4px;
}
</style>
</head>
<body>
<!-- Top Toolbar -->
<div class="toolbar">
<div class="toolbar-brand">⚡ RDFa Editor</div>
<div class="toolbar-group">
<label style="font-size: 12px;">Vocabulary:</label>
<select>
<option>Schema.org</option>
<option>FOAF</option>
<option>Dublin Core</option>
</select>
</div>
<div class="spacer"></div>
<div class="toolbar-group">
<button class="btn-primary">💾 Export</button>
</div>
</div>
<!-- Main Container -->
<div class="main-container">
<!-- Left Sidebar -->
<div class="sidebar-left">
<div class="sidebar-header">Document Outline</div>
</div>
<!-- Editor Area -->
<div class="editor-container">
<!-- Editor Toolbar -->
<div class="editor-toolbar">
<button><b>B</b></button>
<button><i>I</i></button>
<button><u>U</u></button>
<div class="separator"></div>
<button>H1</button>
<button>H2</button>
<div class="separator"></div>
<button>📝 Annotate</button>
<button>🏷️ Add Type</button>
</div>
<!-- Selection Toolbar (floating) -->
<div class="selection-toolbar">
<button><b>B</b></button>
<button><i>I</i></button>
<div class="separator"></div>
<button>📝 Property</button>
<button>🏷️ Type</button>
<button>🔗 Resource</button>
</div>
<!-- Editor Content -->
<div class="editor-content">
<h1>How to Build a Knowledge Graph with RDFa</h1>
<p>
By <span class="selected-text">Alice Johnson</span> | Published January 15, 2025
</p>
<p>
Knowledge graphs are becoming increasingly important for organizing and connecting information on the web.
In this article, I'll show you how to use RDFa to add semantic annotations to your HTML content.
</p>
</div>
</div>
<!-- Right Sidebar -->
<div class="sidebar-right">
<div class="sidebar-header">Selection Info</div>
<div style="padding: 15px; font-size: 13px; color: #666;">
<p><strong>Selected:</strong> "Alice Johnson"</p>
<p style="margin-top: 10px;"><strong>Length:</strong> 13 characters</p>
</div>
</div>
</div>
<!-- Modal Overlay -->
<div class="modal-overlay">
<!-- Property Annotation Modal -->
<div class="annotation-modal">
<div class="modal-header">
<div class="modal-title">📝 Annotate Property</div>
<button class="modal-close">×</button>
</div>
<div class="modal-body">
<!-- Tabs -->
<div class="tabs">
<div class="tab active">Property</div>
<div class="tab">Type</div>
<div class="tab">Resource</div>
</div>
<!-- Selected Text Display -->
<div class="form-group">
<div class="form-label">Selected Text</div>
<div style="background: rgba(52, 152, 219, 0.1); padding: 12px; border-radius: 4px; border-left: 3px solid #3498db;">
<strong>Alice Johnson</strong>
</div>
</div>
<!-- Subject Selection -->
<div class="form-group">
<label class="form-label">Subject (optional)</label>
<select class="form-input">
<option>Current resource (?this)</option>
<option value="custom">Custom URI...</option>
<option value="blank">New blank node</option>
</select>
<div class="form-help">The resource this property describes. Defaults to current context.</div>
</div>
<!-- Property Selection with Autocomplete -->
<div class="form-group">
<label class="form-label">Property *</label>
<div class="autocomplete-container">
<input type="text" class="form-input" placeholder="Search for a property..." value="author" />
<div class="autocomplete-dropdown">
<div class="autocomplete-item selected">
<div class="autocomplete-item-main">
<div class="autocomplete-item-name">author</div>
<div class="autocomplete-item-desc">The author of this content</div>
<div class="autocomplete-item-uri">schema:author</div>
</div>
</div>
<div class="autocomplete-item">
<div class="autocomplete-item-main">
<div class="autocomplete-item-name">creator</div>
<div class="autocomplete-item-desc">An entity primarily responsible for making the resource</div>
<div class="autocomplete-item-uri">dc:creator</div>
</div>
</div>
<div class="autocomplete-item">
<div class="autocomplete-item-main">
<div class="autocomplete-item-name">name</div>
<div class="autocomplete-item-desc">The name of the item</div>
<div class="autocomplete-item-uri">schema:name</div>
</div>
</div>
</div>
</div>
<div class="form-help">Start typing to search Schema.org, FOAF, Dublin Core properties</div>
</div>
<!-- Object Type -->
<div class="form-group">
<label class="form-label">Object Type</label>
<div class="radio-group">
<label class="radio-option">
<input type="radio" name="object-type" value="literal" />
<div class="radio-label">
<div class="radio-title">📄 Literal (Text)</div>
<div class="radio-desc">Use the selected text as the value</div>
</div>
</label>
<label class="radio-option selected">
<input type="radio" name="object-type" value="resource" checked />
<div class="radio-label">
<div class="radio-title">🔗 Resource (URI)</div>
<div class="radio-desc">Link to another resource</div>
</div>
</label>
</div>
</div>
<!-- Resource URI (shown when Resource is selected) -->
<div class="form-group">
<label class="form-label">Resource URI</label>
<select class="form-input">
<option value="new">Create new resource: #alice</option>
<option>Existing resource...</option>
</select>
<div class="form-help">The URI that identifies this person</div>
</div>
<!-- Content Override -->
<div class="form-group">
<label class="form-label">Content Override <span class="optional">(optional)</span></label>
<input type="text" class="form-input" placeholder="Machine-readable value" />
<div class="form-help">Override displayed text with different machine-readable value using content attribute</div>
</div>
<!-- Preview -->
<div class="preview-box">
<div class="preview-title">Preview Triple</div>
<div class="triple-preview">
<div><span class="triple-subject">?this</span> <span class="triple-predicate">schema:author</span> <span class="triple-object">#alice</span> .</div>
</div>
</div>
<!-- RDFa Markup Preview -->
<div class="preview-box" style="margin-top: 10px;">
<div class="preview-title">Generated RDFa</div>
<div style="font-family: 'Monaco', 'Courier New', monospace; font-size: 12px; background: white; padding: 10px; border-radius: 4px;">
<span <span style="color: #e67e22;">property</span>=<span style="color: #2ecc71;">"schema:author"</span> <span style="color: #e67e22;">resource</span>=<span style="color: #2ecc71;">"#alice"</span>>Alice Johnson</span>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-secondary">Cancel</button>
<button class="btn btn-primary">Apply Annotation</button>
</div>
</div>
<!-- Type Annotation Modal (Alternative view - not shown, but available) -->
<!--
<div class="type-modal">
<div class="modal-header">
<div class="modal-title">🏷️ Add Type Declaration</div>
<button class="modal-close">×</button>
</div>
<div class="modal-body">
<div class="form-group">
<label class="form-label">Type *</label>
<div class="autocomplete-container">
<input type="text" class="form-input" placeholder="Search for a type..." value="Person" />
<div class="autocomplete-dropdown">
<div class="autocomplete-item selected">
<div class="autocomplete-item-main">
<div class="autocomplete-item-name">Person</div>
<div class="autocomplete-item-desc">A person (alive, dead, undead, or fictional)</div>
<div class="autocomplete-item-uri">schema:Person</div>
</div>
</div>
<div class="autocomplete-item">
<div class="autocomplete-item-main">
<div class="autocomplete-item-name">Person</div>
<div class="autocomplete-item-desc">The Person class represents people</div>
<div class="autocomplete-item-uri">foaf:Person</div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="form-label">Resource URI</label>
<input type="text" class="form-input" value="#alice" />
</div>
<div class="preview-box">
<div class="preview-title">Preview Triple</div>
<div class="triple-preview">
<div><span class="triple-subject">#alice</span> <span class="triple-predicate">rdf:type</span> <span class="triple-type">schema:Person</span> .</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-secondary">Cancel</button>
<button class="btn btn-primary">Apply Type</button>
</div>
</div>
-->
</div>
</body>
</html>