1
0
Fork 0

Merge branch 'Kyfront' into 'master'

Kyfront

See merge request LETU/LETU!13
This commit is contained in:
Ethanell 2020-11-03 11:42:08 +01:00
commit 1e0896754d
21 changed files with 418 additions and 397 deletions

View file

@ -21,11 +21,11 @@ h2 {
border: none;
color: #0099ff;
background-color: transparent;
font-size: 20px;
font-size: 15px;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
margin-top: 15px;
cursor: pointer; }
.invisible {
@ -38,7 +38,7 @@ h2 {
.signinup form input {
color: #e0e0e0;
margin-bottom: 4vh;
font-size: 25px; }
font-size: 18px; }
.signinup form input[type="submit"] {
padding: 1vw;
border-radius: 2vw;
@ -48,7 +48,7 @@ h2 {
width: 40%;
display: block;
margin: auto;
font-size: 25px;
font-size: 18px;
border: 2px solid #2C3531;
cursor: pointer;
transition-duration: 0.3s; }
@ -72,7 +72,7 @@ i {
margin-left: 16vw; }
#navtop {
font-size: 30px; }
font-size: 22px; }
#navtop .maintitle {
font-size: 50px;
text-align: center;
@ -103,7 +103,7 @@ i {
color: black; }
#navprofile {
font-size: 25px;
font-size: 18px;
padding-top: 1vh;
padding-bottom: 1vh;
margin: 0;
@ -129,26 +129,30 @@ i {
#edtjour .edtflex {
display: flex;
flex-direction: column; }
#edtjour .edtflex div:first-child p {
margin: 22px; }
#edtjour .edtflex div:last-child {
border: none; }
#edtjour .edtflex div {
text-align: center;
font-size: 20px;
font-size: 15px;
background-color: #2a2a2a;
padding: 0 10px;
border-bottom: 2px solid #a1a1a1; }
#edtjour .edtflex div p {
margin: 10px; }
#edtjour .edtflex .edthead {
border: none;
font-size: 30px;
font-size: 22px;
background-color: #0099ff; }
#edtjour .edtflex .edtmidi {
height: 100px;
height: 10vh;
background-color: #1f1f1f; }
#filactu .actuflex {
background-color: #1f1f1f;
padding: 0;
height: 700px;
height: 70vh;
display: flex;
flex-direction: column; }
#filactu .actuflex div:last-child {
@ -156,14 +160,14 @@ i {
#filactu .actuflex .actucontent {
overflow-y: scroll;
padding: 0;
height: 700px;
height: 70vh;
cursor: auto; }
#filactu .actuflex .actucontent div:hover {
background-color: #686868; }
#filactu .actuflex div {
text-align: left;
cursor: pointer;
font-size: 20px;
font-size: 15px;
background-color: #2a2a2a;
padding: 0 10px;
border-bottom: 2px solid #a1a1a1; }
@ -173,36 +177,37 @@ i {
#filactu .actuflex .actuhead {
border: none;
cursor: auto;
font-size: 30px;
font-size: 22px;
background-color: #0099ff;
text-align: center; }
#filactu .actuflex .actuhead p {
padding: 30px; }
padding: 22px; }
#filactu .actuflex .actuhead:hover {
background-color: #0099ff; }
#welcome {
padding-bottom: 20px; }
padding-bottom: 25px;
font-size: 35px; }
h3 {
font-size: 30px;
font-size: 22px;
text-align: center; }
#edttable {
margin-top: 100px;
margin-top: 5vh;
border-collapse: collapse;
border: 1px solid white;
width: 90%;
margin-left: auto;
margin-right: auto; }
#edttable .midi td {
height: 109px; }
height: 10vh; }
#edttable th {
background-color: #0099ff;
text-align: center;
border-radius: 0;
border: 1px solid white;
font-size: 25px; }
font-size: 18px; }
#edttable tr td:first-child {
border-left: 1px solid white; }
#edttable tr td:last-child {
@ -211,11 +216,13 @@ h3 {
border-bottom: 1px solid white; }
#edttable td {
text-align: center;
font-size: 20px;
font-size: 15px;
background-color: #686868;
padding: 0;
border-radius: 0;
border: 1px solid black; }
#edttable td p {
margin: 10px; }
#edttable td:nth-child(even) {
background-color: #2a2a2a; }
@ -238,7 +245,7 @@ h3 {
border-collapse: collapse; }
#marks table tbody {
display: block;
height: 270px;
height: 194px;
overflow: auto; }
#marks table thead, #marks table tbody tr {
display: table;
@ -248,9 +255,9 @@ h3 {
border: 1px solid white;
background-color: #0099ff;
text-align: center;
font-size: 30px; }
font-size: 22px; }
#marks table td {
font-size: 25px;
font-size: 18px;
cursor: pointer;
padding: 0;
text-align: center;
@ -270,14 +277,14 @@ h3 {
border: 1px solid white; }
.marksdetails th {
text-align: center;
font-size: 25px;
font-size: 18px;
border: 1px solid white;
background-color: #0099ff; }
.marksdetails td {
text-align: center;
background-color: #2a2a2a;
border: none;
font-size: 25px; }
font-size: 18px; }
.marksdetails tr:last-child td {
border-bottom: 1px solid white; }
@ -288,13 +295,12 @@ div#visible + div {
filter: blur(4px) grayscale(80%); }
.marksgroup {
display: none;
margin-top: 300px; }
.marksgroup h3 {
background-color: #0099ff;
margin: 0;
padding: 20px;
font-size: 30px; }
padding: 15px;
font-size: 22px; }
#flexgroup {
display: flex;
@ -305,8 +311,8 @@ div#visible + div {
#flexgroup p {
background-color: #686868;
cursor: pointer;
padding: 20px;
font-size: 25px; }
padding: 15px;
font-size: 18px; }
#markstable {
width: 95%;
@ -327,9 +333,9 @@ div#visible + div {
background-color: #0099ff;
border: 2px solid white;
text-align: center;
font-size: 30px; }
font-size: 22px; }
#markstable th input {
font-size: 30px;
font-size: 22px;
border: none;
color: white;
text-align: center; }
@ -339,10 +345,10 @@ div#visible + div {
background-color: #2a2a2a; }
#markstable td {
text-align: center;
font-size: 25px;
font-size: 18px;
border: 1px solid #e0e0e0; }
#markstable td input {
font-size: 25px;
font-size: 18px;
border: none;
color: white;
text-align: center; }
@ -356,7 +362,7 @@ div#visible + div {
border: none;
margin-left: auto;
margin-right: auto;
font-size: 30px;
font-size: 22px;
padding: 15px;
cursor: pointer;
margin-bottom: 50px; }

File diff suppressed because one or more lines are too long

View file

@ -31,11 +31,11 @@ h2
border: none;
color: $secondary;
background-color: transparent;
font-size: 20px;
font-size: 15px;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
margin-top: 15px;
cursor: pointer;
.invisible
@ -49,7 +49,7 @@ h2
input
color: $light;
margin-bottom: 4vh;
font-size: 25px;
font-size: 18px;
input[type="submit"]
padding: 1vw;
border-radius: 2vw;
@ -59,7 +59,7 @@ h2
width: 40%;
display: block;
margin: auto;
font-size: 25px;
font-size: 18px;
border: 2px solid #2C3531;
cursor: pointer;
transition-duration: 0.3s
@ -83,7 +83,7 @@ i
margin-left: 16vw;
#navtop
font-size: 30px;
font-size: 22px;
.maintitle
font-size: 50px;
text-align: center;
@ -115,7 +115,7 @@ i
color: black;
#navprofile
font-size: 25px;
font-size: 18px;
padding-top: 1vh;
padding-bottom: 1vh;
margin: 0;
@ -142,27 +142,32 @@ i
.edtflex
display: flex;
flex-direction: column;
div:first-child
p
margin: 22px;
div:last-child
border: none;
div
text-align: center;
font-size: 20px;
font-size: 15px;
background-color: $dark2;
padding: 0 10px;
border-bottom: 2px solid $light3;
p
margin: 10px;
.edthead
border: none;
font-size: 30px;
font-size: 22px;
background-color: $secondary;
.edtmidi
height: 100px;
height: 10vh;
background-color: $dark3;
#filactu
.actuflex
background-color: $dark3;
padding: 0;
height: 700px;
height: 70vh;
display: flex;
flex-direction: column;
div:last-child
@ -170,14 +175,14 @@ i
.actucontent
overflow-y: scroll;
padding: 0;
height: 700px;
height: 70vh;
cursor: auto;
div:hover
background-color: $medium;
div
text-align: left;
cursor: pointer;
font-size: 20px;
font-size: 15px;
background-color: $dark2;
padding: 0 10px;
border-bottom: 2px solid $light3;
@ -187,23 +192,24 @@ i
.actuhead
border: none;
cursor: auto;
font-size: 30px;
font-size: 22px;
background-color: $secondary;
text-align: center;
p
padding: 30px;
padding: 22px;
.actuhead:hover
background-color: $secondary;
#welcome
padding-bottom: 20px;
padding-bottom: 25px;
font-size: 35px;
h3
font-size: 30px;
font-size: 22px;
text-align: center;
#edttable
margin-top: 100px;
margin-top: 5vh;
border-collapse: collapse;
border: 1px solid white;
width: 90%;
@ -211,13 +217,13 @@ h3
margin-right: auto;
.midi
td
height: 109px;
height: 10vh;
th
background-color: $secondary;
text-align: center;
border-radius: 0;
border: 1px solid white;
font-size: 25px;
font-size: 18px;
tr
td:first-child
border-left: 1px solid white;
@ -228,11 +234,13 @@ h3
border-bottom: 1px solid white;
td
text-align: center;
font-size: 20px;
font-size: 15px;
background-color: $medium;
padding: 0;
border-radius: 0;
border: 1px solid black;
p
margin: 10px;
td:nth-child(even)
background-color: $dark2;
@ -256,7 +264,7 @@ h3
border-collapse: collapse;
tbody
display: block;
height: 270px;
height: 194px;
overflow: auto;
thead, tbody tr
display: table;
@ -266,9 +274,9 @@ h3
border: 1px solid white;
background-color: $secondary;
text-align: center;
font-size: 30px;
font-size: 22px;
td
font-size: 25px;
font-size: 18px;
cursor: pointer;
padding: 0;
text-align: center;
@ -288,14 +296,14 @@ h3
border: 1px solid white;
th
text-align: center;
font-size: 25px;
font-size: 18px;
border: 1px solid white;
background-color: $secondary;
td
text-align: center;
background-color: $dark2;
border: none;
font-size: 25px;
font-size: 18px;
tr:last-child
td
border-bottom: 1px solid white;
@ -307,13 +315,12 @@ div#visible + div
filter: blur(4px) grayscale(80%);
.marksgroup
display: none;
margin-top: 300px;
h3
background-color: $secondary;
margin: 0;
padding: 20px;
font-size: 30px;
padding: 15px;
font-size: 22px;
#flexgroup
display: flex;
@ -324,8 +331,8 @@ div#visible + div
p
background-color: $medium;
cursor: pointer;
padding: 20px;
font-size: 25px;
padding: 15px;
font-size: 18px;
#markstable
width: 95%;
@ -346,9 +353,9 @@ div#visible + div
background-color: $secondary;
border: 2px solid white;
text-align: center;
font-size: 30px;
font-size: 22px;
input
font-size: 30px;
font-size: 22px;
border: none;
color: white;
text-align: center;
@ -360,10 +367,10 @@ div#visible + div
background-color: $dark2;
td
text-align: center;
font-size: 25px;
font-size: 18px;
border: 1px solid $light;
input
font-size: 25px;
font-size: 18px;
border: none;
color: white;
text-align: center;
@ -377,7 +384,7 @@ div#visible + div
border: none;
margin-left: auto;
margin-right: auto;
font-size: 30px;
font-size: 22px;
padding: 15px;
cursor: pointer;
margin-bottom: 50px;

View file

@ -2,7 +2,7 @@ let express = require("express");
let router = express.Router();
router.get("/", (req, res) => {
res.render("edt", { title: "L'ETU" });
res.render("pages/edt", { title: "L'ETU" });
});
module.exports = router;

View file

@ -3,7 +3,7 @@ let router = express.Router();
/* GET home page. */
router.get("/", (req, res) => {
res.render("home", { title: "L'ETU" });
res.render("pages/home", { title: "L'ETU" });
});
module.exports = router;

View file

@ -3,7 +3,7 @@ let router = express.Router();
const sessionCheck = require("./utils/sessionCheck");
router.get("/", sessionCheck(1), (req, res) => {
res.render("index", { title: "L'ETU" });
res.render("pages/home", { title: "L'ETU" });
});
module.exports = router;

View file

@ -3,7 +3,7 @@ let router = express.Router();
const sessionCheck = require("./utils/sessionCheck");
router.get("/",sessionCheck(-1), (req, res) => {
res.render("login", { title: "L'ETU" });
res.render("pages/login", { title: "L'ETU" });
});
module.exports = router;

View file

@ -2,7 +2,7 @@ let express = require("express");
let router = express.Router();
router.get("/", (req, res) => {
res.render("marks", { title: "L'ETU" });
res.render("pages/marks", { title: "L'ETU" });
});
module.exports = router;

View file

@ -2,7 +2,7 @@ let express = require("express");
let router = express.Router();
router.get("/", (req, res) => {
res.render("register", { title: "L'ETU" });
res.render("pages/register", { title: "L'ETU" });
});
module.exports = router;

View file

@ -3,7 +3,7 @@ let error = require("./error");
function sessionCheck(permission) {
return (req, res, next) => {
if (permission === -1 && req.session.user) {
res.redirect(req.session.lastUrl);
res.redirect("/");
} else if (permission !== -1 && !req.session.user) {
req.session.lastUrl = req.originalUrl;
req.session.save(() => res.redirect("/login"));

View file

@ -1,84 +0,0 @@
table(id="edttable")
tr
th Monday
th Tuesday
th Wednesday
th Thursday
th Friday
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
tr(class="midi")
td
td
td
td
td
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
div(class="row" id="edtweek")
div(class="col s3 offset-s1")
i(class="large material-icons") fast_rewind
div(class="col s4")
h3 Week of the 02/11/2020
div(class="col s3")
i(class="large material-icons") fast_forward

View file

@ -1,40 +0,0 @@
extends layout
block content
h1(id="welcome") Welcome Back Benoit !
div(class="row home")
if admin === false
div(class="col s12 m6" id="filactu")
div(class="col s10 offset-s1 actuflex")
div(class="actuhead")
p Fil d'actualité
div(class="actucontent")
div
p Nouvelle note :
p 18/20 Anglais
div
p Maths
p S26
div
p Maths
p S26
div
p Maths
p S26
div(class="col s12 m6" id="edtjour")
div(class="col s10 offset-s1 edtflex")
div(class="edthead")
p EDT du jour
div
p Maths
p S26
div
p Maths
p S26
div(class="edtmidi")
div
p Maths
p S26
div
p Maths
p S26

View file

@ -1,185 +0,0 @@
if student === true
div(class="marksdetails" id="visibl")
table
tr
th(colspan="2") Details
tr
td DS 1
tr
td Rang : 10/29
tr
td Coeff : 1.5
tr
td Moyenne de classe : 12
div(class="row" id="marks")
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") Maths
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") TP SE
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") PHP
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") Anglais
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
if teacher === true
div(class="row")
div(class="col s12 m10 offset-m1 marksgroup")
h3 Selectionnez un groupe
div(id="flexgroup")
p G1S1
p G2S2
p G3S3
form
table(id="markstable")
thead
tr
th Noms
th
input(type="text" value="DS1")
th
input(type="text" placeholder="Ajouter une note")
tbody
tr
td Test
td
input(type="number" value="16")
td
input(type="number")
tr
td Keze
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
input(id="marksubmit" type="submit" value="Enregistrer")

87
views/pages/edt.pug Normal file
View file

@ -0,0 +1,87 @@
extends ../template/navbar
block content
table(id="edttable")
tr
th Monday
th Tuesday
th Wednesday
th Thursday
th Friday
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
tr(class="midi")
td
td
td
td
td
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
tr
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
td
p Maths
p S26
div(class="row" id="edtweek")
div(class="col s3 offset-s1")
i(class="large material-icons") fast_rewind
div(class="col s4")
h3 Week of the 02/11/2020
div(class="col s3")
i(class="large material-icons") fast_forward

40
views/pages/home.pug Normal file
View file

@ -0,0 +1,40 @@
extends ../template/navbar
block content
h1(id="welcome") Welcome Back Benoit !
div(class="row home")
if admin === false
div(class="col s12 m6" id="filactu")
div(class="col s10 offset-s1 actuflex")
div(class="actuhead")
p Fil d'actualité
div(class="actucontent")
div
p Nouvelle note :
p 18/20 Anglais
div
p Maths
p S26
div
p Maths
p S26
div
p Maths
p S26
div(class="col s12 m6" id="edtjour")
div(class="col s10 offset-s1 edtflex")
div(class="edthead")
p EDT du jour
div
p Maths
p S26
div
p Maths
p S26
div(class="edtmidi")
div
p Maths
p S26
div
p Maths
p S26

View file

@ -37,5 +37,4 @@ html
input(type='submit' value='Send email')
script(src="/javascripts/login.js")
script(src="/javascripts/register.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js")

188
views/pages/marks.pug Normal file
View file

@ -0,0 +1,188 @@
extends ../template/navbar
block content
if student === true
div(class="marksdetails" id="visibl")
table
tr
th(colspan="2") Details
tr
td DS 1
tr
td Rang : 10/29
tr
td Coeff : 1.5
tr
td Moyenne de classe : 12
div(class="row" id="marks")
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") Maths
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") TP SE
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") PHP
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
div(class="col s12 m6 l4")
table
thead
tr
th(colspan="2") Anglais
tbody
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
tr
td
p DS 1
p 18/20
td
p DS 2
p 16/20
if teacher === true
div(class="row")
div(class="col s12 m10 offset-m1 marksgroup")
h3 Selectionnez un groupe
div(id="flexgroup")
p G1S1
p G2S2
p G3S3
form
table(id="markstable")
thead
tr
th Noms
th
input(type="text" value="DS1")
th
input(type="text" placeholder="Ajouter une note")
tbody
tr
td Test
td
input(type="number" value="16")
td
input(type="number")
tr
td Keze
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
tr
td Kezel
td
input(type="number" value="16")
td
input(type="number")
input(id="marksubmit" type="submit" value="Enregistrer")

View file

@ -32,3 +32,6 @@ html
input(type='submit' value='Register')
button(class="alreadyregister") Already registered ?
script(src="/javascripts/register.js")
script(src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js")

View file

@ -18,12 +18,12 @@ block navbar
div(id="navtop")
ul
if student === true
li
a Home
li(class="active")
a Planning
a(href="/") Home
li
a Marks
a(href="/edt") Planning
li
a(href="/marks") Marks
li
a(href="https://mail.univ-lyon1.fr/owa/") Mail
li
@ -31,12 +31,12 @@ block navbar
li
a School and student life
if teacher === true
li
a Home
li(class="active")
a Planning
a(href="/") Home
li
a Marks
a(href="/edt") Planning
li
a(href="/marks") Marks
li
a(href="https://mail.univ-lyon1.fr/owa/") Mail
li