-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
343 lines (326 loc) · 13 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Miro Plugin - Ideation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<style>
.container {
max-width: 1600px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #f8f9fa;
}
.section {
margin-bottom: 20px;
}
#saveMessage {
display: none;
}
#ideationBlock {
display: none;
}
.preselected-sentence {
cursor: pointer;
margin-bottom: 5px;
padding: 5px;
background-color: #f8f9fa;
border-radius: 5px;
}
.preselected-sentence:hover {
background-color: #e9ecef;
}
.navbar {
padding: 0.5rem 1rem;
}
.user-story-block {
cursor: pointer;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
transition: background-color 0.3s;
}
.user-story-block:hover {
background-color: #f8f9fa;
}
.user-story-block.selected {
background-color: #e9ecef;
}
#ideationBlock {
display: none;
}
.preselected-sentence {
cursor: pointer;
margin-bottom: 5px;
padding: 5px;
background-color: #f8f9fa;
border-radius: 5px;
}
.preselected-sentence:hover {
background-color: #e9ecef;
}
.preselected-sentence.selected {
background-color: #e9ecef;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">Miro Plugin</a>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="index.html">Ideation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="recombination.html">Recombination</a>
</li>
<li class="nav-item">
<a class="nav-link" href="rephrase.html">Rephrase</a>
</li>
<li class="nav-item">
<a class="nav-link" href="group.html">Group & Priority</a>
</li>
<li class="nav-item">
<a class="nav-link" href="orsd.html">ORSD</a>
</li>
<li class="nav-item">
<a class="nav-link" href="cqs.html">CQs</a>
</li>
</ul>
</div>
</nav>
<div class="container mt-4 ideation-container">
<div class="row">
<div class="col-md-3">
<div class="section">
<h4>Tell me something about you and your project</h4>
<form id="userInfoForm">
<div class="mb-3">
<label for="name">Name:</label>
<input type="text" id="name" class="form-control" required>
</div>
<div class="mb-3">
<label for="role">Role:</label>
<select id="role" class="form-select" required>
<option value="">Select a role</option>
<option value="Ontology Engineer">Ontology Engineer</option>
<option value="Knowledge Engineer">Knowledge Engineer</option>
<option value="Data Scientist">Data Scientist</option>
<option value="Other">Other</option>
</select>
</div>
<div class="mb-3">
<label for="skills">Skills:</label>
<select id="skills" class="form-select" required>
<option value="">Select a skill</option>
<option value="Ontology Design">Ontology Design</option>
<option value="Knowledge Representation">Knowledge Representation</option>
<option value="Semantic Web Technologies">Semantic Web Technologies</option>
<option value="Data Integration">Data Integration</option>
<option value="Natural Language Processing">Natural Language Processing</option>
</select>
</div>
<div class="mb-3">
<label for="interest">Interest:</label>
<select id="interest" class="form-select" required>
<option value="">Select an interest</option>
<option value="Ontology Engineering">Ontology Engineering</option>
<option value="Knowledge Graphs">Knowledge Graphs</option>
<option value="Linked Data">Linked Data</option>
<option value="Semantic Interoperability">Semantic Interoperability</option>
<option value="Reasoning and Inference">Reasoning and Inference</option>
</select>
</div>
<div class="mb-3">
<label for="career">Career:</label>
<select id="career" class="form-select" required>
<option value="">Select a career</option>
<option value="Research">Research</option>
<option value="Academia">Academia</option>
<option value="Industry">Industry</option>
<option value="Government">Government</option>
<option value="Freelance">Freelance</option>
</select>
</div>
<div class="mb-3">
<label for="projectIntro">Project Intro:</label>
<textarea id="projectIntro" class="form-control" rows="3" required></textarea>
</div>
<button type="submit" class="btn btn-primary">OK</button>
</form>
<div id="saveMessage" class="mt-3 alert alert-success" style="display: none;">
Information saved successfully!
</div>
</div>
</div>
<div class="col-md-6">
<div class="section">
<h4>User Story</h4>
<div class="user-story-block" data-section="persona">
<h5>Persona</h5>
<p>Linka, a researcher in computer science</p>
</div>
<div class="user-story-block" data-section="goal">
<h5>Goal</h5>
<p>Finding/describing music-related data of multiple formats from different sources</p>
</div>
<div class="user-story-block" data-section="keywords">
<h5>Keywords</h5>
<p>music data, multi-modal data, knowledge discovery</p>
</div>
<div class="user-story-block" data-section="scenario-before">
<h5>Scenario - Before</h5>
<p>The analytical and manual process to find music data on the Web from different sources is unmanageable and time-consuming</p>
</div>
<div class="user-story-block" data-section="scenario-after">
<h5>Scenario - During/After</h5>
<p>Possibility to perform all the operations in an automatic manner and with little supervision</p>
</div>
<div class="user-story-block" data-section="stories">
<h5>Stories</h5>
<p>"Penny Lane" is a musical work by "The Beatles"</p>
</div>
</div>
</div>
<div class="col-md-3">
<div class="section">
<h4>Brainstorming</h4>
<button id="brainstormingBtn" class="btn btn-primary">Brainstorm</button>
<button id="refreshBtn" class="btn btn-secondary" style="display: none;">Refresh</button>
<div id="ideationBlock" class="mt-3" style="display: none;">
<h5>Select a sentence:</h5>
<div id="preselectedSentences">
<!-- Preselected sentences will be dynamically added here -->
</div>
<button id="confirmBtn" class="btn btn-success mt-2" disabled>Confirm</button>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Add click event listeners to term buttons
document.querySelectorAll('.term-btn').forEach(btn => {
btn.addEventListener('click', () => {
const className = btn.classList[1];
highlightTerms(className);
});
});
// Add hover event listeners to highlighted terms
document.addEventListener('mouseover', e => {
if (e.target.classList.contains('term')) {
showOptions(e.target);
}
});
// Hide options when clicking outside
document.addEventListener('click', e => {
if (!e.target.closest('.options')) {
document.querySelector('.options').style.display = 'none';
}
});
// User info form submission
document.getElementById('userInfoForm').addEventListener('submit', function (e) {
e.preventDefault();
// Simulate saving user information
setTimeout(function () {
document.getElementById('saveMessage').style.display = 'block';
setTimeout(function () {
document.getElementById('saveMessage').style.display = 'none';
}, 2000);
}, 1000);
});
// User story block selection
const userStoryBlocks = document.querySelectorAll('.user-story-block');
let selectedBlock = null;
userStoryBlocks.forEach(function (block) {
block.addEventListener('click', function () {
if (selectedBlock) {
selectedBlock.classList.remove('selected');
}
block.classList.add('selected');
selectedBlock = block;
});
});
// Brainstorming button click
document.getElementById('brainstormingBtn').addEventListener('click', function () {
const preselectedSentences = document.getElementById('preselectedSentences');
preselectedSentences.innerHTML = '';
// Generate random preselected sentences
const sentences = generateRandomSentences(5);
sentences.forEach(function (sentence) {
const sentenceElement = document.createElement('div');
sentenceElement.classList.add('preselected-sentence');
sentenceElement.textContent = sentence;
sentenceElement.addEventListener('click', function () {
selectSentence(this);
});
preselectedSentences.appendChild(sentenceElement);
});
document.getElementById('ideationBlock').style.display = 'block';
document.getElementById('refreshBtn').style.display = 'inline-block';
});
// Refresh button click
document.getElementById('refreshBtn').addEventListener('click', function () {
const preselectedSentences = document.getElementById('preselectedSentences');
preselectedSentences.innerHTML = '';
// Generate new random preselected sentences
const sentences = generateRandomSentences(5);
sentences.forEach(function (sentence) {
const sentenceElement = document.createElement('div');
sentenceElement.classList.add('preselected-sentence');
sentenceElement.textContent = sentence;
sentenceElement.addEventListener('click', function () {
selectSentence(this);
});
preselectedSentences.appendChild(sentenceElement);
});
});
// Select a preselected sentence
function selectSentence(sentenceElement) {
const selectedSentence = document.querySelector('.preselected-sentence.selected');
if (selectedSentence) {
selectedSentence.classList.remove('selected');
}
sentenceElement.classList.add('selected');
document.getElementById('confirmBtn').disabled = false;
}
// Confirm button click
document.getElementById('confirmBtn').addEventListener('click', function () {
const selectedSentence = document.querySelector('.preselected-sentence.selected').textContent;
if (selectedBlock) {
selectedBlock.querySelector('p').textContent = selectedSentence;
document.getElementById('ideationBlock').style.display = 'none';
document.getElementById('refreshBtn').style.display = 'none';
document.getElementById('confirmBtn').disabled = true;
selectedBlock.classList.remove('selected');
selectedBlock = null;
}
});
// Generate random preselected sentences
function generateRandomSentences(count) {
const sentences = [
'The ontology should define key concepts such as music, artist, album, and genre.',
'Relationships like "performed by" and "belongs to" can connect the concepts.',
'Properties such as title, release date, and duration can be associated with the concepts.',
'The ontology can provide a common vocabulary for integrating music data from different sources.',
'Mapping rules can be defined to align the ontology with existing schemas and formats.',
'Querying and reasoning over the integrated data can be performed using the ontology.',
'The ontology enables a formal and explicit representation of music-related knowledge.',
'It supports reasoning and inference to derive new knowledge from the existing data.',
'The ontology promotes data interoperability and facilitates knowledge sharing and reuse.'
];
const randomSentences = [];
for (let i = 0; i < count; i++) {
const randomIndex = Math.floor(Math.random() * sentences.length);
randomSentences.push(sentences[randomIndex]);
}
return randomSentences;
}
</script>
</body>
</html>