-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
275 lines (259 loc) · 15 KB
/
index.html
File metadata and controls
275 lines (259 loc) · 15 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
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="SysMap">
<title>SysMap</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=DM+Serif+Display:ital@0;1&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-firestore-compat.js"></script>
</head>
<body>
<!-- AUTH -->
<div id="authScreen" class="screen">
<canvas id="authCanvas" class="auth-canvas"></canvas>
<div class="auth-card">
<div class="auth-brand"><div class="auth-mark">S</div><span class="auth-brand-name">SysMap</span></div>
<h1 class="auth-headline">Think deeper.<br>Connect everything.</h1>
<p class="auth-body">Build personal knowledge maps in separate spaces — one for economics, one for your novel, one for your life.</p>
<button class="btn-google" id="signInBtn">
<svg width="18" height="18" viewBox="0 0 24 24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57C21.36 18.09 22.56 15.37 22.56 12.25z" fill="#4285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z" fill="#FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"/></svg>
Continue with Google
</button>
<p class="auth-note">Free · Private · No credit card</p>
<div class="auth-feats">
<div class="auth-feat"><span>⬡</span>Visual knowledge graphs</div>
<div class="auth-feat"><span>◫</span>Separate spaces per topic</div>
<div class="auth-feat"><span>◧</span>10 deep templates</div>
</div>
</div>
</div>
<!-- DESKTOP -->
<div id="desktopScreen" class="screen hidden">
<div class="desktop-bar">
<div class="desktop-logo">SysMap</div>
<div class="desktop-bar-right">
<div class="sync-pip" id="syncPip"></div>
<div class="user-chip" id="userChip"></div>
</div>
</div>
<div class="desktop-body">
<div class="desktop-greeting" id="greeting"></div>
<div class="desktop-sub">Your knowledge spaces</div>
<div class="folders-grid" id="foldersGrid"></div>
</div>
</div>
<!-- WORKSPACE -->
<div id="workspaceScreen" class="screen hidden">
<div class="workspace">
<aside class="sidebar" id="sidebar">
<div class="sidebar-top">
<div class="folder-crumb">
<button class="back-btn" onclick="goHome()">
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M19 12H5M12 5l-7 7 7 7"/></svg>
</button>
<span class="folder-crumb-name" id="activeFolderName"></span>
</div>
<button class="icon-btn" id="sidebarNewBtn">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
</button>
</div>
<div class="sidebar-search-wrap">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>
<input class="sidebar-search" id="searchInput" placeholder="Search nodes…">
</div>
<div class="node-list" id="nodeList"></div>
<div class="sidebar-foot" id="sidebarFoot"></div>
</aside>
<main class="graph-area" id="graphWrap">
<canvas id="graphCanvas"></canvas>
<div class="graph-hud">
<button class="graph-btn" onclick="Graph.zoom(1.25)">+</button>
<button class="graph-btn" onclick="Graph.zoom(0.8)">−</button>
<button class="graph-btn" onclick="Graph.zoomFit()">⊡</button>
<button class="graph-btn" onclick="Graph.autoLayout()">⬡</button>
</div>
<div class="graph-empty" id="graphEmpty">
<div class="ge-glyph">⬡</div>
<div class="ge-title">Map starts here</div>
<div class="ge-sub">Create your first node to begin</div>
<button class="btn btn-primary" onclick="openNewNodeModal()">+ New Node</button>
</div>
<div class="graph-tip" id="graphTip"></div>
</main>
<aside class="editor-panel closed" id="editorPanel">
<div class="ep-head">
<input class="ep-name" id="editorName" placeholder="Node name…">
<span class="ep-badge" id="editorBadge"></span>
<button class="icon-btn ep-close" id="editorCloseBtn">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<div class="ep-colors" id="editorColors"></div>
<div class="ep-conns" id="editorConns"></div>
<div class="ep-blockbar" id="blockBar">
<button class="bab-btn" data-type="text">Text</button>
<button class="bab-btn" data-type="heading">Heading</button>
<button class="bab-btn" data-type="draw">Draw</button>
<button class="bab-btn" data-type="image">Image</button>
<button class="bab-btn" data-type="divider">—</button>
<div style="flex:1"></div>
<button class="btn btn-xs btn-danger" onclick="App.deleteNode()">Delete</button>
</div>
<div class="ep-body" id="editorBody"></div>
<div class="ep-foot">
<span class="ep-ts" id="saveTs"></span>
<button class="btn btn-primary btn-sm" onclick="App.saveNode()">Save ⌘S</button>
</div>
</aside>
</div>
</div>
<!-- DOCK -->
<div class="dock" id="dock">
<div class="dock-inner" id="dockDesktop">
<button class="dock-item active" data-label="Home">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
</button>
<button class="dock-item" onclick="openNewFolderModal()" data-label="New Space">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M22 19a2 2 0 01-2 2H4a2 2 0 01-2-2V5a2 2 0 012-2h5l2 3h9a2 2 0 012 2z"/><line x1="12" y1="11" x2="12" y2="17"/><line x1="9" y1="14" x2="15" y2="14"/></svg>
</button>
<div class="dock-sep"></div>
<button class="dock-item" onclick="openThemePanel()" data-label="Theme">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2"/></svg>
</button>
</div>
<div class="dock-inner hidden" id="dockWorkspace">
<button class="dock-item" onclick="goHome()" data-label="Home">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg>
</button>
<div class="dock-sep"></div>
<button class="dock-item" onclick="openNewNodeModal()" data-label="New Node">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="16"/><line x1="8" y1="12" x2="16" y2="12"/></svg>
</button>
<button class="dock-item" onclick="Graph.zoomFit()" data-label="Fit">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" y1="3" x2="14" y2="10"/><line x1="3" y1="21" x2="10" y2="14"/></svg>
</button>
<button class="dock-item" onclick="Graph.autoLayout()" data-label="Layout">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>
</button>
<div class="dock-sep"></div>
<button class="dock-item" onclick="openThemePanel()" data-label="Theme">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2"/></svg>
</button>
<button class="dock-item" onclick="openMoreSheet()" data-label="More">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><circle cx="5" cy="12" r="1.2"/><circle cx="12" cy="12" r="1.2"/><circle cx="19" cy="12" r="1.2"/></svg>
</button>
</div>
</div>
<!-- OVERLAYS -->
<div class="overlay" id="newFolderOverlay">
<div class="sheet">
<div class="sheet-pip"></div>
<div class="sheet-title">New Space</div>
<div class="emoji-row" id="folderEmojiRow"></div>
<input class="sheet-input" id="newFolderName" placeholder="Name this space…">
<div class="sheet-actions">
<button class="btn btn-ghost" onclick="closeOverlay('newFolderOverlay')">Cancel</button>
<button class="btn btn-primary" onclick="Folders.create()">Next →</button>
</div>
</div>
</div>
<div class="overlay" id="templateOverlay">
<div class="sheet sheet-tall">
<div class="sheet-pip"></div>
<div class="sheet-title">Choose a template</div>
<p class="sheet-hint" id="templateHint"></p>
<div class="template-grid" id="templateGrid"></div>
<button class="btn btn-ghost" style="width:100%;margin-top:10px" onclick="closeOverlay('templateOverlay');showOverlay('newFolderOverlay')">← Back</button>
</div>
</div>
<div class="overlay" id="newNodeOverlay">
<div class="sheet">
<div class="sheet-pip"></div>
<div class="sheet-title">New Node</div>
<input class="sheet-input" id="newNodeName" placeholder="What is this node about?">
<select class="sheet-select" id="newNodeCat">
<option value="concept">Concept</option>
<option value="system">System</option>
<option value="person">Person</option>
<option value="place">Place</option>
<option value="event">Event</option>
<option value="thing">Thing</option>
<option value="custom">Custom</option>
</select>
<div class="sheet-actions">
<button class="btn btn-ghost" onclick="closeOverlay('newNodeOverlay')">Cancel</button>
<button class="btn btn-primary" onclick="App.createNode()">Create</button>
</div>
</div>
</div>
<div class="overlay" id="themeOverlay">
<div class="sheet">
<div class="sheet-pip"></div>
<div class="sheet-title">Appearance</div>
<div class="section-label">Theme</div>
<div class="theme-choices" id="themeChoices"></div>
<div class="section-label" style="margin-top:16px">Node accent</div>
<div class="palette-row" id="nodePalette"></div>
<button class="btn btn-ghost" style="width:100%;margin-top:18px" onclick="closeOverlay('themeOverlay')">Done</button>
</div>
</div>
<div class="overlay" id="moreOverlay">
<div class="sheet">
<div class="sheet-pip"></div>
<div class="sheet-title">More</div>
<button class="more-row" onclick="App.exportData();closeOverlay('moreOverlay')">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="8 17 12 21 16 17"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.88 18.09A5 5 0 0018 9h-1.26A8 8 0 103 16.29"/></svg>Export backup
</button>
<button class="more-row" onclick="App.importData();closeOverlay('moreOverlay')">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.88 18.09A5 5 0 0018 9h-1.26A8 8 0 103 16.29"/></svg>Import backup
</button>
<button class="more-row more-row-danger" onclick="App.signOut()">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"/><polyline points="16 17 21 12 16 7"/><line x1="21" y1="12" x2="9" y2="12"/></svg>Sign out
</button>
<button class="btn btn-ghost" style="width:100%;margin-top:8px" onclick="closeOverlay('moreOverlay')">Close</button>
</div>
</div>
<div class="fmt-bar hidden" id="fmtBar">
<button class="fmt-btn" onclick="Blocks.fmt('bold')"><b>B</b></button>
<button class="fmt-btn" onclick="Blocks.fmt('italic')"><i>I</i></button>
<button class="fmt-btn" onclick="Blocks.fmt('underline')"><u>U</u></button>
<div class="fmt-sep"></div>
<div class="hl-dot" style="background:#FFD60A" onclick="Blocks.highlight('rgba(255,214,10,.25)','#FFD60A')"></div>
<div class="hl-dot" style="background:#30D158" onclick="Blocks.highlight('rgba(48,209,88,.22)','#30D158')"></div>
<div class="hl-dot" style="background:#FF453A" onclick="Blocks.highlight('rgba(255,69,58,.2)','#FF453A')"></div>
<div class="hl-dot" style="background:#0A84FF" onclick="Blocks.highlight('rgba(10,132,255,.2)','#0A84FF')"></div>
<div class="fmt-sep"></div>
<button class="fmt-btn" onclick="Blocks.fmt('removeFormat')">✕</button>
</div>
<div class="fs-viewer hidden" id="fsViewer" onclick="this.classList.add('hidden')">
<img id="fsImg" alt="">
</div>
<input type="file" id="imgFileInput" accept="image/*" hidden>
<input type="file" id="importInput" accept=".json" hidden>
<!-- Firebase config and app initialization -->
<script>
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// FIREBASE CONFIG — Update with your Firebase credentials
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
const FIREBASE_CONFIG = {
apiKey: "AIzaSyDhSDk2JLRx7Gx3ostmFZ6IWqO8PnEdRaM",
authDomain: "sysmaps-3378d.firebaseapp.com",
projectId: "sysmaps-3378d",
storageBucket: "sysmaps-3378d.firebasestorage.app",
messagingSenderId: "21224827114",
appId: "1:21224827114:web:eb4ffd4249eff31a134f93"
};
firebase.initializeApp(FIREBASE_CONFIG);
const _auth = firebase.auth();
const _db = firebase.firestore();
</script>
<script src="app.js"></script>
</body>
</html>