Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified flask-server/__pycache__/database.cpython-311.pyc
Binary file not shown.
Binary file modified flask-server/__pycache__/database.cpython-39.pyc
Binary file not shown.
42 changes: 28 additions & 14 deletions flask-server/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from flask import Flask, render_template, request, redirect, url_for
from flask import *
from database import DBhandler
import sys

from json import *
from flask_cors import CORS, cross_origin
import numpy as np


app = Flask(__name__)
Expand All @@ -10,12 +12,12 @@

DB.__init__()


@app.route("/")
def index():
return render_template("index.html")
#return redirect(url_for('view_2'))

def refresh(site):
return redirect

@app.route("/CreateStore", methods=['GET', 'POST'])
def Submit_store():
Expand Down Expand Up @@ -108,20 +110,32 @@ def Submit_Review():
if DB.insert_review(data['username'], data, img_file.filename):
return render_template("result_review.html", result = data, img_path="static/img/"+img_file.filename)




@app.route("/StoreListView")
def list_stores():
return render_template("StoreListView.html")


if __name__ == "__main__":
app.run(host='0.0.0.0', debug=True)

@app.route('/StoreListView', methods=['GET','POST'])

'''
@app.route("/StoreListView")
def list_stores():
data = DB.get_stores()
tot_count = len(data)
storedata = DB.get_stores().items
storedatas = list(storedata)
print(storedata, type(storedatas))
tot_count = len(storedata) #리스트 길이 반환

return render_template("index.html", datas=data.items(), total=tot_count())
return storedata

@app.route('/StoreListView')
def users():
return {"members" : [{"id" : 1, "name" : "yerin"},
{ "id" : 2, "name" : "dalkong"}]}
'''
@app.route("/StoreListView",methods=['GET','POST'])
def view_storelist(store_id):
return render_template("index.html")
'''

if __name__ == "__main__":
app.run(host='0.0.0.0', debug=True)

4 changes: 3 additions & 1 deletion flask-server/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def store_duplicate_check(self, name):

#맛집 정보 가져오는 함수(StoreListView에서 사용)
def get_stores(self):
stores = self.db.child("STORE").get.val()
stores = self.db.child("STORE").get().val()
#print(stores)
return stores



Expand Down
145 changes: 145 additions & 0 deletions flask-server/static/css/Contents.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
:root {
--ewhagreen: rgb(0, 70, 42);
--grayborder: 1px solid #d2d2d2;
}

.outer {
text-align: center;
}

.pane {
display: inline-block;
width: 50%;
border: var(--grayborder);
margin: 10px;
background-color: rgb(255, 255, 255);
}

#paneName {
font-size: 30px;
font-weight: 400;
text-align: left;
padding: 25px;
padding-left: 70px;
border-bottom: var(--grayborder);
vertical-align: middle;
}

.editPane{
text-align: left;
padding: 15px;
padding-left: 100px;
border-bottom: var(--grayborder);
}

.editPane > span {
margin-right: 15px;
}

.button {
display: inline-block;

width: 130px;

padding: 12px;
padding-left: 15px;
padding-right: 15px;
background-color: var(--ewhagreen);
border: 0px;
border-radius: 14px;

color: white;
font-size: 15px;
font: bold;

margin: 2px;
}

.menuPane{
padding: 30px;
padding-left: 60px;
padding-right: 60px;
}

.image {
float: center;
width:50%;
border: var(--grayborder);
}


/*info */

.info {
font-size: 16px;
float: left;
width: 50%;
text-align: left;
line-height: 200%;
padding: 30px;
padding-left: 100px;
padding-top: 0px;
}


.map {
clear: both;
margin-bottom: 10px;
}

.StoreName {
position: relative;
top: 30px;
font-size: 30px;
font-weight: 600;

}

.storelocation {
position: relative;
top: 50px;
font-size: 20px;

}

.locationimg {
position: relative;
}

.locationtext {
position: relative;
top: -23px;
left: 15px;
font-size: 10px;
color: rgb(120, 120, 120);
}

.Tag {
position: relative;
bottom: -13px;
font-size: 13px;
font-weight: 800;
}

.heart {
position: relative;
top: 15px;
}

.heartimg {}

.heartnum {
position: relative;
font-size: 13px;
font-weight: 800;
top: -24px;
left: 24px;
}

.reviewnum {
position: relative;
font-size: 13px;
font-weight: 800;
right: 50px;
top: -27px;
}
119 changes: 119 additions & 0 deletions flask-server/static/css/Header.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
:root {
--ewhagreen: rgb(0, 70, 42);
}

/* *{
font-family: 'a드림고딕2';
} */

a {
text-decoration: none;
/*링크 밑줄 제거*/
color: inherit;
/*링크 색상 제거*/
}

header {
display: flex;
min-width: 1400px;
justify-content: space-between;
padding-bottom: 15px;
padding-top: 15px;
/* position:sticky;
top: 0;
left: 0;
right: 0; */
background-color: white;
align-items: center;
}

.logotitle {
display: flex;
align-items: center;
}

.hometitle {
margin-left: 10px;
font-weight: 600;
font-size: 15px;
color: var(--ewhagreen);
}

.hometitle:hover {}

.signInUp {
display: flex;
float: right;
top: 25px;
align-items: center
}

.signInUp a {
margin-left: 10px;
position: relative;
margin-right: 50px;
font-size: 15px;
font-weight: 600;
}

.signInUp a:hover {
color: #01c9ca;
}

.signInUp a:before {
content: '';
position: absolute;
bottom: 0;
left: 0;
display: block;
width: 100%;
height: 1px;
background: #000;
transform: scale(0);
transition: all 0.2s;
}

.signInUp a:hover:before {
background: #01c9ca;
transform: scale(1);
}

#homelogo {
display: flex;
width: 50px;
height: 50px;
margin-left: 30px;
}

/* 네비게이션 바 */

nav {
justify-content: center;
color: white;
background-color: var(--ewhagreen);
/* background-color: rgb(77, 107, 91); */
height: 62.5px;
min-width: 1400px;
}

nav .pageName {
font: 25px bolder;
/* margin-left: 30px; */

}

nav link {
/* padding-left: 20px;
padding-right: 20px; */
/* border-right: 1px solid white; */
font-size: 15px;
float: right;
/* margin-top:10px; */
padding-top: 20px;
padding-bottom: 20px;
width: 150px;
}

nav a:hover {
background-color: rgb(116, 139, 107);
}
Loading