ping98k commited on
Commit
8ad7568
·
1 Parent(s): f2e1fb8

Refactor control group layout in index.html for improved styling and organization of clustering options and search mode selection.

Browse files
Files changed (1) hide show
  1. index.html +35 -21
index.html CHANGED
@@ -46,6 +46,23 @@
46
  background: #4caf50;
47
  transition: width 0.2s;
48
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  </style>
50
  </head>
51
 
@@ -56,29 +73,26 @@
56
  import { sentences } from './sentences.js';
57
  document.getElementById("input").value = sentences.join("\n");
58
  </script>
59
- <label for="kmeans-k" style="margin-left:10px;">Clusters:</label>
60
- <input id="kmeans-k" type="number" min="2" max="100" value="7" style="width:60px;">
61
- <label for="kmeans-beta" style="margin-left:10px;">Beta (Larger β forces clusters toward equal sizes.):</label>
62
- <input id="kmeans-beta" type="number" min="0" max="10" step="0.000001" value="0.000005" style="width:80px;">
63
- <label for="kmeans-type" style="margin-left:10px;">Clustering Type:</label>
64
- <select id="kmeans-type" style="width:180px;">
65
- <option value="balancedKMeans">Balanced K-Means</option>
66
- <option value="kmeans">K-Means (standard)</option>
67
- </select>
68
- <button id="kmeans-btn">Clustering</button>
69
- <button id="naming-btn">Generate Name</button>
70
- <button id="clusterplot-btn">Cluster Plot</button>
71
-
72
- <!-- Add this dropdown for search cluster sorting mode -->
73
- <div style="margin-bottom: 10px;">
74
- <label for="search-sort-mode">Search Cluster Sort Mode:</label>
75
- <select id="search-sort-mode">
76
  <option value="group">By Group Similarity</option>
77
  <option value="line">By Max Search Line</option>
78
- </select>
79
- </div>
80
-
81
- <button id="heatmap-btn">Similarity</button>
82
  <div id="progress-bar">
83
  <div id="progress-bar-inner"></div>
84
  </div>
 
46
  background: #4caf50;
47
  transition: width 0.2s;
48
  }
49
+
50
+ .control-group {
51
+ display: flex;
52
+ flex-wrap: wrap;
53
+ align-items: center;
54
+ gap: 10px;
55
+ margin-bottom: 10px;
56
+ }
57
+
58
+ .control-group label {
59
+ margin: 0;
60
+ }
61
+
62
+ .control-group input,
63
+ .control-group select {
64
+ margin-left: 5px;
65
+ }
66
  </style>
67
  </head>
68
 
 
73
  import { sentences } from './sentences.js';
74
  document.getElementById("input").value = sentences.join("\n");
75
  </script>
76
+ <div class="control-group">
77
+ <label for="kmeans-k">Clusters:</label>
78
+ <input id="kmeans-k" type="number" min="2" max="100" value="7" style="width:60px;">
79
+ <label for="kmeans-beta">Beta (Larger β forces clusters toward equal sizes.):</label>
80
+ <input id="kmeans-beta" type="number" min="0" max="10" step="0.000001" value="0.000005" style="width:80px;">
81
+ <label for="kmeans-type">Clustering Type:</label>
82
+ <select id="kmeans-type" style="width:180px;">
83
+ <option value="balancedKMeans">Balanced K-Means</option>
84
+ <option value="kmeans">K-Means (standard)</option>
85
+ </select>
86
+ <button id="kmeans-btn">Clustering</button>
87
+ <button id="naming-btn">Generate Name</button>
88
+ <button id="clusterplot-btn">Cluster Plot</button>
89
+ </div>
90
+ <label for="search-sort-mode">Search Cluster Sort Mode:</label>
91
+ <select id="search-sort-mode">
 
92
  <option value="group">By Group Similarity</option>
93
  <option value="line">By Max Search Line</option>
94
+ </select>
95
+ <button id="heatmap-btn">Similarity Search</button>
 
 
96
  <div id="progress-bar">
97
  <div id="progress-bar-inner"></div>
98
  </div>