-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
380 lines (338 loc) · 20.4 KB
/
index.html
File metadata and controls
380 lines (338 loc) · 20.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>ThinkRank Studio</title>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<div class="hero-section"
style="position: relative; width: 100%; max-width: 1050px; margin: 2rem auto 1rem auto; padding: 2rem; box-sizing: border-box; background: var(--card-bg); border-radius: 24px; border: 1px solid var(--card-border); box-shadow: 0 10px 30px rgba(0,0,0,0.05); overflow: hidden;">
<div id="slideContent"
style="display: flex; align-items: center; justify-content: center; gap: 3rem; flex-wrap: wrap; opacity: 1;">
<div style="flex: 1; min-width: 300px; display: flex; justify-content: center;">
<img id="slideImg" src="images/diamond9_hero.png" alt="Hero representation"
style="width: 100%; max-width: 400px; height: auto; border-radius: 16px; box-shadow: 0 10px 25px rgba(0,0,0,0.08);">
</div>
<div style="flex: 1.5; min-width: 350px; text-align: left;">
<h1 id="slideTitle"
style="margin-top: 0; margin-bottom: 10px; text-align: left; padding: 0; font-size: 2.8rem; color: var(--text);">
Diamond 9</h1>
<p id="slideDesc"
style="font-size: 1.2rem; font-weight: 500; color: #4a5568; margin: 0 0 20px 0; line-height: 1.5;">
Deep comparative evaluation for complex decision making.
</p>
<div class="ratings-container" id="slidersContainer">
<div class="rating-row">
<div class="rating-label">Speed</div><input type="range" class="tool-slider" id="sliderSpeed" min="0"
max="100" value="0">
</div>
<div class="rating-row">
<div class="rating-label">Depth</div><input type="range" class="tool-slider" id="sliderDepth" min="0"
max="100" value="0">
</div>
<div class="rating-row">
<div class="rating-label">Discussion</div><input type="range" class="tool-slider" id="sliderDisc" min="0"
max="100" value="0">
</div>
<div class="rating-row">
<div class="rating-label">Complexity</div><input type="range" class="tool-slider" id="sliderComp" min="0"
max="100" value="0">
</div>
</div>
<div class="tags-container" id="slideTags" style="margin-top: 15px;"></div>
<div style="margin-top: 25px;">
<!-- Make THIS exactly specifically the button -->
<button onclick="window.location.href='guide.html'" class="presetBtn"
style="background-color: #e73c7e; color: #ffffff; padding: 12px 24px; border-radius: 12px; font-weight: 700; font-size: 16px; border: none; cursor: pointer; box-shadow: 0 4px 6px rgba(231, 60, 126, 0.25);">
View Thinking Tools Guide
</button>
</div>
</div>
</div>
</div>
<script>
const b_carouselData = [
{ id: 'diamond9', title: 'Diamond 9', desc: 'Deep comparative evaluation for complex decision making.', image: 'images/diamond9_hero.png', speed: 40, depth: 100, discussion: 100, complexity: 80, tags: ['Nuanced', 'Collaborative', 'Justification'] },
{ id: 'diamond5', title: 'Diamond 5', desc: 'Focused prioritization with lower cognitive load.', image: 'images/diamond5_hero.png', speed: 80, depth: 60, discussion: 80, complexity: 40, tags: ['Lower load', 'Quick comparison'] },
{ id: 'triangle', title: 'Triangle Ranking', desc: 'Clear, structured hierarchy for balanced evaluation.', image: 'images/triangle_hero.png', speed: 60, depth: 80, discussion: 80, complexity: 60, tags: ['Structured', 'Hierarchical'] },
{ id: 'line', title: 'Line Ranking', desc: 'Rapid judgement and simple direct ladder format.', image: 'images/line_hero.png', speed: 100, depth: 40, discussion: 40, complexity: 20, tags: ['Fast', 'Simple'] },
{ id: 'podium', title: 'Podium Ranking', desc: 'Competitive selection focusing on top choices.', image: 'images/podium_hero.png', speed: 100, depth: 60, discussion: 60, complexity: 40, tags: ['Competitive', 'Top-choice'] },
{ id: 'elimination', title: 'Elimination Mode', desc: 'Argumentative, debate-driven head-to-head evaluation.', image: 'images/elim_hero.png', speed: 80, depth: 80, discussion: 100, complexity: 60, tags: ['Debate-driven', 'Tournament'] }
];
let b_currentIndex = 0;
let isUserDragging = false;
document.addEventListener("DOMContentLoaded", function () {
const b_content = document.getElementById('slideContent');
const b_img = document.getElementById('slideImg');
const b_title = document.getElementById('slideTitle');
const b_desc = document.getElementById('slideDesc');
const b_tags = document.getElementById('slideTags');
const sliderSpeed = document.getElementById('sliderSpeed');
const sliderDepth = document.getElementById('sliderDepth');
const sliderDisc = document.getElementById('sliderDisc');
const sliderComp = document.getElementById('sliderComp');
const sliders = [sliderSpeed, sliderDepth, sliderDisc, sliderComp];
function updateSliderVisual(slider, val) {
slider.style.background = `linear-gradient(90deg, #e73c7e 0%, #ff8a00 ${val}%, #edf2f7 ${val}%, #edf2f7 100%)`;
}
function updateUIElements(data) {
const layoutSelectElem = document.getElementById('layoutSelect');
if (layoutSelectElem && layoutSelectElem.value !== data.id) {
layoutSelectElem.value = data.id;
if (typeof updateActiveInputs === 'function') updateActiveInputs();
}
b_img.src = data.image;
b_title.textContent = data.title;
b_desc.textContent = data.desc;
b_tags.innerHTML = '';
data.tags.forEach(t => {
const span = document.createElement('span');
span.className = 'tag';
span.textContent = t;
b_tags.appendChild(span);
});
}
function renderSlide(index, animateSliders = true) {
const data = b_carouselData[index];
b_currentIndex = index;
updateUIElements(data);
if (animateSliders) {
if (!isUserDragging) {
sliderSpeed.value = data.speed;
updateSliderVisual(sliderSpeed, data.speed);
sliderDepth.value = data.depth;
updateSliderVisual(sliderDepth, data.depth);
sliderDisc.value = data.discussion;
updateSliderVisual(sliderDisc, data.discussion);
sliderComp.value = data.complexity;
updateSliderVisual(sliderComp, data.complexity);
}
}
}
// Initial visual load
setTimeout(() => renderSlide(0), 50);
// Interactive logic
function handleSliderInput(e) {
isUserDragging = true;
let slider = e.target;
updateSliderVisual(slider, slider.value);
let sV = parseInt(sliderSpeed.value);
let dV = parseInt(sliderDepth.value);
let diV = parseInt(sliderDisc.value);
let cV = parseInt(sliderComp.value);
let closestIdx = 0;
let minDiff = Infinity;
b_carouselData.forEach((tool, idx) => {
const diff = Math.abs(tool.speed - sV) + Math.abs(tool.depth - dV) +
Math.abs(tool.discussion - diV) + Math.abs(tool.complexity - cV);
if (diff < minDiff) {
minDiff = diff;
closestIdx = idx;
}
});
if (closestIdx !== b_currentIndex) {
b_currentIndex = closestIdx;
updateUIElements(b_carouselData[closestIdx]);
}
}
sliders.forEach(slider => {
slider.addEventListener('input', handleSliderInput);
});
document.addEventListener('mouseup', () => isUserDragging = false);
document.addEventListener('touchend', () => isUserDragging = false);
const layoutDropdown = document.getElementById('layoutSelect');
if (layoutDropdown) {
layoutDropdown.addEventListener('change', (e) => {
const idx = b_carouselData.findIndex(t => t.id === e.target.value);
if (idx !== -1 && idx !== b_currentIndex) {
renderSlide(idx, true);
}
});
}
});
</script>
<p id="instructions" class="instructions">Choose a preset or enter your own topic and 9 ideas below. <strong>Every
text box is fully editable!</strong><br />When you are ready, click <strong>Generate</strong> to start arranging
your layout.</p>
<div id="inputContainer">
<div style="display: flex; gap: 16px; margin-bottom: 10px; flex-wrap: wrap;">
<select id="layoutSelect" class="textBox" style="flex: 1; min-width: 150px;" onchange="updateActiveInputs()">
<option value="diamond9" selected>Diamond 9</option>
<option value="diamond5">Diamond 5</option>
<option value="triangle">Triangle Ranked (Top 6)</option>
<option value="line">Line (Top 5)</option>
<option value="podium">Podium (Top 3)</option>
<option value="elimination">Elimination (Vs Mode)</option>
</select>
<select id="subjectSelect" class="textBox" style="flex: 1; min-width: 150px;" onchange="updateThemeOptions()">
<option value="" disabled selected>Select a Subject</option>
</select>
<select id="themeSelect" class="textBox" style="flex: 1; min-width: 150px;" onchange="loadSelectedTheme()"
disabled>
<option value="" disabled selected>Select a Theme</option>
</select>
</div>
<input class="textBox" type="text" id="topicInput"
placeholder="Optional: Enter a topic (e.g. Most Important Inventions)"
style="width: 100%; box-sizing: border-box; margin-bottom: 5px; font-weight: 600; text-align: center;">
<div class="inputGrid">
<input class="textBox" type="text" id="text1" placeholder="Idea 1">
<input class="textBox" type="text" id="text2" placeholder="Idea 2">
<input class="textBox" type="text" id="text3" placeholder="Idea 3">
<input class="textBox" type="text" id="text4" placeholder="Idea 4">
<input class="textBox" type="text" id="text5" placeholder="Idea 5">
<input class="textBox" type="text" id="text6" placeholder="Idea 6">
<input class="textBox" type="text" id="text7" placeholder="Idea 7">
<input class="textBox" type="text" id="text8" placeholder="Idea 8">
<input class="textBox" type="text" id="text9" placeholder="Idea 9">
</div>
<div style="display: flex; flex-direction: column; gap: 12px; margin-top: 15px;">
<div style="display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;">
<label style="font-size: 14px; font-weight: 600; color: #4a5568;">Timer:</label>
<input type="number" id="timerInput" class="textBox" style="width: 70px; padding: 8px;" placeholder="Mins">
<div style="display: flex; gap: 5px;">
<button type="button" class="presetBtn"
onclick="document.getElementById('timerInput').value=''">Untimed</button>
<button type="button" class="presetBtn" onclick="document.getElementById('timerInput').value=3">3</button>
<button type="button" class="presetBtn" onclick="document.getElementById('timerInput').value=5">5</button>
<button type="button" class="presetBtn" onclick="document.getElementById('timerInput').value=7">7</button>
<button type="button" class="presetBtn" onclick="document.getElementById('timerInput').value=10">10</button>
<button type="button" class="presetBtn" onclick="document.getElementById('timerInput').value=15">15</button>
</div>
<div style="display: flex; align-items: center; gap: 5px; margin-left: 5px;">
<input type="checkbox" id="autoStartToggle"
style="cursor: pointer; width: 16px; height: 16px; accent-color: #e73c7e;">
<label for="autoStartToggle"
style="font-size: 14px; font-weight: 500; color: #4a5568; cursor: pointer; user-select: none;">Auto-start</label>
</div>
</div>
<div style="display: flex; align-items: center; justify-content: center; gap: 8px;">
<input type="checkbox" id="allowEditToggle" checked
style="cursor: pointer; width: 16px; height: 16px; accent-color: #e73c7e;">
<label for="allowEditToggle"
style="font-size: 14px; font-weight: 500; color: #4a5568; cursor: pointer; user-select: none;">Allow "Back to
Edit" on shared link</label>
</div>
</div>
<div class="button-group"
style="display: flex; gap: 10px; width: 100%; max-width: 750px; margin: 0 auto; flex-wrap: wrap;">
<button class="randomBtn"
onclick="window.open('https://chatgpt.com/g/g-69c07b678e4c8191b3af03b4cf89d82d-thinkrank-studio-gpt', '_blank')"
style="flex: 1; background: #10a37f; color: white; min-width: 160px;">Get AI to help write</button>
<button class="randomBtn" onclick="loadRandomExample()" style="flex: 1; min-width: 140px;">Random Example</button>
<button class="randomBtn" onclick="showShareModal()"
style="flex: 1; background: #4a5568; color: white; min-width: 140px;">Share Link / QR</button>
<button class="makeBtn" onclick="createRectangles()" style="flex: 2; min-width: 250px;">Generate</button>
</div>
<!-- Share Modal -->
<div id="shareModal"
style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(3px);">
<div
style="background: white; padding: 40px; border-radius: 20px; text-align: center; max-width: 90%; width: 450px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); animation: fadeIn 0.3s ease;">
<h2 style="margin-top: 0; color: #1a202c; font-size: 1.8rem; margin-bottom: 10px;">Share Activity</h2>
<p style="color: #718096; margin-bottom: 25px; line-height: 1.5;">Scan the QR code or copy the link below to
instantly share your exact custom configuration.</p>
<div
style="background: #f7fafc; padding: 15px; border-radius: 12px; display: inline-block; margin-bottom: 20px;">
<img id="qrImage" src="" alt="QR Code"
style="width: 200px; height: 200px; display: block; margin: 0 auto; border-radius: 8px;">
<button onclick="downloadQR()"
style="margin-top: 12px; background: none; border: none; color: #4a5568; font-size: 14px; cursor: pointer; text-decoration: underline; font-weight: 600; display: flex; align-items: center; justify-content: center; width: 100%; gap: 6px;">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
Download QR
</button>
</div>
<div class="share-box"
style="margin-bottom: 20px; text-align: left; background: #edf2f7; padding: 15px; border-radius: 12px;">
<h3 style="margin-top: 0; margin-bottom: 12px; font-size: 1.1rem; color: #2d3748; font-weight: 600;">Share
this activity</h3>
<div style="display: flex; gap: 15px; align-items: center; flex-wrap: wrap; min-height: 32px;">
<a id="linkedinShare" target="_blank"
style="background: #0077b5; color: white; padding: 6px 14px; border-radius: 20px; text-decoration: none; font-size: 13px; font-weight: 600; box-shadow: 0 2px 4px rgba(0,0,0,0.1);">LinkedIn</a>
<!-- Google Classroom container -->
<div id="gc-share-container"></div>
<!-- Microsoft Teams -->
<div class="teams-share-button" data-href=""></div>
</div>
</div>
<input type="text" id="shareLinkInput" readonly
style="width: 100%; box-sizing: border-box; padding: 14px; font-size: 14px; border: 1px solid #cbd5e0; border-radius: 8px; background: #ffffff; color: #2d3748; cursor: copy;"
onclick="this.select()">
<div style="display: flex; gap: 10px; margin-top: 15px;">
<button id="copyShareBtn" onclick="copyShareLink(this)" class="presetBtn"
style="flex: 1; background: #e73c7e; color: white; padding: 12px; border: none; font-size: 16px;">Copy
Link</button>
<button onclick="document.getElementById('shareModal').style.display='none'" class="presetBtn"
style="flex: 1; background: #e2e8f0; color: #4a5568; padding: 12px; border: none; font-size: 16px;">Close</button>
</div>
</div>
</div>
</div>
<div id="outputHeader"
style="display: none; text-align: center; margin-top: 1rem; margin-bottom: 0px; animation: fadeIn 0.6s ease forwards;">
<h2 id="generatedTopic" style="margin: 0; margin-bottom: 15px; font-weight: 600;"></h2>
<div id="timerDisplay"
style="display: none; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 15px; width: 100%; max-width: 400px; margin-left: auto; margin-right: auto;">
<div
style="display: flex; font-size: 2.5rem; font-weight: 700; color: #e73c7e; align-items: center; justify-content: center; gap: 15px;">
<span id="timerTime" style="font-variant-numeric: tabular-nums;">00:00</span>
<button id="timerActionBtn" onclick="toggleTimer()"
style="font-size: 1rem; border: 1px solid var(--card-border); background: #ffffff; color: #4a5568; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-weight: bold; transition: background 0.2s;">Start</button>
</div>
<div
style="width: 100%; height: 8px; background: #edf2f7; border-radius: 4px; margin-top: 10px; overflow: hidden;">
<div id="timerProgress"
style="width: 100%; height: 100%; background: #e73c7e; transition: width 1s linear, background-color 1s linear;">
</div>
</div>
</div>
</div>
<div id="container">
<!-- Items are generated automatically via app.js depending on selected layout mode -->
</div>
<div id="footerActions"
style="display: none; text-align: center; margin-bottom: 3rem; animation: fadeIn 0.6s ease forwards;">
<button class="randomBtn" onclick="editMode()"
style="padding: 10px 24px; font-size: 15px; background: #edf2f7; color: #4a5568; border: 1px solid var(--card-border);">Back
to Edit</button>
</div>
<div class="copyright" style="flex-direction: column; gap: 12px; margin-top: 1.5rem; margin-bottom: 2.5rem;">
<div
style="display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; line-height: 1.5;">
<span>
Made with ❤️ for better thinking. If it helped you, you can support the project with a tea.
<a href="https://wise.com/pay/me/jamesphilipj" target="_blank" rel="noopener"
style="color: #e73c7e; text-decoration: none; font-weight: 600;">Buy me a tea</a>.
</span>
<span><a href="https://jamesabela.github.io/jsfun/index.html" target="_blank" rel="noopener"
style="color: #e73c7e; text-decoration: none; font-weight: 600;">More Teaching Tools</a></span>
</div>
<div style="display: flex; justify-content: center;">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" rel="license noopener noreferrer"
class="cc-icons">
<img src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" alt="CC">
<img src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" alt="BY">
<img src="https://mirrors.creativecommons.org/presskit/icons/nc.svg?ref=chooser-v1" alt="NC">
<img src="https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1" alt="SA">
</a>
</div>
</div>
<script src="data.js"></script>
<script src="js/layouts.js"></script>
<script src="js/drag.js"></script>
<script src="js/app.js"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script async defer src="https://teams.microsoft.com/share/launcher.js"></script>
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt=""
referrerpolicy="no-referrer-when-downgrade" /></noscript>
</body>
</html>