|
19 | 19 | </style> |
20 | 20 |
|
21 | 21 | <!-- the interface of the 3d render, with 2 home-made select --> |
22 | | -<div id="interface"> |
23 | | - <!-- the first select --> |
24 | | - <div class="select active" id="hand-select" role="select"> |
25 | | - <input class="select-checkbox" id="hand-select-checkbox" type="checkbox"> |
26 | | - <!-- the select content, the checkbox allow the switch for the display of the options --> |
27 | | - <label for="hand-select-checkbox" style="display: flex; justify-content: space-between"> |
28 | | - <span id="hand-selected">{{ e.total }}</span> |
29 | | - <img alt="arrow_down" src="/assets/img/arrow_down.png" style="aspect-ratio: 1 / 1; height: 1.6em;"> |
30 | | - </label> |
31 | | - <!-- the select options --> |
32 | | - <div class="select-options" id="hand-select-options"> |
33 | | - <span class="select-option choose">{{ e.total }}</span> |
34 | | - <span class="select-option">{{ e.preferred }}</span> |
35 | | - <span class="select-option">{{ e.hf_format | replace: '%h%', e.left | replace: '%f%', e.hand }}</span> |
36 | | - <span class="select-option">{{ e.hf_format | replace: '%h%', e.right | replace: '%f%', e.hand }}</span> |
| 22 | +<div class="buffer"> |
| 23 | + <div id="interface"> |
| 24 | + <!-- the first select --> |
| 25 | + <div class="select active" id="hand-select" role="select"> |
| 26 | + <input class="select-checkbox" id="hand-select-checkbox" type="checkbox"> |
| 27 | + <!-- the select content, the checkbox allow the switch for the display of the options --> |
| 28 | + <label for="hand-select-checkbox" style="display: flex; justify-content: space-between"> |
| 29 | + <span id="hand-selected">{{ e.total }}</span> |
| 30 | + <img alt="arrow_down" src="/assets/img/arrow_down.png" style="aspect-ratio: 1 / 1; height: 1.6em;"> |
| 31 | + </label> |
| 32 | + <!-- the select options --> |
| 33 | + <div class="select-options" id="hand-select-options"> |
| 34 | + <span class="select-option choose">{{ e.total }}</span> |
| 35 | + <span class="select-option">{{ e.preferred }}</span> |
| 36 | + <span class="select-option">{{ e.hf_format | replace: '%h%', e.left | replace: '%f%', e.hand }}</span> |
| 37 | + <span class="select-option">{{ e.hf_format | replace: '%h%', e.right | replace: '%f%', e.hand }}</span> |
| 38 | + </div> |
37 | 39 | </div> |
38 | | - </div> |
39 | | - <!-- the second select --> |
40 | | - <div class="select" id="finger-select" role="select"> |
41 | | - <input class="select-checkbox" id="finger-select-checkbox" type="checkbox"> |
42 | | - <!-- the select content, the checkbox allow the switch for the display of the options --> |
43 | | - <label for="finger-select-checkbox" style="display: flex; justify-content: space-between"> |
44 | | - <span id="finger-selected">{{ e.all_button }}</span> |
45 | | - <img alt="arrow_down" src="/assets/img/arrow_down.png" style="aspect-ratio: 1 / 1; height: 1.6em;"> |
46 | | - </label> |
47 | | - <!-- the select options --> |
48 | | - <div class="select-options" id="finger-select-options"> |
49 | | - <span class="select-option choose">{{ e.all_button }}</span> |
50 | | - <span class="select-option">{{ e.thumb }}</span> |
51 | | - <span class="select-option">{{ e.index }}</span> |
52 | | - <span class="select-option">{{ e.middle }}</span> |
53 | | - <span class="select-option">{{ e.ring }}</span> |
54 | | - <span class="select-option">{{ e.little }}</span> |
| 40 | + <!-- the second select --> |
| 41 | + <div class="select" id="finger-select" role="select"> |
| 42 | + <input class="select-checkbox" id="finger-select-checkbox" type="checkbox"> |
| 43 | + <!-- the select content, the checkbox allow the switch for the display of the options --> |
| 44 | + <label for="finger-select-checkbox" style="display: flex; justify-content: space-between"> |
| 45 | + <span id="finger-selected">{{ e.all_button }}</span> |
| 46 | + <img alt="arrow_down" src="/assets/img/arrow_down.png" style="aspect-ratio: 1 / 1; height: 1.6em;"> |
| 47 | + </label> |
| 48 | + <!-- the select options --> |
| 49 | + <div class="select-options" id="finger-select-options"> |
| 50 | + <span class="select-option choose">{{ e.all_button }}</span> |
| 51 | + <span class="select-option">{{ e.thumb }}</span> |
| 52 | + <span class="select-option">{{ e.index }}</span> |
| 53 | + <span class="select-option">{{ e.middle }}</span> |
| 54 | + <span class="select-option">{{ e.ring }}</span> |
| 55 | + <span class="select-option">{{ e.little }}</span> |
| 56 | + </div> |
55 | 57 | </div> |
56 | 58 | </div> |
57 | 59 | </div> |
|
90 | 92 |
|
91 | 93 | <!-- process the data and handle the interface to display the Keycube --> |
92 | 94 | <script type="module"> |
93 | | - import { Keycube } from '/assets/js/model-viewer.js'; |
| 95 | + import {Keycube} from '/assets/js/model-viewer.js'; |
| 96 | + import langFinger from '/assets/js/ui-lang.json' with {type: 'json'}; |
94 | 97 |
|
95 | 98 | const heatmap = new Keycube(document.getElementById('model-container'), true, 'integer') |
96 | 99 |
|
97 | | - import langFinger from '/assets/js/ui-lang.json' with {type: 'json'}; |
98 | | - |
99 | 100 | // select element |
100 | 101 | const handLabel = document.getElementById('hand-selected'); |
101 | 102 | const fingerLabel = document.getElementById('finger-selected'); |
|
0 commit comments