1
0
Fork 0

Addind profil.pug and manage sub

This commit is contained in:
KEZEL BENOIT p1907091 2020-11-21 14:02:01 +01:00
parent 1c062329d2
commit affc823837
10 changed files with 212 additions and 35 deletions

4
app.js
View file

@ -12,6 +12,8 @@ const edtRouter = require("./routes/edt");
const homeRouter = require("./routes/home"); const homeRouter = require("./routes/home");
const marksRouter = require("./routes/marks"); const marksRouter = require("./routes/marks");
const registerRouter = require("./routes/register"); const registerRouter = require("./routes/register");
const viescolRouter = require("./routes/viescol")
const profilRouter = require("./routes/profil")
let app = express(); let app = express();
const sessionMiddleware = session({ const sessionMiddleware = session({
@ -42,6 +44,8 @@ app.use("/edt", edtRouter);
app.use("/home", homeRouter); app.use("/home", homeRouter);
app.use("/marks", marksRouter); app.use("/marks", marksRouter);
app.use('/register', registerRouter); app.use('/register', registerRouter);
app.use('/viescol', viescolRouter);
app.use('/profil', profilRouter);
// catch 404 and forward to error handler // catch 404 and forward to error handler
app.use((req, res) => { app.use((req, res) => {

8
routes/profil.js Normal file
View file

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

0
routes/utils/profile.js Normal file
View file

8
routes/viescol.js Normal file
View file

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

View file

@ -120,6 +120,7 @@ i
padding-bottom: 1vh padding-bottom: 1vh
margin: 0 margin: 0
text-align: center text-align: center
cursor: pointer
p p
margin-top: 1vh margin-top: 1vh
@ -388,3 +389,102 @@ div#visible + div
padding: 15px padding: 15px
cursor: pointer cursor: pointer
margin-bottom: 50px margin-bottom: 50px
#absences
padding: 50px
.abshead
background-color: $secondary
font-size: 25px
text-align: center
p
padding: 5px
margin: 0
.abscont
p
background-color: $dark2
font-size: 15px
transition-duration: 0.2s
margin: 0
padding: 10px
p:hover
background-color: $light3
#btmviescol
#events, #objtrouv
padding: 50px
.eventhead, .objtrouvhead
background-color: $secondary
font-size: 25px
text-align: center
p
padding: 5px
margin: 0
.eventcont, .objtrouvcont
p
background-color: $dark2
font-size: 15px
transition-duration: 0.2s
margin: 0
padding: 10px
p:hover
background-color: $light3
.abogest
margin: auto
display: block
background-color: $secondary
color: white
padding: 10px
border-radius: 2px
border: none
font-size: 20px
margin-top: 30px
.managesub
z-index: 1
display: none
width: 50%
position: fixed
top: 30%
left: 30%
background-color: $dark2
.topicname
background-color: $secondary
font-size: 20px
margin: 0
padding: 10px
form
font-size: 15px
padding: 15px
input[type='submit']
display: block
margin: auto
padding: 10px
font-size: 20px
border: none
border-radius: 2px
background-color: $secondary
color: white
cursor: pointer
#editprofil
padding-left: 70px
padding-right: 70px
input
color: white
input[type='submit']
color: white
background: $secondary
padding: 10px
font-size: 20px
border: none
border-radius: 2px
display: block
margin: auto
cursor: pointer

View file

@ -7,7 +7,7 @@ block content
div(class="col s12 m6" id="filactu") div(class="col s12 m6" id="filactu")
div(class="col s10 offset-s1 actuflex") div(class="col s10 offset-s1 actuflex")
div(class="actuhead") div(class="actuhead")
p Fil d'actualité p News feed
div(class="actucontent") div(class="actucontent")
div div
p Nouvelle note : p Nouvelle note :
@ -24,7 +24,7 @@ block content
div(class="col s12 m6" id="edtjour") div(class="col s12 m6" id="edtjour")
div(class="col s10 offset-s1 edtflex") div(class="col s10 offset-s1 edtflex")
div(class="edthead") div(class="edthead")
p EDT du jour p Time Schedule
div div
p Maths p Maths
p S26 p S26

View file

@ -109,7 +109,7 @@ block content
if teacher === true if teacher === true
div(class="row") div(class="row")
div(class="col s12 m10 offset-m1 marksgroup") div(class="col s12 m10 offset-m1 marksgroup")
h3 Selectionnez un groupe h3 Select a group
div(id="flexgroup") div(id="flexgroup")
p G1S1 p G1S1
p G2S2 p G2S2
@ -119,11 +119,11 @@ block content
table(id="markstable") table(id="markstable")
thead thead
tr tr
th Noms th Name
th th
input(type="text" value="DS1") input(type="text" value="DS1")
th th
input(type="text" placeholder="Ajouter une note") input(type="text" placeholder="Add a test")
tbody tbody
tr tr
td Test td Test

27
views/pages/profil.pug Normal file
View file

@ -0,0 +1,27 @@
extends ../template/navbar
block content
.row
h1 Edit your profile
form.col.s12#editprofil
.row
div(class="input-field col s6")
i(class="material-icons prefix") portrait
input(type="text" id="firstname-input" class="autocomplete")
label(for="firstname-input") First Name
div(class="input-field col s6")
input(type="text" id="lastname-input" class="autocomplete")
label(for="lastname-input") Last Name
div(class="input-field col s12")
i(class="material-icons prefix") lock
input(type="password" id="new-password" class="autocomplete")
label(for="new-password") New password
div(class="input-field col s12")
i(class="material-icons prefix") lock
input(type="password" id="password" class="autocomplete")
label(for="password") Current password
input(type='submit' value='Save')

View file

@ -1,6 +1,32 @@
extends ../template/navbar extends ../template/navbar
block content block content
div.managesub#visible
p.topicname Tick the topics you would like to see in your news feed
form
p
label
input.filled-in(type='checkbox' checked='checked')
span Absences
p
label
input.filled-in(type='checkbox' checked='checked')
span Events
p
label
input.filled-in(type='checkbox' checked='checked')
span Property Lost
p
label
input.filled-in(type='checkbox' checked='checked')
span Marks
p
input(type='submit' value="Submit")
div
div.row div.row
if student === true if student === true
div.col.s12.m6#absences div.col.s12.m6#absences
@ -8,26 +34,28 @@ block content
p Absences p Absences
div.abscont div.abscont
p Absent le 14/03 de 16h à 18h p Absent le 14/03 de 16h à 18h
div.abscont
p Absent le 15/03 de 16h à 18h p Absent le 15/03 de 16h à 18h
div.abscont
p Absent le 16/03 de 16h à 18h p Absent le 16/03 de 16h à 18h
div.col.s12.m6 div.col.s12.m6
button Gérer vos abonnements button.abogest Manage your subscriptions
if student === false if student === false
div.col.s12 div.col.s12
button Ajouter une absence button.abogest Add an absence
div.row
div.row#btmviescol
div.col.s12.m6#events div.col.s12.m6#events
div.eventhead div.eventhead
p Evenements p Events
div.eventcont div.eventcont
p Repas raclette organisé par le BDE le 24/02 à 12H30 en S26 p Repas raclette organisé par le BDE le 24/02 à 12H30 en S26
div.col.s12.m6#objtrouv div.col.s12.m6#objtrouv
div.objtrouvhead div.objtrouvhead
p Objets Trouvés p Lost Property
div.objtrouvcont div.objtrouvcont
p Ordinateur HP trouvé retourné au secrétariat p Ordinateur HP trouvé retourné au secrétariat

View file

@ -29,7 +29,7 @@ block navbar
li li
a(href="https://clarolineconnect.univ-lyon1.fr/") Claroline a(href="https://clarolineconnect.univ-lyon1.fr/") Claroline
li li
a School and student life a(href="/viescol") School and student life
if teacher === true if teacher === true
li(class="active") li(class="active")
a(href="/") Home a(href="/") Home
@ -40,7 +40,9 @@ block navbar
li li
a(href="https://mail.univ-lyon1.fr/owa/") Mail a(href="https://mail.univ-lyon1.fr/owa/") Mail
li li
a(href="https://clarolineconnect.univ-lyon1.fr/") Claroline a(href="https://clarolineconnect.univ-lyon1.fr/") Claroline Connect
li
a(href="/viescol") School and student life
if admin === true if admin === true
li(class="active") li(class="active")
a Accueil a Accueil