이학주

Modify folder name and Add css in category page

......@@ -6,7 +6,7 @@ var logger = require('morgan');
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
var selectRouter = require('./routes/select');
var categoryRouter = require('./routes/category');
var app = express();
var bodyParser = require('body-parser');
// view engine setup
......@@ -20,7 +20,7 @@ app.use(cookieParser());
app.use(express.static(path.join(__dirname, '/static'))); //정적파일 위치
app.use('/', indexRouter);
app.use('/users', usersRouter);
app.use('/select', selectRouter);
app.use('/category', categoryRouter);
app.use(bodyParser.urlencoded({ extended: false }));
// catch 404 and forward to error handler
......
......@@ -6,3 +6,9 @@ body {
a {
color: #00B7FF;
}
.title{
vertical-align: middle;
text-align: center;
font: "serif";
}
\ No newline at end of file
......
......@@ -37,7 +37,7 @@ router.post('/', function(req, res) {
console.log(xyList);
}
})
res.render('select', { 'userLocation': req.body.userLocation });
res.render('category', { 'userLocation': req.body.userLocation });
});
router.get('/food', function(req, res) {
......
doctype html
head
title #{si} #{dong}
<div class ="title">
h1(style = "text-align : center") 당신의 동네 : #{userLocation}
</div>
link(rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css')
style.
p { margin:20px 0px; }
.container
.row
.col-4
.card
.text-center
.card-image
img(src='/restaurant.jpg' style='width:auto; height:auto; max-width:350px; max-height: 200px;')
.card-body
h5.card-title 음식
p.card-text(style = 'text-align: center;')
| 주변 음식점의 수
a.btn.btn-primary(href='/category/food') 검사!
.col-4
.card
.text-center
.card-image
img(src='/school.jpg' style='width:auto; height:auto; max-width:350px; max-height: 200px;')
.card-body
h5.card-title 학군
p.card-text
| 주변 학교, 학원 환경
a.btn.btn-primary(href='/category/school') 검사!
.col-4
.card
.text-center
.card-image
img(src='/park.jpg' style='width:auto; height:auto; max-width:350px; max-height: 200px;')
.card-body
h5.card-title 공원
p.card-text
| 주변 공원
a.btn.btn-primary(href='/category/park') 검사!
.col-4
.card
.text-center
.card-image
img(src='/public_transport.jpg' style='width:auto; height:auto; max-width:350px; max-height: 200px;')
.card-body
h5.card-title 대중교통
p.card-text
| 대중교통 편리도
a.btn.btn-primary(href='/category/transport') 검사!
.col-4
.card
.text-center
.card-image
img(src='/safe.jpg' style='width:auto; height:auto; max-width:350px; max-height: 200px;')
.card-body
h5.card-title 안전
p.card-text
| 주변 경찰서, 범죄자 인근~~
a.btn.btn-primary(href='/category/safe') 검사!
.col-4
.card
.text-center
.card-image
img(src='/cultural_life.jpg' style='width:auto; height:auto; max-width:350px; max-height: 200px;')
.card-body
h5.card-title 여가
p.card-text
| 문화시설
a.btn.btn-primary(href='/category/culture') 검사!
......@@ -5,7 +5,7 @@ html
link(rel='stylesheet', href='stylesheets/style.css')
body
img.image(src='/logo.png')
form(action='/select' method='post' name='location')
form(action='/category' method='post' name='location')
input(type="text" id='userLocation' name='userLocation' placeholder="당신의 동네 주소를 입력해주세요(시/구/동)" style="width: 300px; height: 30px;")
input(type="submit" value="검색")
......
doctype html
html
head
title= title
link(rel='stylesheet', href='stylesheets/style.css')
body
block content
h1 당신의 동네 : #{userLocation}
.row
.col.s12.m7
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/restaurant.jpg' style='width:400px; height: 300px;')
h1.card-title 맛집
.card-content
p
| 주변 동네 맛집의 개수와 얼마나 다양한 음식점이 있는지
.card-action
a(href='/select/food') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/school.jpg' style='width:400px; height: 300px;')
h1.card-title 학군
.card-content
p
| 주변 학교, 학원 환경
.card-action
a(href='/select/school') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/park.jpg' style='width:400px; height: 300px;')
h1.card-title 공원
.card-content
p
| 주변 공원
.card-action
a(href='/select/park') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/public_transport.jpg' style='width:400px; height: 300px;')
h1.card-title 대중교통
.card-content
p
| 대중교통 편리도
.card-action
a(href='/select/transport') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/safe.jpg' style='width:400px; height: 300px;')
h1.card-title 안전
.card-content
p
| 주변 경찰서, 범죄자 인근~~
.card-action
a(href='/select/safe') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/cultural_life.jpg' style='width:400px; height: 300px;')
h1.card-title 여가
.card-content
p
| 문화생활 시설
.card-action
a(href='/select/culture') 검사!