|
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <meta charset="UTF-8"> |
5 | | - <title>Gnosis Format Toggle</title> |
| 5 | + <title>Gnosis</title> |
6 | 6 | <style> |
| 7 | + * { margin: 0; padding: 0; box-sizing: border-box; } |
7 | 8 | body { |
8 | | - width: 300px; |
9 | | - padding: 16px; |
| 9 | + width: 380px; |
10 | 10 | font-family: system-ui, -apple-system, sans-serif; |
11 | | - margin: 0; |
12 | | - } |
13 | | - h1 { |
14 | | - font-size: 16px; |
15 | | - font-weight: 600; |
16 | | - margin: 0 0 12px 0; |
| 11 | + font-size: 13px; |
17 | 12 | color: #1a1a1a; |
| 13 | + background: #fff; |
| 14 | + } |
| 15 | + .header { |
| 16 | + background: linear-gradient(135deg, #667eea, #764ba2); |
| 17 | + color: white; |
| 18 | + padding: 14px 16px; |
18 | 19 | } |
19 | | - .option { |
| 20 | + .header h1 { font-size: 15px; font-weight: 600; } |
| 21 | + .header .subtitle { font-size: 11px; opacity: 0.85; margin-top: 2px; } |
| 22 | + .status-bar { |
| 23 | + padding: 8px 16px; |
| 24 | + font-size: 12px; |
20 | 25 | display: flex; |
21 | 26 | align-items: center; |
22 | | - gap: 12px; |
23 | | - padding: 12px; |
24 | | - border: 1px solid #e0e0e0; |
25 | | - border-radius: 6px; |
26 | | - margin-bottom: 8px; |
27 | | - cursor: pointer; |
28 | | - transition: all 0.2s; |
29 | | - } |
30 | | - .option:hover { |
31 | | - border-color: #0066cc; |
32 | | - background: #f5f9ff; |
| 27 | + gap: 6px; |
33 | 28 | } |
34 | | - .option.active { |
35 | | - border-color: #0066cc; |
36 | | - background: #e6f2ff; |
| 29 | + .status-bar.detected { background: #f0fff4; color: #276749; } |
| 30 | + .status-bar.not-detected { background: #fffbeb; color: #744210; } |
| 31 | + .status-dot { width: 8px; height: 8px; border-radius: 50%; } |
| 32 | + .status-dot.green { background: #48bb78; } |
| 33 | + .status-dot.yellow { background: #ecc94b; } |
| 34 | + .section { padding: 12px 16px; border-top: 1px solid #edf2f7; } |
| 35 | + .section-title { font-size: 11px; font-weight: 600; color: #718096; text-transform: uppercase; margin-bottom: 8px; } |
| 36 | + .kv-grid { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; } |
| 37 | + .kv-key { color: #718096; font-size: 12px; } |
| 38 | + .kv-value { font-weight: 500; font-size: 12px; word-break: break-word; } |
| 39 | + .component-list { list-style: none; } |
| 40 | + .component-list li { |
| 41 | + display: flex; align-items: center; gap: 6px; |
| 42 | + padding: 3px 0; font-size: 12px; |
37 | 43 | } |
38 | | - .option input[type="radio"] { |
39 | | - margin: 0; |
| 44 | + .status-badge { |
| 45 | + display: inline-block; padding: 1px 6px; border-radius: 3px; |
| 46 | + font-size: 10px; font-weight: 600; text-transform: uppercase; |
40 | 47 | } |
41 | | - .option-label { |
42 | | - flex: 1; |
| 48 | + .status-complete { background: #c6f6d5; color: #276749; } |
| 49 | + .status-scaffolded { background: #feebc8; color: #744210; } |
| 50 | + .status-planned { background: #e2e8f0; color: #4a5568; } |
| 51 | + .status-designed { background: #bee3f8; color: #2a4365; } |
| 52 | + .status-removed { background: #fed7d7; color: #742a2a; } |
| 53 | + .progress-bar { height: 6px; background: #edf2f7; border-radius: 3px; margin-top: 8px; } |
| 54 | + .progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #667eea, #764ba2); } |
| 55 | + .toggle-section { padding: 10px 16px; border-top: 1px solid #edf2f7; } |
| 56 | + .toggle-row { |
| 57 | + display: flex; align-items: center; justify-content: space-between; |
| 58 | + padding: 6px 0; |
43 | 59 | } |
44 | | - .option-title { |
45 | | - font-weight: 500; |
46 | | - color: #1a1a1a; |
47 | | - } |
48 | | - .option-desc { |
49 | | - font-size: 12px; |
50 | | - color: #666; |
51 | | - margin-top: 2px; |
| 60 | + .toggle-label { font-size: 12px; } |
| 61 | + .toggle-switch { |
| 62 | + width: 36px; height: 20px; border-radius: 10px; |
| 63 | + background: #cbd5e0; cursor: pointer; position: relative; |
| 64 | + transition: background 0.2s; |
52 | 65 | } |
53 | | - .status { |
54 | | - margin-top: 12px; |
55 | | - padding: 8px 12px; |
56 | | - background: #f0f0f0; |
57 | | - border-radius: 4px; |
58 | | - font-size: 12px; |
59 | | - color: #666; |
60 | | - } |
61 | | - .info { |
62 | | - margin-top: 12px; |
63 | | - padding: 12px; |
64 | | - background: #fff9e6; |
65 | | - border: 1px solid #ffe066; |
66 | | - border-radius: 4px; |
67 | | - font-size: 12px; |
68 | | - color: #666; |
| 66 | + .toggle-switch.on { background: #667eea; } |
| 67 | + .toggle-switch::after { |
| 68 | + content: ''; position: absolute; top: 2px; left: 2px; |
| 69 | + width: 16px; height: 16px; border-radius: 50%; background: white; |
| 70 | + transition: left 0.2s; |
69 | 71 | } |
| 72 | + .toggle-switch.on::after { left: 18px; } |
| 73 | + .empty-state { padding: 24px 16px; text-align: center; color: #a0aec0; } |
| 74 | + .empty-state p { margin-top: 8px; font-size: 12px; } |
| 75 | + .footer { padding: 8px 16px; border-top: 1px solid #edf2f7; font-size: 11px; color: #a0aec0; text-align: center; } |
| 76 | + .footer a { color: #667eea; text-decoration: none; } |
70 | 77 | </style> |
71 | 78 | </head> |
72 | 79 | <body> |
73 | | - <h1>Gnosis Format Preference</h1> |
| 80 | + <div class="header"> |
| 81 | + <h1>Gnosis</h1> |
| 82 | + <div class="subtitle">Stateful Artefacts Viewer</div> |
| 83 | + </div> |
| 84 | + |
| 85 | + <div id="status-bar" class="status-bar not-detected"> |
| 86 | + <span class="status-dot yellow"></span> |
| 87 | + <span id="status-text">Scanning page...</span> |
| 88 | + </div> |
| 89 | + |
| 90 | + <div id="project-info" style="display: none;"> |
| 91 | + <div class="section"> |
| 92 | + <div class="section-title">Project</div> |
| 93 | + <div class="kv-grid"> |
| 94 | + <span class="kv-key">Name</span> |
| 95 | + <span class="kv-value" id="val-name">-</span> |
| 96 | + <span class="kv-key">Version</span> |
| 97 | + <span class="kv-value" id="val-version">-</span> |
| 98 | + <span class="kv-key">Phase</span> |
| 99 | + <span class="kv-value" id="val-phase">-</span> |
| 100 | + <span class="kv-key">Completion</span> |
| 101 | + <span class="kv-value" id="val-completion">-</span> |
| 102 | + <span class="kv-key">Updated</span> |
| 103 | + <span class="kv-value" id="val-updated">-</span> |
| 104 | + <span class="kv-key">License</span> |
| 105 | + <span class="kv-value" id="val-license">-</span> |
| 106 | + </div> |
| 107 | + <div class="progress-bar"><div class="progress-fill" id="progress-fill" style="width:0%"></div></div> |
| 108 | + </div> |
| 109 | + |
| 110 | + <div class="section" id="components-section" style="display: none;"> |
| 111 | + <div class="section-title">Components (<span id="component-count">0</span>)</div> |
| 112 | + <ul class="component-list" id="component-list"></ul> |
| 113 | + </div> |
74 | 114 |
|
75 | | - <div class="option" data-mode="visual"> |
76 | | - <input type="radio" name="format" id="visual" value="visual"> |
77 | | - <label class="option-label" for="visual"> |
78 | | - <div class="option-title">🎨 Visual Mode</div> |
79 | | - <div class="option-desc">Show badges and emoji (default)</div> |
80 | | - </label> |
| 115 | + <div class="section" id="blockers-section" style="display: none;"> |
| 116 | + <div class="section-title">Blockers</div> |
| 117 | + <ul class="component-list" id="blockers-list"></ul> |
| 118 | + </div> |
81 | 119 | </div> |
82 | 120 |
|
83 | | - <div class="option" data-mode="accessible"> |
84 | | - <input type="radio" name="format" id="accessible" value="accessible"> |
85 | | - <label class="option-label" for="accessible"> |
86 | | - <div class="option-title">📖 Accessible Mode</div> |
87 | | - <div class="option-desc">Plain text for screen readers</div> |
88 | | - </label> |
| 121 | + <div id="empty-state" class="empty-state"> |
| 122 | + <p>Navigate to a GitHub/GitLab repository with<br><code>.machine_readable/STATE.scm</code></p> |
89 | 123 | </div> |
90 | 124 |
|
91 | | - <div class="status"> |
92 | | - <span id="status-text">Loading preference...</span> |
| 125 | + <div class="toggle-section"> |
| 126 | + <div class="toggle-row"> |
| 127 | + <span class="toggle-label">Accessible mode (plain text)</span> |
| 128 | + <div class="toggle-switch" id="format-toggle"></div> |
| 129 | + </div> |
| 130 | + <div class="toggle-row"> |
| 131 | + <span class="toggle-label">Inject annotation layer</span> |
| 132 | + <div class="toggle-switch" id="annotation-toggle"></div> |
| 133 | + </div> |
93 | 134 | </div> |
94 | 135 |
|
95 | | - <div class="info"> |
96 | | - This extension detects Gnosis-rendered content and applies your preferred format. Refresh the page after changing. |
| 136 | + <div class="footer"> |
| 137 | + <a href="https://github.com/hyperpolymath/stateful-artefacts">Gnosis</a> · Stateful Artefacts |
97 | 138 | </div> |
98 | 139 |
|
99 | 140 | <script src="scripts/popup.js"></script> |
|
0 commit comments