-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
164 lines (162 loc) · 6.94 KB
/
index.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
<!doctype html>
<html lang="ID">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CekIPK - Kalkulator Indeks Prestasi Kumulatif</title>
<meta name="description"
content="CekIPK adalah kalkulator sederhana untuk menghitung Indeks Prestasi Kumulatif (IPK) berbasis website. Dikembangkan dengan sistem perhitungan yang umum digunakan di Universitas Bunda Mulia.">
<meta name="keywords"
content="CekIPK, Kalkulator IPK, Indeks Prestasi Kumulatif, Universitas Bunda Mulia, ubm, hitung IPK, perhitungan IPK">
<meta name="robots" content="index, follow">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/js/all.min.js"></script>
<script src="js/app.js"></script>
</head>
<body class="bg-gray-100">
<nav class="bg-gray-800 text-white p-4">
<div class="container mx-auto flex justify-between items-center">
<a class="text-lg font-bold" href="#">CekIPK - Kalkulator IPK</a>
<ul class="flex space-x-4">
<li>
<a href="#" data-toggle="modal" data-target="#myModal" class="text-white">Tentang</a>
</li>
</ul>
</div>
</nav>
<div class="container mx-auto mt-8">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div>
<label for="nim" class="block text-gray-700">NIM</label>
<input type="text" id="nim" onkeyup="ValidNIM()" class="w-full p-2 border border-gray-300 rounded">
</div>
<div>
<label for="nama" class="block text-gray-700">Nama</label>
<input type="text" id="nama" class="w-full p-2 border border-gray-300 rounded">
</div>
</div>
<div class="overflow-x-auto mt-6">
<table id="nilai" class="min-w-full bg-white rounded-lg shadow-md">
<thead class="bg-gray-200">
<tr>
<th class="p-3 text-center">Mata kuliah</th>
<th class="p-3 text-center">SKS</th>
<th class="p-3 text-center">KT</th>
<th class="p-3 text-center">TM/Praktek</th>
<th class="p-3 text-center">UTS</th>
<th class="p-3 text-center">UAS</th>
<th class="p-3 text-center">Sistem Hitung</th>
<th class="p-3 text-center">Nilai</th>
<th class="p-3 text-center">Grade</th>
<th class="p-3 text-center">Aksi</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" class="matkul w-full p-2 border-b border-gray-300 rounded text-center">
</td>
<td><input type="tel" class="sks w-full p-2 border-b border-gray-300 rounded text-center"
value="" min="0" max="50"></td>
<td><input type="tel" class="kt w-full p-2 border-b border-gray-300 rounded text-center"
value="" min="0" max="50"></td>
<td><input type="tel" class="tugas w-full p-2 border-b border-gray-300 rounded text-center"
value="" min="0" max="100"></td>
<td><input type="tel" class="uts w-full p-2 border-b border-gray-300 rounded text-center"
value="" min="0" max="100"></td>
<td><input type="tel" class="uas w-full p-2 border-b border-gray-300 rounded text-center"
value="" min="0" max="100"></td>
<td>
<select class="sistem-hitung w-full p-2 border-b border-gray-300 rounded text-center">
<option value="1">TM/Prak 30%, UTS 30%, UAS 40%</option>
<option value="2">TM/Prak 50%, UTS 20%, UAS 30%</option>
<option value="3">KT 10%, TM/Prak 30%, UTS 30%, UAS 30%</option>
</select>
</td>
<td class="nilai p-2 text-center"></td>
<td class="grade p-2 text-center"></td>
<td class="text-center">
<button class="bg-red-500 text-white px-2 py-1 rounded tombolhapus">DELETE</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="flex justify-between items-center mt-6">
<div>
<button class="bg-blue-500 text-white px-4 py-2 rounded" onclick="tambahkan();">
<i class="fas fa-plus-circle mr-2"></i>Tambah Mata Kuliah
</button>
</div>
<div class="ml-4">
<button class="bg-blue-500 text-white px-4 py-2 rounded" onclick="hitungipk();">
<i class="fas fa-calculator mr-2"></i>Hitung
</button>
<button class="bg-yellow-500 text-white px-4 py-2 rounded ml-2" onclick="reset();">
<i class="fas fa-trash-alt mr-2"></i>Reset
</button>
</div>
</div>
<div class="mt-6">
<div class="progress h-2 bg-gray-200 rounded-full overflow-hidden" id="loading">
<div class="bar bg-blue-500 h-full" style="width: 0%;"></div>
</div>
<div id="result" class="bg-green-100 border border-green-400 text-green-700 p-4 rounded mt-4 hidden">
<h2 class="text-lg font-bold mb-2">Hasil Perhitungan:</h2>
<p>NIM: <span id="result_nim"></span></p>
<p>Nama: <span id="result_nama"></span></p>
<br>
<p>Dari total: <span id="result_matkul">0</span> Matakuliah dengan SKS sebanyak: <span
id="result_sks">0</span><br>Maka IPK anda Adalah: <span id="result_ipk">0</span></p>
<p><br>Pesan buat kamu:</p><br>
<p><span id="selamat">-</span></p>
</div>
</div>
</div>
<div id="myModal" class="modal fixed inset-0 bg-gray-800 bg-opacity-75 flex items-center justify-center hidden">
<div class="bg-white rounded-lg p-4 w-1/3">
<div class="flex justify-between items-center">
<h2 class="text-xl font-bold">CekIPK</h3>
<button type="button" class="text-gray-700" id="closeModal" aria-label="Close">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mt-4">
<h3 class="text-xl">Sebuah kalkulator sederhana berbasis website untuk menghitung Indeks Prestasi
Kumulatif [IPK]</h3><br>
<h3 class="text-xl">Di rancang untuk menghitung nilai dengan sistem penilaian di Universitas Bunda Mulia
</h3><br>
<h3 class="text-xl">Di Kembangkan oleh Wildy Sheverando</h3>
<h3 class="text-xl">Github: <a style="text-decoration: none"
href="https://github.com/shiwildy/CekIPK">https://github.com/shiwildy/CekIPK</a>
</h3><br>
<h3 class="text-xl">Program ini merupakan hasil pengembangan ulang dari<br><a
style="text-decoration: none"
href="https://github.com/januridp/kalkulator-ipk">https://github.com/januridp/kalkulator-ipk</a>
</h3><br>
<h3 class="text-xl">© The MIT License | <a style="color: rgb(69, 69, 249);"
href="https://github.com/shiwildy/CekIPK/blob/main/LICENSE">Baca lebih
lanjut....</a></h3>
</div>
<div class="mt-4 text-right">
<button class="bg-gray-500 text-white px-4 py-2 rounded" id="closeModal" aria-label="Close">
<i class="fas fa-power-off"></i> Tutup
</button>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('[data-toggle="modal"]').on('click', function (e) {
e.preventDefault();
$('#myModal').removeClass('hidden');
});
$('#myModal').on('click', '#closeModal', function () {
$('#myModal').addClass('hidden');
});
});
</script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</body>
</html>