-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
95 lines (90 loc) · 4.03 KB
/
index.html
File metadata and controls
95 lines (90 loc) · 4.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GWA Calculator</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<div class="container mt-5">
<!-- 语言选择器 -->
<div class="text-end mb-3">
<select id="languageSelector" class="form-select form-select-sm" style="width: auto; display: inline-block;">
<option value="en">English</option>
<option value="zh">中文</option>
<option value="es">Español</option>
</select>
</div>
<!-- 主标题 -->
<h1 class="text-center mb-4" data-i18n="title">GWA Calculator</h1>
<!-- 课程输入表单 -->
<div class="card mb-4">
<div class="card-body">
<form id="courseForm">
<div class="row g-3">
<div class="col-md-4">
<input type="text" class="form-control" id="courseName" data-i18n-placeholder="courseName" required>
</div>
<div class="col-md-3">
<input type="number" class="form-control" id="credits" min="0" step="0.5" data-i18n-placeholder="credits" required>
</div>
<div class="col-md-3">
<input type="number" class="form-control" id="grade" min="0" max="100" data-i18n-placeholder="grade" required>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-primary w-100" data-i18n="addCourse">Add</button>
</div>
</div>
</form>
</div>
</div>
<!-- 课程列表 -->
<div class="card mb-4">
<div class="card-header" data-i18n="courseList">Course List</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th data-i18n="courseNameHeader">Course Name</th>
<th data-i18n="creditsHeader">Credits</th>
<th data-i18n="gradeHeader">Grade</th>
<th data-i18n="actions">Actions</th>
</tr>
</thead>
<tbody id="courseList"></tbody>
</table>
</div>
</div>
</div>
<!-- GWA结果 -->
<div class="card">
<div class="card-header" data-i18n="results">Results</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<h3 class="mb-3" data-i18n="gwaResult">GWA Result</h3>
<h2 id="gwaValue" class="display-4 text-primary">-</h2>
</div>
<div class="col-md-6">
<h3 class="mb-3" data-i18n="calculation">Calculation</h3>
<pre id="calculationSteps" class="bg-light p-3 rounded"></pre>
</div>
</div>
</div>
</div>
</div>
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- i18next -->
<script src="https://cdn.jsdelivr.net/npm/i18next@21.6.10/dist/umd/i18next.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/i18next-http-backend@1.3.1/i18next-http-backend.min.js"></script>
<!-- 自定义脚本 -->
<script src="js/calculator.js"></script>
<script src="js/i18n.js"></script>
<script src="js/main.js"></script>
</body>
</html>