I want to include my already working navbar, partials, jumbotron and footer in my login.ejs.
For my other ejs files it worked perfectly, but for some reason not in my login.ejs.
Here's my code for the login.ejs:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
</head>
<body>
<h1>Login!</h1>
<form action="/login" method="POST">
<div>
<label for="username">Enter Username</label>
<input type="text" name="username" id="username" placeholder="username">
</div>
<div>
<label for="password">Enter Password</label>
<input type="password" name="password" id="password" placeholder="password">
</div>
<button>Login</button>
</form>
</body>
</html>
And I want to include:
<%- include("partials/head")%>
<%- include("partials/nav")%>
<div style="margin-top: 55px;"></div>
<%- include("partials/footer")%>
question from:
https://stackoverflow.com/questions/65934299/how-do-i-include-the-navbar-partials-jumbotron-and-footer-in-the-ejs 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…