Eunsu486

Merge branch 'eunsu' into 'master'

Eunsu

Merge From eunsu into master

See merge request !3
......@@ -3,42 +3,36 @@ var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
//var categoryRouter = require('./routes/category');
var categoryRouter = require('./routes/category');
var vendorRounter = require('./routes/vendors');
var app = express();
var bodyParser = require('body-parser');
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use('/', indexRouter);
app.use('/users', usersRouter);
app.use('/category', categoryRouter);
app.use('/vendors/bootstrap', express.static(path.join(__dirname, "./node_modules/bootstrap/dist")));
app.use(bodyParser.urlencoded({ extended: false }));
// catch 404 and forward to error handler
app.use(function (req, res, next) {
next(createError(404));
});
// error handler
app.use(function (err, req, res, next) {
// set locals, only providing error in development
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};
// render the error page
res.status(err.status || 500);
res.render('error');
});
module.exports = app;
\ No newline at end of file
......
......@@ -22,7 +22,7 @@
"_resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz",
"_shasum": "927d2f6947f7f1c19a316dd8eea3614e8b18f8e9",
"_spec": "xml-js@^1.6.11",
"_where": "C:\\Users\\se051\\OneDrive\\바탕 화면\\나의 대학라이프\\오픈소스SW개발\\텀프\\animal-Info",
"_where": "C:\\Users\\owterm\\animal-Info",
"author": {
"name": "Yousuf Almarzooqi",
"email": "ysf953@gmail.com"
......
{
"_from": "xml2js",
"_from": "xml2js@^0.4.23",
"_id": "xml2js@0.4.23",
"_inBundle": false,
"_integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"_location": "/xml2js",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"type": "range",
"registry": true,
"raw": "xml2js",
"raw": "xml2js@^0.4.23",
"name": "xml2js",
"escapedName": "xml2js",
"rawSpec": "",
"rawSpec": "^0.4.23",
"saveSpec": null,
"fetchSpec": "latest"
"fetchSpec": "^0.4.23"
},
"_requiredBy": [
"#USER",
......@@ -21,8 +21,8 @@
],
"_resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"_shasum": "a0c69516752421eb2ac758ee4d4ccf58843eac66",
"_spec": "xml2js",
"_where": "C:\\Users\\se051\\OneDrive\\바탕 화면\\나의 대학라이프\\오픈소스SW개발\\텀프\\animal-Info",
"_spec": "xml2js@^0.4.23",
"_where": "C:\\Users\\owterm\\animal-Info",
"author": {
"name": "Marek Kubica",
"email": "marek@xivilization.net",
......
This diff is collapsed. Click to expand it.
var express = require('express');
var router = express.Router();
var path = require('path');
router.use('/bootstrap', express.static(path.join(__dirname, "../node_modules/bootstrap/dist")));
module.exports = router;
\ No newline at end of file
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-grid.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-reboot.min.css' />
<link rel='stylesheet' href='/css/category.css'>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300&display=swap" rel="stylesheet">
<title>📝 진단 검사</title>
</head>
<body>
<%- include('components/locationJumbotron') -%>
<%- include('components/category') -%>
</body>
</html>
\ No newline at end of file
<ul class="nav nav-pills nav-stacked">
<li role="presentation" class="active"><a href="#">동물 병원</a></li>
<li role="presentation"><a href="#">동물 약국</a></li>
<li role="presentation"><a href="#">공원</a></li>
<li role="presentation"><a href="#">동물 보호 시설</a></li>
<li role="presentation"><a href="">사용법</a></li>
<li role="presentation" class="active"><a href="/category/hospital">🏥동물 병원🏥</a></li>
<li role="presentation"><a href="/category/medicine">💊동물 약국💊</a></li>
<li role="presentation"><a href="/category/appliance">🩺동물의료기기 판매🩺</a></li>
<li role="presentation"><a href="/category/park">🌳체육시설🌳</a></li>
</ul>
\ No newline at end of file
......
......@@ -2,16 +2,13 @@
<html>
<head>
<title>Animal Info</title>
<title>🐶 Animal Info</title>
<!-- 합쳐지고 최소화된 최신 CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<!-- 부가적인 테마 -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<!-- 합쳐지고 최소화된 최신 자바스크립트 -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<style>
html {
min-height: 100%;
......@@ -65,43 +62,58 @@
font-size: xx-large;
}
</style>
<script>
function sm() {
document.getElementById("location").submit();
}
</script>
</head>
<body>
<header id="header">
<%- include("components/header") -%>
</header>
<div class="content">
<div class="nav">
<%- include("components/navigation") -%>
</div>
<div class="jumbotron">
<h2>서울시 동물 병원 검색</h2>
<p>
지역 선택
</p>
<form action="/category/park" method="post" name="location" id="location">
<form action="/category" method="POST" name="location" id="location">
<select onchange="sm()" name="user_gu" id="user_gu_select">
<option value='' selected="true" disabled="true">--Please choose an option--</option>
<option value='금천구'>금천구</option>
<option value='강남구'>강남구</option>
<option value='강동구'>강동구</option>
<option value='강북구'>강북구</option>
<option value='강서구'>강서구</option>
<option value='관악구'>관악구</option>
<option value='광진구'>광진구</option>
<option value='구로구'>구로구</option>
<option value='금천구'>금천구</option>
<option value='노원구'>노원구</option>
<option value='도봉구'>도봉구</option>
<option value='동대문구'>동대문구</option>
<option value='동작구'>동작구</option>
<option value='마포구'>마포구</option>
<option value='서대문구'>서대문구</option>
<option value='서초구'>서초구</option>
<option value='성동구'>성동구</option>
<option value='성북구'>성북구</option>
<option value='송파구'>송파구</option>
<option value='양천구'>양천구</option>
<option value='영등포구'>영등포구</option>
<option value='용산구'>용산구</option>
<option value='은평구'>은평구</option>
<option value='종로구'>종로구</option>
<option value='중구'>중구</option>
<option value='중랑구'>중랑구</option>
</select>
</form>
</div>
</div>
<footer id="footer">
<%- include("components/footer") -%>
</footer>
......
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-grid.min.css' />
<link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-reboot.min.css' />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300&display=swap" rel="stylesheet">
<title>📝 결과</title>
</head>
<body>
<%- include(`results/${category}`) -%>
</body>
</html>
\ No newline at end of file
......
it's appliance page
\ No newline at end of file
<h4>🩺 동물의료기기 판매 및 임대업체 현황</h4>
<table class="table">
<thead class="thead-dark">
<tr>
<th>이름</th>
<th>도로명주소</th>
</tr>
</thead>
<tbody>
<%for (var i=0; i <appliance_list.length; i++){%>
<tr>
<td>
<%=appliance_list[i].title._text%>
</td>
<td>
<%=appliance_list[i].venue._text%>
</td>
</tr>
<%}%>
</tbody>
</table>
<p class="sum">총 개수 :
<%=appliance_list.length%>
</p>
\ No newline at end of file
......
it's hospital page
\ No newline at end of file
<h4>🏥 동물병원 현황</h4>
<table class="table">
<thead class="thead-dark">
<tr>
<th>동물병원명</th>
<th>도로명주소</th>
</tr>
</thead>
<tbody>
<%for (var i=0; i <hospital_list.length; i++){%>
<tr>
<td>
<%=hospital_list[i].title._text%>
</td>
<td>
<%=hospital_list[i].venue._text%>
</td>
</tr>
<%}%>
</tbody>
</table>
<p class="sum">총 동물병원 개수 :
<%-hospital_list.length%>
</p>
\ No newline at end of file
......
it's medicine page
\ No newline at end of file
<h4> 💊동물약국 현황</h4>
<table class="table">
<thead class="thead-dark">
<tr>
<th>동물약국명</th>
<th>도로명주소</th>
</tr>
</thead>
<tbody>
<%for (var i=0; i <category_list.length; i++){%>
<tr>
<td>
<%=category_list[i].title._text%>
</td>
<td>
<%=category_list[i].venue._text%>
</td>
</tr>
<%}%>
</tbody>
</table>
<p class="sum">총 동물약국 개수 :
<%-category_list.length%>
</p>
\ No newline at end of file
......
it's park page
\ No newline at end of file
<h4>🌳 도시공원 현황</h4>
<table class="table">
<thead class="thead-dark">
<tr>
<th>도시공원명</th>
<th>도로명주소</th>
</tr>
</thead>
<tbody>
<%for (var i=0; i <appliance_list.length; i++){%>
<tr>
<td>
<%=appliance_list[i].title._text%>
</td>
<td>
<%=appliance_list[i].venue._text%>
</td>
</tr>
<%}%>
</tbody>
</table>
<p class="sum">총 도시공원 개수 :
<%=appliance_list.length%>
</p>
\ No newline at end of file
......