Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DP_projet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VILLAUME Lucas
DP_projet
Commits
d64eb745
Commit
d64eb745
authored
1 year ago
by
VILLAUME Lucas
Browse files
Options
Downloads
Patches
Plain Diff
Modification footer/header
parent
e56a38bc
No related branches found
No related tags found
1 merge request
!2
Doc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
app.js
+8
-1
8 additions, 1 deletion
app.js
views/document.ejs
+1
-1
1 addition, 1 deletion
views/document.ejs
views/partials/footer.ejs
+1
-3
1 addition, 3 deletions
views/partials/footer.ejs
views/partials/header.ejs
+18
-9
18 additions, 9 deletions
views/partials/header.ejs
with
28 additions
and
14 deletions
app.js
+
8
−
1
View file @
d64eb745
...
@@ -5,7 +5,6 @@ const db = require('./db/Database.js');
...
@@ -5,7 +5,6 @@ const db = require('./db/Database.js');
const
auth
=
require
(
'
./controller/AuthController.js
'
);
const
auth
=
require
(
'
./controller/AuthController.js
'
);
const
bodyParser
=
require
(
'
body-parser
'
);
const
bodyParser
=
require
(
'
body-parser
'
);
const
cookieParser
=
require
(
'
cookie-parser
'
);
const
cookieParser
=
require
(
'
cookie-parser
'
);
const
bcrypt
=
require
(
'
bcrypt
'
);
const
{
createHash
,
randomBytes
}
=
require
(
'
crypto
'
);
const
{
createHash
,
randomBytes
}
=
require
(
'
crypto
'
);
...
@@ -83,6 +82,14 @@ app.get("/document", (req, res) => {
...
@@ -83,6 +82,14 @@ app.get("/document", (req, res) => {
res
.
render
(
"
document
"
,
{
title
:
'
Créer un Document
'
});
res
.
render
(
"
document
"
,
{
title
:
'
Créer un Document
'
});
});
});
app
.
get
(
"
/mydocuments
"
,
(
req
,
res
)
=>
{
if
(
!
res
.
locals
.
user
)
{
return
res
.
redirect
(
"
/login
"
);
// Redirige vers la page de connexion si l'utilisateur n'est pas connecté
}
res
.
render
(
"
mydocuments
"
,
{
title
:
'
Mes Documents
'
});
});
app
.
all
(
"
*
"
,
(
req
,
res
)
=>
res
.
status
(
404
).
send
(
"
<h1>Il semblerait que cette page n'existe pas.</h1>
"
));
app
.
all
(
"
*
"
,
(
req
,
res
)
=>
res
.
status
(
404
).
send
(
"
<h1>Il semblerait que cette page n'existe pas.</h1>
"
));
...
...
This diff is collapsed.
Click to expand it.
views/document.ejs
+
1
−
1
View file @
d64eb745
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Signup Page
</title>
<title>
Création document
</title>
<link
rel=
"stylesheet"
href=
"/css/spreadsheet-style.css"
>
<link
rel=
"stylesheet"
href=
"/css/spreadsheet-style.css"
>
</head>
</head>
...
...
This diff is collapsed.
Click to expand it.
views/partials/footer.ejs
+
1
−
3
View file @
d64eb745
<footer>
<footer>
<!-- Contenu de ton pied de page ici -->
<!-- Contenu de ton pied de page ici -->
<p>
this is footer
</p>
<p>
CollabSheet
</p>
</footer>
</footer>
</body>
</html>
This diff is collapsed.
Click to expand it.
views/partials/header.ejs
+
18
−
9
View file @
d64eb745
...
@@ -3,13 +3,22 @@
...
@@ -3,13 +3,22 @@
<p>this is header</p>
<p>this is header</p>
<div class="navbar">
<% if (locals.user) { %>
<ul class="navbar_ul">
<div class="main-content">
<% if (locals.user) { %>
Bonjour, <%= locals.user.username %>!
<li>Bonjour, <%= locals.user.username %> !</li>
<form action="/logout" method="post">
<% } %>
<button type="submit">Se Déconnecter</button>
<li><a href="/">Accueil</a></li>
</form>
<li><a href="/mydocuments">Documents</a></li>
</div>
<li><a href="/document">Créer un document</a></li>
<% } %>
<% if (locals.user) { %>
<form action="/logout" method="post">
<li><button type="submit">Se Déconnecter</button> </li>
</form>
<% } else { %>
<li><a href="/register">Inscription</a></li>
<li><a href="/login">Connexion</a></li>
<% } %>
</ul>
</div>
</header>
</header>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment