Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김대철
/
CafeRecommend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최정민
2021-06-07 01:56:46 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d2294b0ea1066770a302a4d727f83a563054e500
d2294b0e
1 parent
815dd1f6
CHORE : 타이틀및 전체적인 디자인수정
-
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
44 deletions
routes/index.js
sessions/e7kjBCXJobyGW1wzonYQ38C7nEs40uU6.json
views/index.ejs
views/login.ejs
views/map.ejs
views/review.ejs
routes/index.js
View file @
d2294b0
...
...
@@ -5,7 +5,7 @@ var bodyParser = require("body-parser");
var
{
OAuth2Client
}
=
require
(
"google-auth-library"
);
var
CLIENT_ID
=
const
CLIENT_ID
=
"94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"
;
var
client
=
new
OAuth2Client
(
CLIENT_ID
);
var
mysql
=
require
(
"mysql"
);
...
...
@@ -34,12 +34,12 @@ connection.connect();
/* GET home page. */
router
.
get
(
"/"
,
function
(
req
,
res
,
next
)
{
res
.
render
(
"index"
,
{
d
:
"94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"
,
client_id
:
CLIENT_ID
,
});
});
router
.
get
(
"/index"
,
function
(
req
,
res
,
next
)
{
res
.
render
(
"index"
,
{
d
:
"94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"
,
client_id
:
CLIENT_ID
,
});
});
...
...
@@ -145,7 +145,9 @@ router.post("/login", (req, res) => {
connection
.
query
(
sql
,
parameter
,
function
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
return
res
.
render
(
"/"
);
return
res
.
render
(
"/"
,
{
client_id
:
CLIENT_ID
,
});
}
else
{
console
.
log
(
"새로운 user데이터 입력"
);
}
...
...
@@ -162,7 +164,9 @@ router.post("/login", (req, res) => {
connection
.
query
(
sql2
,
parameter2
,
function
(
err
)
{
if
(
err
)
{
console
.
log
(
err
);
return
res
.
render
(
"/"
);
return
res
.
render
(
"/"
,{
client_id
:
CLIENT_ID
,
});
}
else
{
console
.
log
(
"새로운 PREFERENCE데이터 입력"
);
}
...
...
@@ -207,7 +211,9 @@ router.get("/map", function (req, res, next) {
if
(
req
.
session
.
user
)
{
res
.
render
(
"map"
,
{
user
:
req
.
session
.
user
});
}
else
{
res
.
render
(
"/"
);
res
.
render
(
"/"
,{
client_id
:
CLIENT_ID
,
});
}
});
...
...
sessions/e7kjBCXJobyGW1wzonYQ38C7nEs40uU6.json
View file @
d2294b0
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1622994774019
,
"user"
:{
"email"
:
"cjm104174@gmail.com"
,
"picture"
:
"https://lh3.googleusercontent.com/a-/AOh14Gh3nytGsPbviGhkznR8HIwrL6o7xBIoFL08nIeU=s96-c"
,
"nickname"
:
"Mayf"
,
"age"
:
25
,
"gender"
:
"male"
}}
\ No newline at end of file
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"__lastAccess"
:
1622998584246
,
"user"
:{
"email"
:
"cjm104174@gmail.com"
,
"picture"
:
"https://lh3.googleusercontent.com/a-/AOh14Gh3nytGsPbviGhkznR8HIwrL6o7xBIoFL08nIeU=s96-c"
,
"nickname"
:
"Mayf"
,
"age"
:
25
,
"gender"
:
"male"
}}
\ No newline at end of file
...
...
views/index.ejs
View file @
d2294b0
...
...
@@ -3,9 +3,9 @@
<head>
<meta
charset=
"UTF-8"
>
<script
src=
"https://apis.google.com/js/platform.js"
async
defer
></script>
<meta
name=
"google-signin-client_id"
content=
"94679084723-s5f0686p2porp9mkakrp1p89a48n24nj.apps.googleusercontent.com"
>
<meta
name=
"google-signin-client_id"
content=
<%=client_id%
>
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
first
</title>
<title>
Cafe Map
</title>
<link
rel=
"stylesheet"
href=
"stylesheets/bootstrap.css"
>
<link
href=
"https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@700&display=swap"
rel=
"stylesheet"
>
...
...
@@ -39,20 +39,12 @@
<body>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
>
<a
class=
"navbar-brand"
href=
"/"
><img
src=
"images/home.png"
width=
"40"
height=
"40"
alt=
""
>
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarSupportedContent"
aria-controls=
"navbarSupportedContent"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
><strong>
Home
</strong></a>
<ul
class=
"navbar-nav mr-auto mt-2 mt-lg-0"
>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
style=
"color:#ffffff"
href=
"/"
onclick=
"signOut();"
>
Logout
<span
class=
"sr-only"
>
(current)
</span></a>
</li>
</ul>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
</div>
</nav>
<br><br>
...
...
views/login.ejs
View file @
d2294b0
...
...
@@ -4,7 +4,7 @@
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
logined
</title>
<title>
Sign Up
</title>
<link
rel=
"stylesheet"
href=
"stylesheets/bootstrap.css"
/>
<link
...
...
@@ -32,22 +32,15 @@
h5
{
font-family
:
"Noto Sans KR"
,
sans-serif
;
}
.middle
{
display
:
inline-block
;
vertical-align
:
middle
;
}
</style>
</head>
<body>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
>
<a
class=
"navbar-brand"
href=
"/"
><img
src=
"images/home.png"
width=
"40"
height=
"40"
alt=
""
/>
</a>
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarSupportedContent"
aria-controls=
"navbarSupportedContent"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
><strong>
Home
</strong></a>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
<ul
class=
"navbar-nav mr-auto mt-2 mt-lg-0"
>
<li
class=
"nav-item active"
>
<a
class=
"nav-link"
style=
"color: #ffffff"
href=
"/"
onclick=
"signOut();"
>
Logout
<span
class=
"sr-only"
>
(current)
</span></a>
...
...
views/map.ejs
View file @
d2294b0
...
...
@@ -4,9 +4,6 @@
<link
rel=
"stylesheet"
href=
"stylesheets/bootstrap.css"
/>
<title>
Cafe Map
</title>
<style>
.navbar
{
background-color
:
#1d2124
!important
;
}
.btn-primary
{
color
:
white
!important
;
}
...
...
@@ -98,9 +95,6 @@
</head>
<body>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
>
<a
class=
"navbar-brand"
href=
"/"
><img
src=
"images/home.png"
width=
"40"
height=
"40"
alt=
""
/>
</a>
<button
class=
"navbar-toggler"
type=
"button"
...
...
@@ -113,7 +107,7 @@
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
><strong>
Home
</strong></a>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
<ul
class=
"navbar-nav mr-auto mt-2 mt-lg-0"
>
<li
class=
"nav-item active"
>
<a
...
...
@@ -219,7 +213,7 @@
var
mapContainer
=
document
.
getElementById
(
"map"
),
mapOption
=
{
center
:
new
kakao
.
maps
.
LatLng
(
36.2477502
,
127.078164
),
level
:
3
,
level
:
12
,
};
var
map
=
new
kakao
.
maps
.
Map
(
mapContainer
,
mapOption
);
var
ps
=
new
kakao
.
maps
.
services
.
Places
(
map
);
...
...
views/review.ejs
View file @
d2294b0
...
...
@@ -28,17 +28,11 @@
h5
{
font-family
:
"Noto Sans KR"
,
sans-serif
;
}
.middle
{
display
:
inline-block
;
vertical-align
:
middle
;
}
</style>
</head>
<body>
<nav
class=
"navbar navbar-expand-lg navbar-dark bg-dark"
>
<a
class=
"navbar-brand"
href=
"/"
><img
src=
"/images/home.png"
width=
"40"
height=
"40"
alt=
""
/>
</a>
<button
class=
"navbar-toggler"
type=
"button"
...
...
@@ -51,7 +45,7 @@
<span
class=
"navbar-toggler-icon"
></span>
</button>
<div
class=
"collapse navbar-collapse"
id=
"navbarSupportedContent"
>
<a
class=
"navbar-brand"
href=
"/"
><strong>
Home
</strong></a>
<a
class=
"navbar-brand"
href=
"/"
style=
"margin-left: 10px"
><strong>
Home
</strong></a>
</div>
</nav>
...
...
Please
register
or
login
to post a comment