Update aesthetic and add favicon

This commit is contained in:
Aaron Lee 2021-09-18 19:26:06 +08:00
parent 687f8e81c2
commit 47ce23ca18
7 changed files with 142 additions and 53 deletions

View file

@ -2,6 +2,19 @@ div.col .row .col {
border: 1px solid black;
}
div.form-group .center {
position: relative;
height: 40px;
}
div.form-group .center label {
position: absolute;
top: 50%;
width: 100%;
transform: translate(-50%, -50%);
margin: 0;
}
div.signatures {
margin-top: 30px;
}
@ -95,4 +108,14 @@ input[type="checkbox"].late:checked:after {
-moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.logout {
width: 40%;
margin-bottom: 10px;
margin-left: 30%;
}
button.logout {
margin-left: 0 !important;
}

BIN
static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

View file

@ -5,19 +5,29 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Admin_View</title>
<title>Admin 管理員</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" href="/static/allpages.css">
<link rel="stylesheet" href="/static/homeroom.css">
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-H6D61RSBHR');
</script>
</head>
<body>
<div class="container">
<h1>Admin_View</h1>
<h2>{{homeroomCode[0]}}: {{homeroomCode[1]}}</h2>
<h2>Status: ({{currDate}}, 星期{{absData[currDate]['dow']}})</h2>
<a href="/logout"><button class="btn btn-primary">Logout 登出</button></a>
<h1 class="margin-top">Admin View | 管理頁面</h1>
<h2 class="margin-top">{{homeroomCode[0]}} {{homeroomCode[1]}}</h2>
<h2>[{{currDate}}]</h2>
<a href="/logout"><button class="btn btn-primary logout margin-top">Logout 登出</button></a>
<div class="container margin-bottom">
<form action="/manage/admin" id="adminSelForm" method="post">
<div class="row">
@ -46,7 +56,7 @@
</select>
</div>
<div class="col-1">
<button class="btn btn-primary" onclick="loadingAnimation()">查詢</button>
<button type="button" class="btn btn-primary" onclick="loadingAnimation()">查詢</button>
</div>
</div>
</form>
@ -168,22 +178,22 @@
{% if showUpload == '1' %}
<div class="row margin-top">
<div class="col">
<h3>此排請勿點選</h3>
<h3 style="color: red;">此排 [請勿] 隨意點選</h3>
</div>
<div class="col">
<a href="/upload/homeroom"><button class="btn btn-primary">1. Add Homeroom</button></a>
<a href="/upload/1"><button class="btn btn-danger">1. Add Homeroom</button></a>
</div>
<div class="col">
<a href="/upload/gp_classes"><button class="btn btn-primary">2. Add GP Classes</button></a>
<a href="/upload/2"><button class="btn btn-danger">2. Add GP Classes</button></a>
</div>
<div class="col">
<a href="/upload/stud_in_group"><button class="btn btn-primary">3. Add GP Student List</button></a>
<a href="/upload/3"><button class="btn btn-danger">3. Add GP Student List</button></a>
</div>
<div class="col">
<a href="/upload/period_list"><button class="btn btn-primary">4. Period List</button></a>
<a href="/upload/4"><button class="btn btn-danger">4. Period List</button></a>
</div>
<div class="col">
<a href="/upload/dates"><button class="btn btn-primary">[WEEKLY] Dates</button></a>
<a href="/upload/dates"><button class="btn btn-warning">[WEEKLY] Dates</button></a>
</div>
</div>
{% endif %}
@ -212,6 +222,11 @@
{% endfor %}
console.log(homerooms)
function loadingAnimation() {
if ($("#sel-room").val() == "") {
alert("請選擇年級 / 班級!");
return;
}
document.getElementById('adminSelForm').submit();
$('.container').hide();
$('#loading').show();
}

View file

@ -5,21 +5,31 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Group_Teach_View</title>
<title>Group 分組</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" href="/static/allpages.css">
<link rel="stylesheet" href="/static/login.css">
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-H6D61RSBHR');
</script>
</head>
<body>
<div class="container">
<h1>Group_Teach_View</h1>
<h2>{{cclass['category']}}: {{cclass['class_id']}}: {{cclass['name']}}</h2>
<h2>({{currDate}}) ({{dow}})</h2>
<a href="/logout"><button class="btn btn-primary">Logout 登出</button></a>
<h1 class="margin-top">Group Class View | 分組課頁面</h1>
<h2 class="margin-top">{{cclass['category']}}: {{cclass['class_id']}}: {{cclass['name']}}</h2>
<h2>[{{currDate}}]</h2>
<a href="/logout"><button class="btn btn-primary margin-top logout">Logout 登出</button></a>
<form action="/manage/date" id="dateSelForm" method="post">
<select name="date" id="date" class="form-select" onchange="chgDate(this);">
<select name="date" id="date" class="form-select logout" onchange="chgDate(this);">
{% for date in tmpAbsData %}
{% if date == currDate %}
<option value="{{date}}" selected="selected">{{date}}</option>
@ -35,7 +45,7 @@
<input type="hidden" name="date" value="{{currDate}}">
<input type="hidden" name="period" value="{{i}}">
<input type="hidden" class="signatureData" name="signatureData" value="">
<div class="col">
<div class="col" style="margin-top: 30px;">
<div class="row title sticky-top" style="background-color: white">
<div class="col">Grade</div>
<div class="col">Class Code</div>

View file

@ -5,21 +5,32 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Attendance | Homeroom</title>
<title>Homeroom 班級 {{homeroomCode[0]}}{{homeroomCode[1]}})</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" href="/static/allpages.css">
<link rel="stylesheet" href="/static/homeroom.css">
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-H6D61RSBHR');
</script>
</head>
<body>
<div class="container">
<h1>Attendance | Homeroom</h1>
<h2>{{homeroomCode[0]}}: {{homeroomCode[1]}}</h2>
<h2>{{currDate}}, 依照 星期{{absData[currDate]['dow']}} 課表</h2>
<a href="/logout"><button class="btn btn-primary">Logout 登出</button></a>
<h1 class="margin-top">Homeroom View | 班級主頁</h1>
<h2 class="margin-top">{{homeroomCode[0]}}{{homeroomCode[1]}}</h2>
<h2>[{{currDate}}]</h2>
<a href="/logout"><button class="btn btn-primary logout margin-top">Logout 登出</button></a>
<form action="/manage/date" id="dateSelForm" method="post">
<select name="date" id="date" class="form-select" onchange="chgDate();">
<select name="date" id="date" class="form-select logout" onchange="chgDate();">
{% for date in absData %}
{% if date == currDate %}
<option value="{{date}}" selected="selected">{{date}}</option>
@ -37,10 +48,10 @@
<div class="col">
<div class="sticky-top" style="background-color:white;">
<div class="row title">
<div class="col">HR</div>
<div class="col">Number</div>
<div class="col">Name</div>
<div class="col">Eng Name</div>
<div class="col">班級</div>
<div class="col">座號</div>
<div class="col">姓名</div>
<div class="col">英文姓名</div>
{% for i in periods %}
<div class="col" {% if currPeriod==i %} style="background-color: #ffdf81;" {% endif %}>{{i}}</div>
{% endfor %}

View file

@ -4,37 +4,54 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Login</title>
<title>Login | 登入</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" href="/static/allpages.css">
<link rel="stylesheet" href="/static/login.css">
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-H6D61RSBHR');
</script>
</head>
<body>
<!-- login form center -->
<div class="container">
<h1 class="margin-top margin-bottom">Attendance 點名系統 (β) | Login 登入</h1>
<div class="row">
<div class="col-md-4 offset-md-4">
<h1 class="text-center">Attendance (β) | Login</h1>
<div class="col"></div>
<div class="col-md-5">
<form action="/" method="post">
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" name="username" id="username" placeholder="Username">
<div class="form-group row" style="margin-bottom: 10px;">
<div class="col-3 center"><label for="username" style="font-size: 19px">Username 帳號: </label>
</div>
<div class="col-9 center-input"><input type="text" class="form-control" name="username"
id="username"></div>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" name="password" id="password"
placeholder="Password">
<div class="form-group row" style="margin-bottom: 10px;">
<div class="col-3 center"><label for="password" style="font-size: 19px">Password 密碼: </label>
</div>
<div class="col-9 center-input"><input type="password" class="form-control" name="password"
id="password"></div>
</div>
<button type="submit" class="btn btn-primary btn-block" onclick="loadingAnimation()">Login</button>
<button type="submit" class="btn btn-primary btn-block" onclick="loadingAnimation()">Login
登入</button>
</form>
{% if error %}
<div class="alert alert-danger" role="alert">
帳號或密碼錯誤,請重新輸入<br>
Incorrect username or password
</div>
{% endif %}
</div>
<div class="col"></div>
</div>
</div>
<div id="loading" style="text-align:center; width:100%; display:none;"><img src="/static/loading.gif" alt=""

View file

@ -9,30 +9,42 @@
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" href="/static/allpages.css">
<link rel="stylesheet" href="/static/login.css">
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-H6D61RSBHR');
</script>
</head>
<body>
<!-- csv form center -->
<div class="container">
<div class="row">
<div class="col-md-4 offset-md-4">
<h1 class="text-center">Upload {{title}}</h1>
<div class="col"></div>
<div class="col-md-5">
<h1 class="text-center margin-top">Upload {{title}}</h1>
<!-- upload csv -->
<form action="{{url}}" id="uploadCsvForm" method="post" enctype="multipart/form-data">
<!-- input class code -->
<div class="form-group">
<label for="gradeCode">Grade Code</label>
<input type="text" class="form-control" id="gradeCode" name="gradeCode"
placeholder="Enter Grade Code">
<div class="form-group margin-top row">
<div class="col-3 center"><label for="gradeCode">Grade Code</label></div>
<div class="col center-input"> <input type="text" class="form-control" id="gradeCode"
name="gradeCode" placeholder="Enter Grade Code"></div>
</div>
<div class="form-group">
<label for="classcode">Class Code</label>
<input type="text" class="form-control" id="classcode" name="classcode"
placeholder="Enter Class Code">
<div class="form-group margin-top row">
<div class="col-3 center"><label for="classcode">Class Code</label></div>
<div class="col-9 center-input"><input type="text" class="form-control" id="classcode"
name="classcode" placeholder="Enter Class Code"></div>
</div>
<div class="form-group">
<label for="csv">{{title}}</label>
<input type="file" class="form-control-file" id="csv" name="csv">
<div class="form-group margin-top row">
<div class="col-3 center"><label for="csv">{{title}}</label></div>
<div class="col-9 center-input"><input type="file" class="form-control-file" id="csv"
name="csv"></div>
</div>
<button onclick="loadingAnimation()" type="button" class="btn btn-primary">Upload</button>
</form>
@ -44,6 +56,7 @@
<p>非管理員請勿點選! 可能會讓系統無法使用!</p>
</div>
</div>
<div class="col"></div>
</div>
</div>
<div id="loading" style="text-align:center; width:100%; display:none;"><img src="/static/loading.gif" alt=""