-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
129 lines (113 loc) · 3.59 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mindmap Application</title>
<style>
/* Loading Indicator Styles */
#loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
display: none; /* Hidden by default */
}
.spinner {
border: 12px solid #f3f3f3; /* Light grey */
border-top: 12px solid #3498db; /* Blue */
border-radius: 50%;
width: 80px;
height: 80px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Toolbar Styles */
#toolbar {
position: fixed;
top: 10px;
left: 10px;
background: rgba(255, 255, 255, 0.9);
padding: 10px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.3);
z-index: 1000;
display: flex;
align-items: center;
}
/* Color Display */
#colorDisplay {
width: 30px;
height: 30px;
border: 1px solid #000;
display: inline-block;
vertical-align: middle;
margin-right: 10px;
}
/* Pickr Button */
#pickr-button {
padding: 5px 10px;
cursor: pointer;
margin-right: 10px;
}
/* Style the other buttons */
#toolbar button {
margin-left: 10px;
padding: 5px 10px;
cursor: pointer;
}
/* Ensure the canvas covers the full window */
body, html {
margin: 0;
padding: 0;
overflow: hidden;
}
#mindmap {
display: block;
background-color: #f9f9f9; /* Optional: Canvas background color */
}
</style>
<!-- Include Pickr CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/classic.min.css"/> <!-- 'classic' theme -->
</head>
<body>
<!-- Loading Overlay -->
<div id="loading-overlay">
<div class="spinner"></div>
</div>
<div id="toolbar">
<!-- <div id="colorDisplay" title="Selected Node Color"></div> -->
<!-- Pickr Button -->
<button id="pickr-button">Pick Color</button>
<!-- Other Action Buttons -->
<button id="undo">Undo</button>
<button id="redo">Redo</button>
<button id="save-map">Save</button>
<button id="load-map">Load</button>
<button id="add-post-it">Add Post-It</button>
<button id="settingsBtn">Settings</button>
</div>
<canvas id="mindmap" tabindex="0"></canvas>
<!-- settings button -->
<script>
// Use the exposed electronAPI from the preload script
document.getElementById('settingsBtn').addEventListener('click', () => {
window.electronAPI.openSettings();
});
</script>
<!-- Include Pickr JS -->
<script src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js"></script>
<!-- Include TinyColor JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.6.0/tinycolor.min.js"></script>
<!-- Include Renderer Script -->
<script src="renderer.js"></script>
</body>
</html>