-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdashboard.html
163 lines (149 loc) · 8.06 KB
/
dashboard.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>iTechX | Dash Board</title>
<link rel="stylesheet" href="layui/css/layui.css">
<link rel="stylesheet" href="layui/css/style.css?v=1">
<style type="text/css">
.activate {
border: 2px solid #ebe09f;
border-radius: 12px;
background: #5c5d34;
box-shadow: .5px .5px 10px 2px rgba(251, 255, 0, 0.3);
margin-bottom: 1em;
}
</style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<ul class="layui-nav" lay-filter="">
<a class="logo" href="">
<img src="image/iTechX.png" height="30px" style="position: relative; bottom: -15px; float: left; margin-right: 2%;" alt="iTechX">
</a>
<li class="layui-nav-item layui-layout-right" style="position: relative; margin-right: 16em;"><a href="https://i-techx.github.io/iTechX">新版升级<span class="layui-badge-dot"></span></a></li>
<li class="layui-nav-item layui-layout-right layui-this" style="position: relative; margin-right: 8em;"><a href="">课程面板</a></li>
<li class="layui-nav-item layui-layout-right" style="position: relative; margin-right: 2em;"><a href="help.html">帮助</a></li>
</ul>
</div>
</div>
<div class="layui-fluid" style="margin: 2em 20px;">
<div class="layui-tab-content" style="height: auto;">
<h1 style="font-family: Quicksand; font-weight: bold; font-size: 2.5em;">Dash Board 课程面板</h1>
<hr>
<div class="layui-row">
<div class="layui-col-sm9" id="course-cards">
</div>
<div class="layui-col-sm3">
</div>
</div>
<div class="layui-footer" style="margin-top: 2em;">
<!-- 底部固定区域 -->
<p style="display:flex; justify-content: center;">© 2020-2021 iTechX - MIT license.</p>
</div>
</div>
</div>
<script src="layui/layui.js"></script>
<script>
layui.use(['layer', 'element'], function(){
var layer = layui.layer
,element = layui.element;
var info = [
{
"code": "CS100",
"name": "Introduction to Programming",
"url": "CS100/index.html",
"cover": "image/CS100_cover.jpg",
"semester": "Fall 2019, Fall 2018"
},{
"code": "CS101",
"name": "Algorithms and Data Structures",
"url": "CS101/index.html",
"cover": "image/CS101_cover.png",
"semester": "Fall 2019, Fall 2018"
},{
"code": "CS120",
"name": "Computer Networks",
"url": "CS120/index.html",
"cover": "image/CS120_cover.jpg",
"semester": "Fall 2020, Fall 2019"
},{
"code": "CS132",
"name": "Software Engineering",
"url": "CS132/index.html",
"cover": "image/CS132_cover.png",
"semester": "Spring 2020, Spring 2019"
// },{
// "code": "CS152",
// "name": "Applied Cryptography",
// "url": "CS152/index.html",
// "cover": "image/CS152_cover.png",
// "semester": "Fall 2020"
},{
"code": "CS172",
"name": "Computer Vision I",
"url": "CS172/index.html",
"cover": "image/CS172_cover.jpg",
"semester": "Fall 2020, Fall 2019"
},{
"code": "CS181",
"name": "Artificial Intelligence I",
"url": "CS181/index.html",
"cover": "image/CS181_cover.jpg",
"semester": "Fall 2020, Fall 2019, Fall 2018"
// },{
// "code": "SI120",
// "name": "Discrete Mathematics",
// "url": "SI120/index.html",
// "cover": "image/SI120_cover.jpg",
// "semester": "Spring 2021, Spring 2020, Spring 2019, Spring 2018, Spring 2017"
},{
"code": "SI140-01",
"name": "Probability and Mathematical Statistics",
"url": "SI140-01/index.html",
"cover": "image/SI140-01_cover.jpg",
"semester": "Fall 2019"
},{
"code": "EE115",
"name": "Analog and Digital Circuits",
"url": "EE115/index.html",
"cover": "image/EE115_cover.jpg",
"semester": "Fall 2020"
},{
"code": "EE150",
"name": "Signals and Systems",
"url": "EE150/index.html",
"cover": "image/EE150_cover.jpeg",
"semester": "Spring 2020, Spring 2018, Spring 2017, Spring 2016"
}
]
info.forEach(elem => {
if (elem.hasOwnProperty("status") && elem.status == "activate") {
document.getElementById('course-cards').innerHTML += '<div class="activate"><div class="layui-card" style="border-radius: 10px;"><div class="layui-card-body"><div class="layui-row"><div class="layui-col-md3"><a href="'+ elem.url +'"><img class="shadow" src="'+ elem.cover +'"style="width:100%;"></a></div><div class="layui-col-md9"><div style="margin: 5px 1em;"><div style="font-family: Quicksand; font-weight: bold; text-align: left; font-size: 2em;"><a href="'+ elem.url +'">'+ elem.name +'</a></div><div class="layui-row"><div class="layui-col-md9"><p style="padding-top: 1%; text-align: left; font-family: Quicksand; font-weight: bold; font-size: 1.2em; margin-bottom: 0.2em; color:#8FBC8F;">ACTIVATE</p></div></div><div class="layui-row"><div class="layui-col-md9"><p style="padding-top: 7%; text-align: left; font-size: 1.2em; margin-bottom: 0.2em;">'+ elem.code +'</p><p style="text-align: left; font-size: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">'+ elem.semester +'</p></div><div class="layui-col-md3" style="padding-top: 5%; text-align: center;"><a href="'+ elem.url +'" class="layui-btn layui-btn-lg layui-btn-violet" style="font-weight: normal;">查看课程</a></div></div></div></div></div></div></div></div>';
} else {
document.getElementById('course-cards').innerHTML += '<div class="layui-card" style="border-radius: 10px;"><div class="layui-card-body"><div class="layui-row"><div class="layui-col-md3"><a href="'+ elem.url +'"><img class="shadow" src="'+ elem.cover +'"style="width:100%;"></a></div><div class="layui-col-md9"><div style="margin: 5px 1em;"><div style="font-family: Quicksand; font-weight: bold; text-align: left; font-size: 2em;"><a href="'+ elem.url +'">'+ elem.name +'</a></div><div class="layui-row"><div class="layui-col-md9"><p style="padding-top: 14%; text-align: left; font-size: 1.2em; margin-bottom: 0.2em;">'+ elem.code +'</p><p style="text-align: left; font-size: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">'+ elem.semester +'</p></div><div class="layui-col-md3" style="padding-top: 12%; text-align: center;"><a href="'+ elem.url +'" class="layui-btn layui-btn-lg layui-btn-violet" style="font-weight: normal;">查看课程</a></div></div></div></div></div></div></div>';
}
});
});
</script>
<!-- Default Statcounter code for iTechX
http://i-techx.github.io -->
<script type="text/javascript">
var sc_project=12677699;
var sc_invisible=1;
var sc_security="383d59f5";
</script>
<script type="text/javascript"
src="https://www.statcounter.com/counter/counter.js"
async></script>
<noscript><div class="statcounter"><a title="Web Analytics
Made Easy - Statcounter" href="https://statcounter.com/"
target="_blank"><img class="statcounter"
src="https://c.statcounter.com/12677699/0/383d59f5/1/"
alt="Web Analytics Made Easy - Statcounter"
referrerPolicy="no-referrer-when-downgrade"></a></div></noscript>
<!-- End of Statcounter Code -->
</body>
</html>