-
Notifications
You must be signed in to change notification settings - Fork 26
/
GroupInfo.html
538 lines (497 loc) · 23.5 KB
/
GroupInfo.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
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
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
<html>
<head>
<title>Group Info</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="GE3-GITVersion" content="3.6.1">
<link rel="icon" type="image/png" href="./images/favicon.png"></link>
<link rel="STYLESHEET" href="./style/fonts.css" type="text/css">
<link rel="stylesheet" href="./style/menu.css" type="text/css"></link>
<link rel="stylesheet" href="./visualizerFramework/visualizer.css" type="text/css"></link>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">
<style>
p, ul {
margin-block-start: 0.5em;
margin-block-end: 0.5em;
}
ol {
margin-block-start: 0;
margin-block-end: -0.5em;
padding-inline-start: 1em;
}
ol > li {
margin-bottom: 0.5em;
}
table, th, td {
border: 3px solid silver;
padding: 5px;
border-collapse: collapse;
}
.programLink{
color: #0000EE;
cursor: pointer;
}
body {
overflow: auto;
}
button.gap-compute {
font-size: 10pt;
width: 12em;
height: 1.5em;
background-color: #efefef;
background-image: none;
}
/* Collapsible sections styling
* elements in collapsible sections are placed according to the grid definitions in .collapsible
* clicking on 'toggle' elements changes the visibility of 'toggled' items at this level
*/
.heading1 > .toggle, .heading1 > .heading {
margin: 1em 0 0.2em;
font-size: x-large;
font-weight: bold;
}
.heading1 .toggle {
font-size: large;
}
.heading2 > .toggle, .heading2 > .heading {
font-size: large;
font-weight: bold;
}
.heading2 .toggle {
font-size: medium;
}
.collapsible {
display: grid;
grid-template-columns:
[toggle] 1em [heading] 1em [toggle2] 1em [heading2 name content] auto [summary value] 1fr [end];
align-items: baseline;
}
.collapsible > .toggle {
grid-column: toggle;
cursor: pointer;
}
.collapsible > .toggle > .more::after {
vertical-align: 0.25em;
content: "▶";
}
.collapsible > .toggle > .less::after {
vertical-align: 0.15em;
content: "▼";
}
.collapsible > .heading {
grid-column: heading / end;
}
.collapsible > .summary {
grid-column: summary;
margin-left: 0.5em;
}
.collapsible > .content, .collapsible > .gapcell {
grid-column: content / end;
}
.collapsible > .name-value-content {
display: contents;
align-items: center;
}
.collapsible > .name-value-content > .name {
grid-column: name;
font-weight: bold;
}
.collapsible > .name-value-content > .name::after {
content: "\000A0";
}
.collapsible > .name-value-content > .value {
grid-column: value;
margin-left: 0.2em;
}
.collapsible > .collapsible {
display: contents;
}
.collapsible > .collapsible > .toggle {
grid-column: toggle2;
}
.collapsible > .collapsible > .heading {
grid-column: heading2;
}
.collapsible > .collapsible > .heading::after {
content: "\000A0";
}
.collapsible > .collapsible > .content {
padding: 0 1em 0.5em 1em;
margin-top: -0.5em;
}
/* GAP cell styling */
#gap-iframe {
position: fixed; /* Stay in place when underlying document is scrolled */
z-index: 1; /* Sit on top */
left: 20%;
top: 20%;
width: 50em;
border-style: none;
display: none;
}
/* Views */
.thumbnail {
border: none;
height: 100%;
vertical-align: top;
text-align: center;
margin-top: 0.5em;
}
#views {
display: grid;
grid-template-columns: [toggle] 1em [heading] 2em [content] auto [heading-end] 0.5em [summary] auto [content-end] 1fr [end];
}
#views > .toggle {
grid-column: toggle;
cursor: pointer;
}
#views > .heading {
grid-column: heading / heading-end;
}
#views > .content {
grid-column: content / content-end;
display: grid;
grid-template-columns: [CD] 1fr 1em [CG] 1fr 1em [MT] 1fr 1em [OS] 1fr;
}
#views > .content > .heading-row, #views > .content > .data-row {
display: contents;
}
#views > .content > .comment {
grid-column: CD / end;
}
#views > .content .CD {
grid-column: CD;
}
#views > .content .CG {
grid-column: CG;
}
#views > .content .MT {
grid-column: MT;
}
#views > .content .OS {
grid-column: OS;
}
/* Naming schemes */
.default-name {
white-space: nowrap;
}
#naming-schemes > .collapsible > .content {
padding-top: 0.5em;
}
#naming-schemes table, #naming-schemes td {
border-collapse: collapse;
border: none;
padding: 2px 0.2em 0;
}
/* Notes editor */
#notes-textarea {
font-size: 12pt;
max-width: 80em;
height: 10em;
border: 1px solid black;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
<script src="./refreshVersion.js"></script>
<script type="module">
import {check} from './js/Migration.js'
import {load} from './GroupInfo.js'
window.addEventListener('load', () => check().then(load))
</script>
</head>
<body>
<div id="header" style="position: relative; z-index: 100">
<div id="heading"></div>
<div id="top-right-menu">
<div>
<a href='index.html'>
<i title="Project Home" class="fa fa-home fa-2x trm-black"></i></a>
<a href='GroupExplorer.html'>
<i title="Group Library" class="fa fa-book fa-2x trm-black"></i></a>
<a href='Sheet.html' target='_blank'>
<i title="Sheets" class="fa fa-file trm-black" style="font-size:1.5em;vertical-align:10%;"></i></a>
<a href='help/rf-um-groupwindow/index.html'>
<i title="Help" class="fa fa-question-circle fa-2x trm-black"></i></a>
<a href='https://github.com/nathancarter/group-explorer'>
<i title="Source on GitHub" class="fa fa-github fa-2x trm-black"></i></a>
<a href='' data-action="($('.toggled.content, .toggled.name-value-content, .less').show(), $('.summary.toggled, .more').hide())">
<i title="Expand all" class="fa fa-chevron-circle-down fa-2x trm-black"></i></a>
<a href='' data-action="($('.toggled.content, .toggled.name-value-content, .less').hide(), $('.summary.toggled, .more').show())">
<i title="Collapse all" class="fa fa-chevron-circle-up fa-2x trm-black"></i></a>
</div>
<div id="version" style="float: right; font-size: small"></div>
<script type="module">
import * as Version from './Version.js'
document.getElementById('version').textContent = Version.label
</script>
</div>
</div>
<div id="basic-facts" class="collapsible heading1">
<span class="toggle" onclick="$('#basic-facts .toggled').toggle()">
<span class="toggled hidden more"></span>
<span class="toggled less"></span>
</span>
<span class="heading">Basic facts</span>
<div class="name-value-content toggled">
<button class="gap-compute" style="grid-column: name / end; margin: 0.3em 0 0 2em"
data-action="ShowGAPCode.setup('creating this group', Group)">Compute this in GAP</button>
</div>
<template id="basic-fact-template">
<div class="name" style="text-align: right">${basic_fact.name}</div>
<div class="value">${basic_fact.value}</div>
</template>
</div>
<div id="views" class="collapsible heading1">
<span class="toggle" onclick="$('#views .toggled').toggle()">
<span class="toggled hidden more"></span>
<span class="toggled less"></span>
</span>
<span class="heading">Views</span>
<div id="view-minis" class="summary hidden toggled" style="grid-column: summary / end; align-self: end"></div>
<div class="content toggled">
<div class="heading-row" style="text-align: center">
<span class="CD"><a href="help/rf-groupterms/index.html#cayley-diagrams">Cayley Diagram</a></span>
<span class="CG"><a href="help/rf-groupterms/index.html#cycle-graph">Cycle Graph</a></span>
<span class="MT"><a href="help/rf-groupterms/index.html#multiplication-table">Multiplication Table</a></span>
<span class="OS"><a href="help/rf-groupterms/index.html#objects-of-symmetry">Object of Symmetry</a></span>
</div>
<span class="comment" style="margin-top: 0.5em">Click any view to open a copy for exploration.</span>
<span class="comment">
To see all of these visualizations shown together on a sheet,
<span data-action="showAllVisualizersSheet()" class="programLink">click here</span>.
</span>
<span class="comment toggle" onclick="$('#views .toggled').toggle()" style="margin-top: 0.5em">
<span class="programLink less">...less</span>
</span>
</div>
<template id="view-row-template">
<div class="data-row" index="${index}">
<span class="thumbnail CD"></span>
<span class="thumbnail CG"></span>
<span class="thumbnail MT"></span>
<span class="thumbnail OS"></span>
</div>
</template>
</div>
<div id="computed-properties" class="collapsible heading1">
<span class="toggle" onclick="$('#computed-properties > .toggle > .toggled, #computed-properties > .toggled').toggle()">
<span class="toggled hidden more"></span>
<span class="toggled less"></span>
</span>
<span class="heading">Computed properties</span>
<div id="abelian" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#abelian .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Abelian group</span>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
<div id="class-equation" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#class-equation .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Class equation</span>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
<div id="cyclic-group" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#cyclic-group .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Cyclic group</span>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
<div id="subgroups" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#subgroups .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Subgroups</span>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
<div id="order-classes" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#order-classes .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Order classes</span>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
<div id="solvable" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#solvable .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Solvable group</span>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
<div id="zmn" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#zmn .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<div class="heading">ℤ<sub>mn</sub> group</div>
<span class="summary toggled"></span>
<div class="content hidden toggled"></div>
</div>
</div>
<div id="generators" class="collapsible heading1">
<span class="toggle" onclick="$('#generators .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Generators</span>
<div class="content toggled hidden"></div>
</div>
<div id="naming-schemes" class="collapsible heading1">
<span class="toggle" onclick="$('#naming-schemes > .toggle > .toggled, #naming-schemes > .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Naming schemes</span>
<div id="default-names" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#default-names .toggled').toggle()">
<span class="toggled hidden more"></span>
<span class="toggled less"></span>
</span>
<span class="heading">Default element names</span>
<div class="content toggled" style="max-width: 80em"></div>
<template id="default-name-template">
<span class="default-name">${Group.representation[el]}${Group.order - 1 == inx ? '' : ','}</span>
</template>
<template id="default-name-source-template">
<div style="display: ${Group.representationIsUserDefined ? 'block' : 'none'}">
<br>This representation is user-defined; see below.
</div>
<div style="display: ${Group.representationIsUserDefined ? 'none' : 'block'}">
<br>This representation was loaded from the group file.
</div>
</template>
</div>
<div id="loaded-names" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#loaded-names .toggled').toggle()">
<span class="toggled hidden more"></span>
<span class="toggled less"></span>
</span>
<span class="heading">Loaded naming schemes</span>
<div id="loaded-schemes" class="content toggled"></div>
<template id="loaded-scheme-template">
<div style="display: flex; flex-direction: row">
<div style="margin-right: 0.5em">${label}.</div>
<div style="margin-bottom: 0.5em; margin-top: -2px">
<table><tbody></tbody></table>
<br><span data-action="setRepresentationIndex(${index})" class="programLink">Click here</span>
to make this the default representation
</div>
</div>
</template>
<template id="loaded-representation-template">
<tr>
<td>${Group.representation[el]}</td>
<td>=</td>
<td>${representation[el]}</td>
</tr>
</template>
</div>
<div id="user-names" class="collapsible heading2 content toggled">
<span class="toggle" onclick="$('#user-names .toggled').toggle()">
<span class="toggled hidden more"></span>
<span class="toggled less"></span>
</span>
<span class="heading">User-defined naming schemes</span>
<div id="user-naming-schemes" class="content toggled"></div>
<div class="content toggled">
<span data-action="UDR.create()" class="programLink">Click here</span>
to add a new representation for this group.
</div>
</div>
<template id="user-naming-scheme-template">
<div style="display: flex; flex-direction: row">
<div style="margin-right: 0.5em">${index + 1}.</div>
<div style="margin-bottom: 0.5em; margin-top: -2px">
<table><tbody></tbody></table>
<div class="user-name-options"
style="display: ${(-(index + 1) != Group.representationIndex) ? 'block' : 'none'}">
<br><span data-action="UDR.setRepresentationIndex(${index})" class="programLink">Click here</span>
to make this the default representation.
<br><span data-action="UDR.edit(${index})" class="programLink">Click here</span>
to edit this representation.
<br><span data-action="UDR.remove(${index})" class="programLink">Click here</span>
to remove this representation.
</div>
<div class="user-name-editing-options hidden">
<br><span data-action="UDR.showEdit(${index})" class="programLink">Display changes</span>
as they would appear, without saving them.
<br><span data-action="UDR.closeEdit(${index})" class="programLink">Discard changes</span>
and close editor.
<br><span data-action="UDR.saveEdit(${index})" class="programLink">Save changes</span>
and close editor.
</div>
<div style="display: ${(-(index + 1) == Group.representationIndex) ? 'block' : 'none'}">
The default naming scheme is shown above<br>
If you wish to edit or remove this representation,
first make a different representation the default.
</div>
</div>
</div>
</template>
<template id="user-naming-editor-template">
<td style="padding-top: 0">
<textarea style="resize: horizontal; font: 16px 'Math', 'Text', 'Text-Bold', 'Text-Italic'"
placeholder="Enter representation" rows="1" cols="20">${representation}</textarea>
</td>
</template>
<template id="user-names-no-user-defined-names-template">
<i>none</i><br>
</template>
</div>
<div id="notes" class="collapsible heading1">
<span class="toggle" onclick="$('#notes .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">Notes</span>
<div class="content toggled">
<div id="notes-display" style="margin-bottom: 1em"></div>
<div id="notes-trailer">
<span data-action="Notes.edit()" class="programLink">Click</span> to edit notes
</div>
<div id="notes-editor" class="hidden">
<textarea id="notes-textarea" rows="5" cols="80" placeholder="Enter notes here..."></textarea>
<br>Notes are formatted as HTML:
"<i>H</i><sub>2</sub>" will display as <i>H</i><sub>2</sub>.
Remember to use "<br>" for new line.
<br><span data-action="Notes.showEdit()" class="programLink">Display changes</span>
as they would appear, without saving them
<br><span data-action="Notes.closeEdit()" class="programLink">Discard changes</span>
and close editor
<br><span data-action="Notes.saveEdit()" class="programLink">Save changes</span>
and close editor
</div>
</div>
<template id="notes-no-notes-template">
<div><i>none</i></div>
</template>
</div>
<div id="file-data" class="collapsible heading1">
<span class="toggle" onclick="$('#file-data .toggled').toggle()">
<span class="toggled more"></span>
<span class="toggled hidden less"></span>
</span>
<span class="heading">File data</span>
<div class="name-value-content toggled"></div>
<template id="file-data-template">
<div class="name">${file_datum.name}</div>
<div class="value">${file_datum.value}</div>
</template>
</div>
<iframe id="gap-iframe"></iframe>
</body>
</html>