1
0
Fork 0

Merge branch 'master' into 'back'

# Conflicts:
#   app.js
This commit is contained in:
Ethanell 2020-11-02 13:47:18 +01:00
commit 1d42410af1
13 changed files with 1023 additions and 18 deletions

6
app.js
View file

@ -9,6 +9,9 @@ let config = process.env.NODE_ENV === "test" ? {} : require("./config/config.jso
let indexRouter = require("./routes/index"); let indexRouter = require("./routes/index");
const loginRouter = require("./routes/login"); const loginRouter = require("./routes/login");
const edtRouter = require("./routes/edt");
const homeRouter = require("./routes/home");
const marksRouter = require("./routes/marks");
let app = express(); let app = express();
const sessionMiddleware = session({ const sessionMiddleware = session({
@ -41,6 +44,9 @@ app.use((req, res, next) => {
app.use("/", indexRouter); app.use("/", indexRouter);
app.use("/login", loginRouter); app.use("/login", loginRouter);
app.use("/email", require("./routes/email")); app.use("/email", require("./routes/email"));
app.use("/edt", edtRouter);
app.use("/home", homeRouter);
app.use("/marks", marksRouter);
// catch 404 and forward to error handler // catch 404 and forward to error handler
app.use((req, res) => { app.use((req, res) => {

10
package-lock.json generated
View file

@ -1055,11 +1055,11 @@
"cookie": "0.4.0", "cookie": "0.4.0",
"cookie-signature": "1.0.6", "cookie-signature": "1.0.6",
"debug": "2.6.9", "debug": "2.6.9",
"depd": "~2.0.0", "depd": "2.0.0",
"on-headers": "~1.0.2", "on-headers": "1.0.2",
"parseurl": "~1.3.3", "parseurl": "1.3.3",
"safe-buffer": "5.2.0", "safe-buffer": "5.2.0",
"uid-safe": "~2.1.5" "uid-safe": "2.1.5"
}, },
"dependencies": { "dependencies": {
"depd": { "depd": {
@ -3668,7 +3668,7 @@
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
"integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==",
"requires": { "requires": {
"random-bytes": "~1.0.0" "random-bytes": "1.0.0"
} }
}, },
"umzug": { "umzug": {

BIN
public/images/avatar-bk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 KiB

View file

@ -6,6 +6,9 @@ body {
margin: 0; margin: 0;
padding: 0; } padding: 0; }
h1 {
text-align: center; }
h2 { h2 {
color: #e0e0e0; color: #e0e0e0;
margin-top: 0; margin-top: 0;
@ -18,10 +21,6 @@ h2 {
margin-top: 15vh; margin-top: 15vh;
background-color: #2a2a2a; background-color: #2a2a2a;
border-radius: 2vw; } border-radius: 2vw; }
.signinup img {
width: 20%;
display: block;
margin: auto; }
.signinup form input { .signinup form input {
color: #e0e0e0; color: #e0e0e0;
margin-bottom: 4vh; margin-bottom: 4vh;
@ -47,4 +46,305 @@ h2 {
i { i {
color: #00c0ff; } color: #00c0ff; }
#panel {
background-color: #2a2a2a;
height: 100vh;
border-right: 2px solid #a1a1a1;
padding: 0;
position: fixed; }
#main {
background-color: #101010;
margin-left: 16vw; }
#navtop {
font-size: 30px; }
#navtop .maintitle {
font-size: 50px;
text-align: center;
margin: 0;
margin-top: 2vh; }
#navtop ul {
margin: 0;
text-align: right; }
#navtop ul li.active {
background: #00c0ff; }
#navtop ul li.active a {
color: black; }
#navtop ul li {
border-top: 1px solid #101010;
background: linear-gradient(to right, #2a2a2a 50%, #00c0ff 50%) left;
background-size: 200%;
transition: .3s ease-out; }
#navtop ul li a {
padding: 1.3vw;
color: #C5C6C7;
display: block;
width: 100%;
transition-duration: 0.3s; }
#navtop ul li:hover {
background-position: right;
cursor: pointer; }
#navtop ul li:hover a {
color: black; }
#navprofile {
font-size: 25px;
padding-top: 1vh;
padding-bottom: 1vh;
margin: 0;
text-align: center; }
#navprofile p {
margin-top: 1vh;
margin-bottom: 0; }
#navprofile a {
cursor: pointer; }
.student {
background: radial-gradient(circle, #014f74 20%, #0f0f63 100%); }
.teacher {
background: radial-gradient(circle, #057401 20%, #0b440a 100%); }
.admin {
background: radial-gradient(circle, #744a01 20%, #632a0f 100%); }
#page {
margin: 0; }
#edtjour .edtflex {
display: flex;
flex-direction: column; }
#edtjour .edtflex div:last-child {
border: none; }
#edtjour .edtflex div {
text-align: center;
font-size: 20px;
background-color: #2a2a2a;
padding: 0 10px;
border-bottom: 2px solid #a1a1a1; }
#edtjour .edtflex .edthead {
border: none;
font-size: 30px;
background-color: #0099ff; }
#edtjour .edtflex .edtmidi {
height: 100px;
background-color: #1f1f1f; }
#filactu .actuflex {
background-color: #1f1f1f;
padding: 0;
height: 700px;
display: flex;
flex-direction: column; }
#filactu .actuflex div:last-child {
border: none; }
#filactu .actuflex .actucontent {
overflow-y: scroll;
padding: 0;
height: 700px;
cursor: auto; }
#filactu .actuflex .actucontent div:hover {
background-color: #686868; }
#filactu .actuflex div {
text-align: left;
cursor: pointer;
font-size: 20px;
background-color: #2a2a2a;
padding: 0 10px;
border-bottom: 2px solid #a1a1a1; }
#filactu .actuflex p {
margin: 0;
padding: 10px; }
#filactu .actuflex .actuhead {
border: none;
cursor: auto;
font-size: 30px;
background-color: #0099ff;
text-align: center; }
#filactu .actuflex .actuhead p {
padding: 30px; }
#filactu .actuflex .actuhead:hover {
background-color: #0099ff; }
#welcome {
padding-bottom: 20px; }
h3 {
font-size: 30px;
text-align: center; }
#edttable {
margin-top: 100px;
border-collapse: collapse;
border: 1px solid white;
width: 90%;
margin-left: auto;
margin-right: auto; }
#edttable .midi td {
height: 109px; }
#edttable th {
background-color: #0099ff;
text-align: center;
border-radius: 0;
border: 1px solid white;
font-size: 25px; }
#edttable tr td:first-child {
border-left: 1px solid white; }
#edttable tr td:last-child {
border-right: 1px solid white; }
#edttable tr:last-child td {
border-bottom: 1px solid white; }
#edttable td {
text-align: center;
font-size: 20px;
background-color: #686868;
padding: 0;
border-radius: 0;
border: 1px solid black; }
#edttable td:nth-child(even) {
background-color: #2a2a2a; }
#edtweek i {
cursor: pointer; }
#edtweek div:nth-child(1) {
text-align: right; }
#edtweek div:nth-child(3) {
text-align: left; }
#marks table {
border: 1px solid white;
margin-top: 80px;
width: 80%;
margin-left: auto;
margin-right: auto;
table-layout: fixed;
border-collapse: collapse; }
#marks table tbody {
display: block;
height: 270px;
overflow: auto; }
#marks table thead, #marks table tbody tr {
display: table;
width: 100%;
table-layout: fixed; }
#marks table th {
border: 1px solid white;
background-color: #0099ff;
text-align: center;
font-size: 30px; }
#marks table td {
font-size: 25px;
cursor: pointer;
padding: 0;
text-align: center;
background-color: #2a2a2a;
border-radius: 0;
border: 1px solid #686868; }
.marksdetails {
display: none;
z-index: 1;
position: fixed;
left: 40%;
top: 20%;
width: 30%; }
.marksdetails table {
border-collapse: collapse;
border: 1px solid white; }
.marksdetails th {
text-align: center;
font-size: 25px;
border: 1px solid white;
background-color: #0099ff; }
.marksdetails td {
text-align: center;
background-color: #2a2a2a;
border: none;
font-size: 25px; }
.marksdetails tr:last-child td {
border-bottom: 1px solid white; }
div#visible {
display: block; }
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; }
#flexgroup {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
background: #2a2a2a; }
#flexgroup p {
background-color: #686868;
cursor: pointer;
padding: 20px;
font-size: 25px; }
#markstable {
width: 95%;
table-layout: fixed;
margin: auto; }
#markstable tbody {
display: block;
height: 70vh;
overflow: auto; }
#markstable thead, #markstable tbody tr {
display: table;
width: 100%;
table-layout: fixed; }
#markstable ::placeholder {
color: #000;
opacity: 1; }
#markstable th {
background-color: #0099ff;
border: 2px solid white;
text-align: center;
font-size: 30px; }
#markstable th input {
font-size: 30px;
border: none;
color: white;
text-align: center; }
#markstable tr td {
background-color: #686868; }
#markstable tr:nth-child(even) td {
background-color: #2a2a2a; }
#markstable td {
text-align: center;
font-size: 25px;
border: 1px solid #e0e0e0; }
#markstable td input {
font-size: 25px;
border: none;
color: white;
text-align: center; }
#marksubmit {
display: block;
width: 30%;
background-color: #0099ff;
margin-top: 50px;
color: white;
border: none;
margin-left: auto;
margin-right: auto;
font-size: 30px;
padding: 15px;
cursor: pointer;
margin-bottom: 50px; }
/*# sourceMappingURL=style.css.map */ /*# sourceMappingURL=style.css.map */

File diff suppressed because one or more lines are too long

View file

@ -2,9 +2,11 @@ $primary: #00c0ff;
$secondary: #0099ff; $secondary: #0099ff;
$dark1: #101010; $dark1: #101010;
$dark2: #2a2a2a; $dark2: #2a2a2a;
$dark3: #1f1f1f;
$medium: #686868;
$light: #e0e0e0; $light: #e0e0e0;
$light2: #C5C6C7; $light2: #C5C6C7;
$light3: #a1a1a1;
body body
padding: 50px padding: 50px
@ -14,6 +16,8 @@ body
margin: 0; margin: 0;
padding: 0; padding: 0;
h1
text-align: center;
h2 h2
color: $light; color: $light;
@ -27,11 +31,6 @@ h2
margin-top: 15vh; margin-top: 15vh;
background-color: $dark2; background-color: $dark2;
border-radius: 2vw; border-radius: 2vw;
img
width: 20%;
display: block;
margin: auto;
form form
input input
color: $light; color: $light;
@ -57,3 +56,314 @@ h2
i i
color: $primary; color: $primary;
#panel
background-color: $dark2;
height: 100vh;
border-right: 2px solid $light3;
padding: 0;
position: fixed;
#main
background-color: $dark1;
margin-left: 16vw;
#navtop
font-size: 30px;
.maintitle
font-size: 50px;
text-align: center;
margin: 0;
margin-top: 2vh;
ul
margin: 0;
text-align: right;
li.active
background: $primary;
a
color: black;
li
border-top: 1px solid $dark1;
background: linear-gradient(to right, $dark2 50%, $primary 50%) left;
background-size: 200%;
transition: .3s ease-out;
a
padding: 1.3vw;
color: $light2;
display: block;
width: 100%;
transition-duration: 0.3s;
li:hover
background-position: right;
cursor: pointer;
a
color: black;
#navprofile
font-size: 25px;
padding-top: 1vh;
padding-bottom: 1vh;
margin: 0;
text-align: center;
p
margin-top: 1vh;
margin-bottom: 0;
a
cursor: pointer;
.student
background: radial-gradient(circle, rgb(1, 79, 116) 20%, rgb(15, 15, 99) 100%);
.teacher
background: radial-gradient(circle, rgb(5, 116, 1) 20%, rgb(11, 68, 10) 100%);
.admin
background: radial-gradient(circle, rgb(116, 74, 1) 20%, rgb(99, 42, 15) 100%);
#page
margin: 0;
#edtjour
.edtflex
display: flex;
flex-direction: column;
div:last-child
border: none;
div
text-align: center;
font-size: 20px;
background-color: $dark2;
padding: 0 10px;
border-bottom: 2px solid $light3;
.edthead
border: none;
font-size: 30px;
background-color: $secondary;
.edtmidi
height: 100px;
background-color: $dark3;
#filactu
.actuflex
background-color: $dark3;
padding: 0;
height: 700px;
display: flex;
flex-direction: column;
div:last-child
border: none;
.actucontent
overflow-y: scroll;
padding: 0;
height: 700px;
cursor: auto;
div:hover
background-color: $medium;
div
text-align: left;
cursor: pointer;
font-size: 20px;
background-color: $dark2;
padding: 0 10px;
border-bottom: 2px solid $light3;
p
margin: 0;
padding: 10px;
.actuhead
border: none;
cursor: auto;
font-size: 30px;
background-color: $secondary;
text-align: center;
p
padding: 30px;
.actuhead:hover
background-color: $secondary;
#welcome
padding-bottom: 20px;
h3
font-size: 30px;
text-align: center;
#edttable
margin-top: 100px;
border-collapse: collapse;
border: 1px solid white;
width: 90%;
margin-left: auto;
margin-right: auto;
.midi
td
height: 109px;
th
background-color: $secondary;
text-align: center;
border-radius: 0;
border: 1px solid white;
font-size: 25px;
tr
td:first-child
border-left: 1px solid white;
td:last-child
border-right: 1px solid white;
tr:last-child
td
border-bottom: 1px solid white;
td
text-align: center;
font-size: 20px;
background-color: $medium;
padding: 0;
border-radius: 0;
border: 1px solid black;
td:nth-child(even)
background-color: $dark2;
#edtweek
i
cursor: pointer;
div:nth-child(1)
text-align: right;
div:nth-child(3)
text-align: left;
#marks
table
border: 1px solid white;
margin-top: 80px;
width: 80%;
margin-left: auto;
margin-right: auto;
table-layout: fixed;
border-collapse: collapse;
tbody
display: block;
height: 270px;
overflow: auto;
thead, tbody tr
display: table;
width: 100%;
table-layout: fixed;
th
border: 1px solid white;
background-color: $secondary;
text-align: center;
font-size: 30px;
td
font-size: 25px;
cursor: pointer;
padding: 0;
text-align: center;
background-color: $dark2;
border-radius: 0;
border: 1px solid $medium;
.marksdetails
display: none;
z-index: 1;
position: fixed;
left: 40%
top: 20%;
width: 30%;
table
border-collapse: collapse;
border: 1px solid white;
th
text-align: center;
font-size: 25px;
border: 1px solid white;
background-color: $secondary;
td
text-align: center;
background-color: $dark2;
border: none;
font-size: 25px;
tr:last-child
td
border-bottom: 1px solid white;
div#visible
display: block;
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;
#flexgroup
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-around;
background: $dark2;
p
background-color: $medium;
cursor: pointer;
padding: 20px;
font-size: 25px;
#markstable
width: 95%;
table-layout: fixed;
margin: auto;
tbody
display: block;
height: 70vh;
overflow: auto;
thead, tbody tr
display: table;
width: 100%;
table-layout: fixed;
::placeholder
color: #000;
opacity: 1;
th
background-color: $secondary;
border: 2px solid white;
text-align: center;
font-size: 30px;
input
font-size: 30px;
border: none;
color: white;
text-align: center;
tr
td
background-color: $medium;
tr:nth-child(even)
td
background-color: $dark2;
td
text-align: center;
font-size: 25px;
border: 1px solid $light;
input
font-size: 25px;
border: none;
color: white;
text-align: center;
#marksubmit
display: block;
width: 30%;
background-color: $secondary;
margin-top: 50px;
color: white;
border: none;
margin-left: auto;
margin-right: auto;
font-size: 30px;
padding: 15px;
cursor: pointer;
margin-bottom: 50px;

8
routes/edt.js Normal file
View file

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

9
routes/home.js Normal file
View file

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

8
routes/marks.js Normal file
View file

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

84
views/edt.pug Normal file
View file

@ -0,0 +1,84 @@
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/home.pug Normal file
View file

@ -0,0 +1,40 @@
extends index
block home
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,5 +1,60 @@
extends layout extends layout
block content block content
h1= title - var student = true
p Welcome to #{title} - var teacher = false
- var admin = false
div(class="row" id="page")
div(class="col s2" id="panel")
if student === true
div(id="navprofile" class="student")
p Kezel Benoit
p G4S3
a Logout
if teacher === true
div(id="navprofile" class="teacher")
p Kezel Benoit
a Logout
if admin === true
div(id="navprofile" class="admin")
p Kezel Benoit
a Logout
div(id="navtop")
ul
if student === true
li
a Home
li(class="active")
a Planning
li
a Marks
li
a(href="https://mail.univ-lyon1.fr/owa/") Mail
li
a(href="https://clarolineconnect.univ-lyon1.fr/") Claroline
li
a School and student life
if teacher === true
li
a Home
li(class="active")
a Planning
li
a Marks
li
a(href="https://mail.univ-lyon1.fr/owa/") Mail
li
a(href="https://clarolineconnect.univ-lyon1.fr/") Claroline
if admin === true
li(class="active")
a Accueil
li
a Notes
li
a Vie scolaire et étudiante
li
a Gestion des profils
div(class="col s10" id="main")
include marks.pug

185
views/marks.pug Normal file
View file

@ -0,0 +1,185 @@
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")