손장민

Bug Fixed

...@@ -45,6 +45,7 @@ app.get('/main', function(req, res) { ...@@ -45,6 +45,7 @@ app.get('/main', function(req, res) {
45 res.sendFile(__dirname+"/pages/main.html"); 45 res.sendFile(__dirname+"/pages/main.html");
46 }); 46 });
47 47
48 +app.set('view engine', 'ejs');
48 app.get('/login', function(req, res) { 49 app.get('/login', function(req, res) {
49 // res.sendFile(__dirname + "/write.html"); 50 // res.sendFile(__dirname + "/write.html");
50 res.sendFile(__dirname+"/pages/login.html"); 51 res.sendFile(__dirname+"/pages/login.html");
...@@ -58,7 +59,10 @@ app.post('/login', function(req, res) { ...@@ -58,7 +59,10 @@ app.post('/login', function(req, res) {
58 { 59 {
59 if(id==users[i].id && pw ==users[i].pw) 60 if(id==users[i].id && pw ==users[i].pw)
60 { 61 {
61 - chk = true; 62 + let name = users[i].name;
63 + res.render('main2.ejs', {name: name});
64 +
65 + chk = true;
62 } 66 }
63 } 67 }
64 ///실패 68 ///실패
...@@ -67,7 +71,9 @@ app.post('/login', function(req, res) { ...@@ -67,7 +71,9 @@ app.post('/login', function(req, res) {
67 console.log("계정을 확인해주세요"); 71 console.log("계정을 확인해주세요");
68 } 72 }
69 else { 73 else {
70 - res.sendFile(__dirname + "/main2.html"); 74 + ///res.sendFile(__dirname + "/pages/main2.html");
75 +
76 + // res.render('main2.ejs', {name: name});
71 } 77 }
72 }); 78 });
73 79
...@@ -91,7 +97,7 @@ app.post('/write', function(req, res) { ...@@ -91,7 +97,7 @@ app.post('/write', function(req, res) {
91 blogRealm.write(() => { 97 blogRealm.write(() => {
92 blogRealm.create('Post', {title: title, content: content, timestamp: timestamp}); 98 blogRealm.create('Post', {title: title, content: content, timestamp: timestamp});
93 }); 99 });
94 - res.sendFile(__dirname + "/write-complete.html"); 100 + res.sendFile(__dirname + "/pages/main.html");
95 }); 101 });
96 app.post('/register', function(req, res) { 102 app.post('/register', function(req, res) {
97 let id = req.body['id'], 103 let id = req.body['id'],
......
1 +<!DOCTYPE html>
2 +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
3 +
4 +<!-- 부가적인 테마 -->
5 +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
6 +
7 +<!-- 합쳐지고 최소화된 최신 자바스크립트 -->
8 +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
9 +<html lang="en">
10 +
11 +
12 +
13 +
14 +<head>
15 + <meta charset="utf-8">
16 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
17 + <meta name="viewport" content="width=device-width, initial-scale=1">
18 + <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
19 + <meta name="description" content="">
20 + <meta name="author" content="">
21 + <link rel="icon" href="../../favicon.ico">
22 +
23 + <title>Coin Community</title>
24 +
25 + <!-- Bootstrap core CSS -->
26 + <link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
27 +
28 + <!-- Custom styles for this template -->
29 + <link href="navbar-fixed-top.css" rel="stylesheet">
30 +
31 + <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
32 + <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
33 + <script src="../../assets/js/ie-emulation-modes-warning.js"></script>
34 +
35 + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
36 + <!--[if lt IE 9]>
37 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
38 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
39 + <![endif]-->
40 +</head>
41 +<style>
42 +<body>
43 + background-image: url("background.jpg");
44 + background-color: #cccccc;
45 + </style>
46 + <style type = "text/css">
47 + .jumbotron{
48 + background-image: url('images/background.jpg');
49 + background-size: cover;
50 + text-shadow: black 0.1em 0.1em 0.1em;
51 + color: whites;
52 + }
53 + </style>
54 + <!-- Fixed navbar -->
55 + <nav class="navbar navbar-default">
56 + <div class="container-fluid">
57 + <!-- Brand and toggle get grouped for better mobile display -->
58 + <div class="navbar-header">
59 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
60 + <span class="sr-only">Toggle navigation</span>
61 + <span class="icon-bar"></span>
62 + <span class="icon-bar"></span>
63 + <span class="icon-bar"></span>
64 + </button>
65 + <a class="navbar-brand" href="#">Coin Community</a>
66 + </div>
67 +
68 + <!-- Collect the nav links, forms, and other content for toggling -->
69 + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
70 + <ul class="nav navbar-nav">
71 + <!--<li class="active"><a href="#">View Chart <span class="sr-only">(current)</span></a></li>
72 + <li><a href="#">Freeboard</a></li>-->
73 +
74 + </ul>
75 +
76 + <ul class="nav navbar-nav navbar-right">
77 + <li><a href="/logout">Logout</a></li>
78 + <li><a href="/info">About me</a></li>
79 +
80 + </ul>
81 + </div>
82 + <!-- /.navbar-collapse -->
83 + </div>
84 + <!-- /.container-fluid -->
85 + </nav>
86 +
87 + <div class="container">
88 +
89 +
90 +
91 + <div class="col-lg-12">
92 + <div class="panel panel-default">
93 + <div class="panel-heading">
94 + Line Chart Example
95 +
96 + <script src="https://mining-profit.com/js/mp-btc-chart.js"></script>
97 + <script type="text/javascript">
98 + MiningProfitBTCChart.setChartWidth(1070);
99 + MiningProfitBTCChart.setChartHeight(500);
100 + MiningProfitBTCChart.isDisplayControlRanges(true);
101 + MiningProfitBTCChart.isDisplayControlInterval(false);
102 + MiningProfitBTCChart.setInitialRange('20h');
103 + MiningProfitBTCChart.setChartRanges(['6h', '10h', '20h', '2d', '1w', '2w', '1m']);
104 + MiningProfitBTCChart.setChartExchanges([{mpvaluation: '#428bca'}, {bitstamp: '#B4CD3E'}, {coinbase: '#D54E88'}, {btce: '#F0522B'}]);
105 + MiningProfitBTCChart.setInitialExchange('coinbase');
106 + MiningProfitBTCChart.setMajorColor('rgb(35, 119, 58)');
107 + MiningProfitBTCChart.draw();
108 + </script>
109 + </div>
110 + <!-- /.panel-heading -->
111 + <div class="panel-body">
112 + <div class="flot-chart">
113 + <div class="flot-chart-content" id="flot-line-chart"></div>
114 + </div>
115 + </div>
116 + <!-- /.panel-body -->
117 + </div>
118 + <!-- /.panel -->
119 + </div>
120 +
121 + </div>
122 + <!-- /container -->
123 +
124 + <!-- Bootstrap core JavaScript
125 + ================================================== -->
126 + <!-- Placed at the end of the document so the pages load faster -->
127 + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
128 + <script src="../../dist/js/bootstrap.min.js"></script>
129 + <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
130 + <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
131 + <script scr="https://code.jquery.com/jquery-3.1.1.min.js"></script>
132 + <script src="js/bootstrap.js"></script>
133 +</body>
134 +
135 +</html>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
74 </ul> 74 </ul>
75 75
76 <ul class="nav navbar-nav navbar-right"> 76 <ul class="nav navbar-nav navbar-right">
77 - <li><a href="/login">Login</a></li> 77 + <li><a href="/logout">Logout</a></li>
78 <li><a href="/info">About me</a></li> 78 <li><a href="/info">About me</a></li>
79 79
80 </ul> 80 </ul>
......
No preview for this file type
1 +<!DOCTYPE html>
2 +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
3 +
4 +<!-- 부가적인 테마 -->
5 +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
6 +
7 +<!-- 합쳐지고 최소화된 최신 자바스크립트 -->
8 +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
9 +<html lang="en">
10 +
11 +
12 +
13 +
14 +<head>
15 + <meta charset="utf-8">
16 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
17 + <meta name="viewport" content="width=device-width, initial-scale=1">
18 + <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
19 + <meta name="description" content="">
20 + <meta name="author" content="">
21 + <link rel="icon" href="../../favicon.ico">
22 +
23 + <title>Coin Community</title>
24 +
25 + <!-- Bootstrap core CSS -->
26 + <link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
27 +
28 + <!-- Custom styles for this template -->
29 + <link href="navbar-fixed-top.css" rel="stylesheet">
30 +
31 + <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
32 + <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
33 + <script src="../../assets/js/ie-emulation-modes-warning.js"></script>
34 +
35 + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
36 + <!--[if lt IE 9]>
37 + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
38 + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
39 + <![endif]-->
40 +</head>
41 +<style>
42 +<body>
43 + background-image: url("background.jpg");
44 + background-color: #cccccc;
45 + </style>
46 + <style type = "text/css">
47 + .jumbotron{
48 + background-image: url('images/background.jpg');
49 + background-size: cover;
50 + text-shadow: black 0.1em 0.1em 0.1em;
51 + color: whites;
52 + }
53 + </style>
54 + <!-- Fixed navbar -->
55 + <nav class="navbar navbar-default">
56 + <div class="container-fluid">
57 + <!-- Brand and toggle get grouped for better mobile display -->
58 + <div class="navbar-header">
59 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
60 + <span class="sr-only">Toggle navigation</span>
61 + <span class="icon-bar"></span>
62 + <span class="icon-bar"></span>
63 + <span class="icon-bar"></span>
64 + </button>
65 + <a class="navbar-brand" href="#">Coin Community</a>
66 + </div>
67 +
68 + <!-- Collect the nav links, forms, and other content for toggling -->
69 + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
70 + <ul class="nav navbar-nav">
71 + <!--<li class="active"><a href="#">View Chart <span class="sr-only">(current)</span></a></li>
72 + <li><a href="#">Freeboard</a></li>-->
73 +
74 + </ul>
75 +
76 + <ul class="nav navbar-nav navbar-right">
77 + <li><a href="/logout">Logout</a></li>
78 + <li><a href="/info">About me</a></li>
79 +
80 + </ul>
81 + </div>
82 + <!-- /.navbar-collapse -->
83 + </div>
84 + <!-- /.container-fluid -->
85 + </nav>
86 +
87 + <div class="container">
88 + <h1><%=name%>님 환영합니다</h1>
89 +
90 +
91 +
92 + <div class="col-lg-12">
93 + <div class="panel panel-default">
94 + <div class="panel-heading">
95 + Line Chart Example
96 +
97 + <script src="https://mining-profit.com/js/mp-btc-chart.js"></script>
98 + <script type="text/javascript">
99 + MiningProfitBTCChart.setChartWidth(1070);
100 + MiningProfitBTCChart.setChartHeight(500);
101 + MiningProfitBTCChart.isDisplayControlRanges(true);
102 + MiningProfitBTCChart.isDisplayControlInterval(false);
103 + MiningProfitBTCChart.setInitialRange('20h');
104 + MiningProfitBTCChart.setChartRanges(['6h', '10h', '20h', '2d', '1w', '2w', '1m']);
105 + MiningProfitBTCChart.setChartExchanges([{mpvaluation: '#428bca'}, {bitstamp: '#B4CD3E'}, {coinbase: '#D54E88'}, {btce: '#F0522B'}]);
106 + MiningProfitBTCChart.setInitialExchange('coinbase');
107 + MiningProfitBTCChart.setMajorColor('rgb(35, 119, 58)');
108 + MiningProfitBTCChart.draw();
109 + </script>
110 + </div>
111 + <!-- /.panel-heading -->
112 + <div class="panel-body">
113 + <div class="flot-chart">
114 + <div class="flot-chart-content" id="flot-line-chart"></div>
115 + </div>
116 + </div>
117 + <!-- /.panel-body -->
118 + </div>
119 + <!-- /.panel -->
120 + </div>
121 +
122 + </div>
123 + <!-- /container -->
124 +
125 + <!-- Bootstrap core JavaScript
126 + ================================================== -->
127 + <!-- Placed at the end of the document so the pages load faster -->
128 + <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
129 + <script src="../../dist/js/bootstrap.min.js"></script>
130 + <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
131 + <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
132 + <script scr="https://code.jquery.com/jquery-3.1.1.min.js"></script>
133 + <script src="js/bootstrap.js"></script>
134 +</body>
135 +
136 +</html>