-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
232 lines (210 loc) Β· 10.4 KB
/
Copy pathindex.html
File metadata and controls
232 lines (210 loc) Β· 10.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
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="TeamUp β Generator kelompok acak untuk tugas kuliah. Bagi mahasiswa ke dalam kelompok secara instan dengan animasi seru!" />
<title>TeamUp β Random Group Generator</title>
<link rel="stylesheet" href="style.css" />
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>π€</text></svg>" />
</head>
<body>
<!-- Confetti Canvas -->
<canvas id="confetti-canvas"></canvas>
<!-- Toast Notification -->
<div class="toast" id="toast">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
<polyline points="22 4 12 14.01 9 11.01"/>
</svg>
<span id="toast-message">Berhasil disalin!</span>
</div>
<!-- Animation Stage (fullscreen overlay) -->
<div class="animation-stage" id="animation-stage">
<h2 class="animation-stage__title" id="animation-title">π² Mengacak kelompok...</h2>
<div class="animation-stage__cards" id="animation-cards"></div>
</div>
<div class="app-container">
<!-- Header -->
<header class="header">
<div class="header__logo">
<div class="header__icon">π€</div>
<h1 class="header__title">TeamUp</h1>
</div>
<p class="header__tagline">Bagi kelompok tugas secara acak β cepat, adil, dan seru!</p>
</header>
<!-- Mode Toggle -->
<div class="mode-toggle" id="mode-toggle">
<button class="mode-toggle__btn active" data-mode="simple" id="mode-simple-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16">
<rect width="7" height="7" x="3" y="3" rx="1"/><rect width="7" height="7" x="14" y="3" rx="1"/>
<rect width="7" height="7" x="3" y="14" rx="1"/><rect width="7" height="7" x="14" y="14" rx="1"/>
</svg>
Simple
</button>
<button class="mode-toggle__btn" data-mode="custom" id="mode-custom-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="16" height="16">
<path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/>
<path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/>
</svg>
Custom Task
</button>
</div>
<!-- Input Section -->
<section class="input-section glass-card" id="input-section">
<!-- Custom Mode: Event Title -->
<div class="event-title-group" id="event-title-group" style="display:none;">
<label class="input-section__label-text" for="event-title">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M15.5 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V8.5L15.5 3Z"/>
<path d="M14 3v4a2 2 0 0 0 2 2h4"/>
</svg>
Nama Kegiatan
</label>
<input
type="text"
id="event-title"
class="event-title-input"
placeholder="Contoh: Kerja Bakti, Masak-Masak, Piket Harian..."
spellcheck="false"
/>
</div>
<!-- Custom Mode: Task Builder -->
<div class="task-builder" id="task-builder" style="display:none;">
<div class="task-builder__header">
<span class="input-section__label-text">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z"/>
<path d="M15 3v4a2 2 0 0 0 2 2h4"/>
<path d="M9 14v-1h6v1"/><path d="M12 14v4"/><path d="M9 18h6"/>
</svg>
Daftar Tugas
</span>
<span class="slot-counter" id="slot-counter">0 slot</span>
</div>
<div class="task-list" id="task-list">
<!-- Task items will be added dynamically -->
</div>
<button class="add-task-btn" id="add-task-btn" type="button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/>
<path d="M8 12h8"/><path d="M12 8v8"/>
</svg>
Tambah Tugas
</button>
</div>
<!-- Divider (custom mode) -->
<div class="section-divider" id="section-divider" style="display:none;">
<span>Daftar Nama</span>
</div>
<!-- Names Input (both modes) -->
<div class="input-section__label">
<span class="input-section__label-text" id="names-label">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>
<circle cx="9" cy="7" r="4"/>
<path d="M22 21v-2a4 4 0 0 0-3-3.87"/>
<path d="M16 3.13a4 4 0 0 1 0 7.75"/>
</svg>
Daftar Nama
</span>
<span class="name-counter" id="name-counter">0 nama</span>
</div>
<div class="textarea-wrapper">
<textarea
id="names-input"
class="names-textarea"
placeholder="Masukkan nama β format apa pun bisa! Per baris: Ahmad Budi Koma: Ahmad, Budi, Citra Nomor: 1. Ahmad 2. Budi Nempel: AhmadBudiCitraDewi"
spellcheck="false"
></textarea>
</div>
<!-- Import Banner (Auto-Detect Context) -->
<div class="import-banner" id="import-banner" style="display: none;">
<div class="import-banner__icon">β¨</div>
<div class="import-banner__content">
<div class="import-banner__title">Format Tugas Terdeteksi!</div>
<div class="import-banner__desc" id="import-banner-desc">Mendeteksi tugas dengan jumlah slot orang.</div>
</div>
<div class="import-banner__actions">
<button type="button" class="import-banner__btn-import" id="import-btn">Impor Tugas</button>
<button type="button" class="import-banner__btn-close" id="import-close-btn" title="Abaikan">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M18 6 6 18"/><path d="m6 6 12 12"/>
</svg>
</button>
</div>
</div>
<!-- Slot Match Indicator (custom mode) -->
<div class="slot-match" id="slot-match" style="display:none;">
<span class="slot-match__icon" id="slot-match-icon">β οΈ</span>
<span class="slot-match__text" id="slot-match-text">Jumlah nama harus sama dengan total slot tugas</span>
</div>
<!-- Controls Row (simple mode) -->
<div class="controls-row" id="simple-controls">
<div class="control-group">
<label class="control-group__label" for="group-size">Anggota per kelompok:</label>
<select class="group-size-select" id="group-size">
<option value="2">2 orang</option>
<option value="3" selected>3 orang</option>
<option value="4">4 orang</option>
<option value="5">5 orang</option>
<option value="6">6 orang</option>
<option value="7">7 orang</option>
</select>
</div>
<button class="shuffle-btn" id="shuffle-btn" disabled>
<span class="shuffle-btn__content">
<span>π²</span>
<span>Acak Kelompok!</span>
</span>
</button>
</div>
<!-- Controls Row (custom mode) -->
<div class="controls-row" id="custom-controls" style="display:none;">
<button class="shuffle-btn" id="shuffle-custom-btn" disabled>
<span class="shuffle-btn__content">
<span>π²</span>
<span>Acak Tugas!</span>
</span>
</button>
</div>
</section>
<!-- Results Section -->
<section class="results-section" id="results-section">
<div class="results-section__header">
<h2 class="results-section__title" id="results-title">
π Hasil Pembagian Kelompok
</h2>
<div class="results-section__actions">
<button class="action-btn" id="copy-btn" title="Salin ke clipboard">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/>
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>
</svg>
Salin
</button>
<button class="action-btn" id="download-btn" title="Download sebagai .txt">
<svg xmlns="http://www.w3.org/2000/svg" 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"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" x2="12" y1="15" y2="3"/>
</svg>
Download
</button>
<button class="action-btn" id="reshuffle-btn" title="Acak ulang">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
<path d="M3 3v5h5"/>
<path d="M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"/>
<path d="M16 16h5v5"/>
</svg>
Acak Ulang
</button>
</div>
</div>
<div class="groups-grid" id="groups-grid"></div>
</section>
</div>
<script src="app.js"></script>
</body>
</html>