Mukho

Update Title

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