Mukho

Update Title

......@@ -26,6 +26,7 @@
</div>
</nav>
<div class="container px-5 my-5">
<h2>로그인</h2>
<form action="/login" method="post" id="contactForm" data-sb-form-api-token="API_TOKEN">
<div class="form-floating mb-3">
<input class="form-control" name="ID" id="ID" type="text" required minlength='1' maxlength='20' placeholder="ID" data-sb-validations="required" />
......
......@@ -24,4 +24,4 @@ DB 구조(*ID, password, type) -> 형식에 맞게 추가<br>
LF 오류시 git config --global core.autocrlf true 입력<br><br>
최종 수정: 2021-11-15 21:30
\ No newline at end of file
최종 수정: 2021-11-16 14:03
\ No newline at end of file
......
......@@ -13,8 +13,9 @@ router.get('/:page', function(req, res, next) {
board.query(sql, function(err,rows) {
if (err) console.error("err : " + err);
res.render('list.ejs', {title: '게시판 리스트', rows: rows})
var id = req.user;
if(!id) id = "수정예정"
res.render('list.ejs', {'ID':id, title: '게시판 리스트', rows: rows})
})
});
......
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<title>묵호 - 놀이터</title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="../assets/favicon.ico" />
<link rel='stylesheet' href='/stylesheets/style.css'/>
</head>
<body>
<h1><%= title %></h1>
<a href="/board/write">글쓰기</a>
<table border="1">
<!-- Navigation-->
<nav class="navbar navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand" href="http://localhost:3000/main">묵호의 놀이터</a>
<div class="user">
<a> <%= ID %> 님 안녕하세요 </section></a>
<a class="btn btn-primary" href="http://localhost:3000/logout">로그아웃</a>
</div>
</div>
</nav>
<h1><%= title %></h1>
<a href="/board/write">글쓰기</a>
<table border="1">
<tr>
<td>번호</td>
<td>작성자</td>
......@@ -30,7 +42,7 @@
<td><%=data.regdate%></td>
</tr>
<%}%>
</table>
</table>
</body>
</html>
......
......@@ -26,6 +26,7 @@
</div>
</nav>
<div class="container px-5 my-5">
<h2>로그인</h2>
<form action="/login" method="post" id="contactForm" data-sb-form-api-token="API_TOKEN">
<div class="form-floating mb-3">
<input class="form-control" name="ID" id="ID" type="text" required minlength='1' maxlength='20' placeholder="ID" data-sb-validations="required" />
......
......@@ -21,7 +21,7 @@
<div class="container">
<a class="navbar-brand" href="http://localhost:3000/main">묵호의 놀이터</a>
<div class="user">
<a> <%= ID %> 님 안녕하세요 </section></a>
<a> <%= ID %> 님 안녕하세요 </a>
<a class="btn btn-primary" href="http://localhost:3000/logout">로그아웃</a>
</div>
</div>
......
......@@ -26,6 +26,7 @@
</div>
</nav>
<div class="container px-5 my-5">
<h2>회원가입</h2>
<form action="/register" method="post" id="contactForm" data-sb-form-api-token="API_TOKEN">
<div class="form-floating mb-3">
<input class="form-control" name="ID" id="ID" type="text" required minlength='1' maxlength='20' placeholder="ID" data-sb-validations="required" />
......