Toggle navigation
Toggle navigation
This project
Loading...
Sign in
zuzitsu
/
UR_Village
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이학주
2020-12-01 21:55:31 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adbdcfbe54c0776dd44059fdfe740920ec0374e5
adbdcfbe
1 parent
4a52190c
Modify folder name and Add css in category page
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
74 deletions
app.js
public/stylesheets/style.css
routes/select.js → routes/category.js
views/category.pug
views/index.pug
views/select.pug
app.js
View file @
adbdcfb
...
...
@@ -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'
,
select
Router
);
app
.
use
(
'/
category'
,
category
Router
);
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
false
}));
// catch 404 and forward to error handler
...
...
public/stylesheets/style.css
View file @
adbdcfb
...
...
@@ -6,3 +6,9 @@ body {
a
{
color
:
#00B7FF
;
}
.title
{
vertical-align
:
middle
;
text-align
:
center
;
font
:
"serif"
;
}
\ No newline at end of file
...
...
routes/
select
.js
→
routes/
category
.js
View file @
adbdcfb
...
...
@@ -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
)
{
...
...
views/category.pug
0 → 100644
View file @
adbdcfb
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') 검사!
views/index.pug
View file @
adbdcfb
...
...
@@ -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="검색")
...
...
views/select.pug
deleted
100644 → 0
View file @
4a52190
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') 검사!
Please
register
or
login
to post a comment