diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..6e70e2f --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn project:app diff --git a/README.md b/README.md index edb373b..2ffefef 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This is a complete seed app project with: Flask, SQLAlchemy, Bootstrap, jQuery. You will need to fork this repo and then start working on your own project. - +// ### 1. Fork the repo 1. Select a person in your group responsible for git management diff --git a/bootstrap.html b/bootstrap.html new file mode 100644 index 0000000..96d2ce6 --- /dev/null +++ b/bootstrap.html @@ -0,0 +1,19 @@ + + + + Bootstrap Example + + + + + + + + +
+

My First Bootstrap Page

+

This is some text.

+
+ + + \ No newline at end of file diff --git a/project/__init__.py b/project/__init__.py index 578e39a..8edd766 100644 --- a/project/__init__.py +++ b/project/__init__.py @@ -25,7 +25,6 @@ def load_user(user_id): app.register_blueprint(users_bp) - # General views from . import views diff --git a/project/forms.py b/project/forms.py index 5c9b1e4..bd703db 100644 --- a/project/forms.py +++ b/project/forms.py @@ -4,12 +4,13 @@ class RegisterForm(Form): - username = StringField('Username', validators=[DataRequired(), Length(max=40)]) + email = StringField('Email Address', validators=[DataRequired(), Length(max=40)]) + name = StringField('Full Name', validators=[DataRequired(), Length(max=80)]) password = PasswordField('Password', validators=[DataRequired(), Length(max=40)]) confirm = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')]) class LoginForm(Form): - username = StringField('Username', validators=[DataRequired(), Length(max=40)]) + email = StringField('Email Address', validators=[DataRequired(), Length(max=40)]) password = PasswordField('Password', validators=[DataRequired(), Length(max=40)]) diff --git a/project/models.py b/project/models.py index f666019..263e616 100644 --- a/project/models.py +++ b/project/models.py @@ -1,5 +1,7 @@ from project import db +from flask import request, redirect, Flask, render_template +from flask_sqlalchemy import SQLAlchemy from flask_login import UserMixin from werkzeug.security import check_password_hash, generate_password_hash @@ -8,13 +10,33 @@ class User(UserMixin, db.Model): __tablename__ = "users" - id = db.Column(db.Integer, primary_key=True, autoincrement=True) - username = db.Column(db.String, unique=True, nullable=False) - password_hash = db.Column(db.String, nullable=False) + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + email = db.Column(db.String, unique=True, nullable=False) + password_hash = db.Column(db.String, nullable=False) + name = db.Column(db.String, nullable=False) + is_storyteller = db.Column(db.Boolean, nullable=False) + birthday = db.Column(db.String, nullable=True) + country = db.Column(db.String, nullable=True) + profession = db.Column(db.String, nullable=True) + city = db.Column(db.String, nullable=True) + number = db.Column(db.String, nullable=True) + bio = db.Column(db.String, nullable=True) + about = db.Column(db.String, nullable=True) + profile_img = db.Column(db.String, nullable=True) + reason = db.Column(db.String, nullable=True) - def __init__(self, username, password): - self.username = username + def __init__(self, email,name,password, birthday='', country='', is_storyteller='',profession='', city='', number='', bio='', about=''): + self.email = email self.set_password(password) + self.name = name + self.birthday = birthday + self.country = country + self.is_storyteller = is_storyteller + self.profession = profession + self.city = city + self.number = number + self.bio = bio + self.about = about def set_password(self, password): self.password_hash = generate_password_hash(password) @@ -23,14 +45,134 @@ def check_password(self, password): return check_password_hash(self.password_hash, password) def __repr__(self): - return 'User %d %s' % (self.id, self.username) + return 'User %d %s' % (self.id, self.email) +class Journey(UserMixin, db.Model): -# TODO: Create your other models here -class YourModel(db.Model): - - __tablename__ = "yourmodel" + __tablename__ = "journey" + + + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + creator_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + title = db.Column(db.String, nullable=False) + description = db.Column(db.String, nullable=False) + location = db.Column(db.String, nullable=False) + duration = db.Column(db.String, nullable=False) + category = db.Column(db.String, nullable=False) + requirements = db.Column(db.String, nullable=False) + people_range = db.Column(db.String, nullable=False) + price = db.Column(db.String, nullable=False) + picture = db.Column(db.String, nullable=False) + + + def __init__(self, creator_id='', title='', description='', location='', duration='', category='', requirements='', people_range='', picture='', price=''): + self.creator_id = creator_id + self.title = title + self.description = description + self.location = location + self.duration = duration + self.category = category + self.requirements = requirements + self.people_range = people_range + self.picture = picture + self.price = price + + + def __repr__(self): + return 'Journey %d %s' % (self.id, self.title) + + + +class Ratings(UserMixin, db.Model): + __tablename__ = "ratings" + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False) + user = db.Column(db.String(30), nullable= False) + stars = db.Column(db.Integer, nullable = False) + title = db.Column(db.String(30), nullable= False) + review = db.Column(db.String(30), nullable= False) + time = db.Column(db.String(80), nullable = False) + journey = db.relationship(Journey) + + def __init__(self, journey_id='', user='', stars='', title='', review=''): + self.journey_id =journey_id + self.user = user + self.stars = stars + self.title = title + self.review = review +############# I DIDN'T DO SELF TIME BUT IT WORKED SO I JUST LEFT IT ##################### + + def __repr__(self): + return 'Ratings %r %s %r %s %r %s' % (self.id, self.title, self.journey_id, self.user, self.stars ,self.review) + + +class Notification(db.Model): + __tablename__ = "notification" + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + st_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + interested_user_id = db.Column(db.Integer, db.ForeignKey('users.id') ,nullable=False) + journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False) + + st = db.relationship("User", foreign_keys="Notification.st_id") + user = db.relationship("User", foreign_keys="Notification.interested_user_id") + journey = db.relationship("Journey", foreign_keys="Notification.journey_id") + interested_user_name = db.Column(db.String(30), nullable= False) + journey_title = db.Column(db.String(30), nullable= False) + time = db.Column(db.String(80), nullable = False) + + + def __init__(self, st_id='', journey_id='', interested_user_id='', interested_user_name='', journey_title='', time=''): + self.st_id = st_id + self.journey_id = journey_id + self.interested_user_id = interested_user_id + self.interested_user_name = interested_user_name + self.journey_title = journey_title + self.time = time + + def __repr__(self): + return 'Notification %r %r %r %r' % (self.id, self.st_id, self.journey_id, self.interested_user_id) + + +class Wishlist(db.Model): + __tablename__ = "wishlist" + id = db.Column(db.Integer, primary_key=True, autoincrement=True) + user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False) + journey_title = db.Column(db.String(30), nullable= False) + + def __init__(self, user_id='', journey_id='', journey_title=''): + self.user_id = user_id + self.journey_id = journey_id + self.journey_title = journey_title + + def __repr__(self): + return 'Wishlist %r %r' % (self.id, self.user_id, self.journey_id) + + +class Question(db.Model): id = db.Column(db.Integer, primary_key=True, autoincrement=True) + journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False) + user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False) + title = db.Column(db.String(30), nullable = False) + question = db.Column(db.String(80), nullable = False) + time = db.Column(db.String(80), nullable = False) + # reply = db.relationship('Reply', backref='question') + + def __init__(self, journey_id='',user_id='', title='', question='', time=''): + self.journey_id = user_id + self.user_id = user_id + self.title = title + self.question = question + self.time = time + + + def __repr__(self): + return '' % self.title + + + + +# db.drop_all() +# db.create_all() - # fill in the rest of your fields and methods! diff --git a/project/static/css/boat-daylight-forest-675763.jpg b/project/static/css/boat-daylight-forest-675763.jpg new file mode 100644 index 0000000..f1a4e26 Binary files /dev/null and b/project/static/css/boat-daylight-forest-675763.jpg differ diff --git a/project/static/css/boat.jpg b/project/static/css/boat.jpg new file mode 100644 index 0000000..f1a4e26 Binary files /dev/null and b/project/static/css/boat.jpg differ diff --git a/project/static/css/image1.png b/project/static/css/image1.png new file mode 100644 index 0000000..9f1cbcc Binary files /dev/null and b/project/static/css/image1.png differ diff --git a/project/static/css/loginn.css b/project/static/css/loginn.css new file mode 100644 index 0000000..e69de29 diff --git a/project/static/css/profile.png b/project/static/css/profile.png new file mode 100644 index 0000000..64ca7b8 Binary files /dev/null and b/project/static/css/profile.png differ diff --git a/project/static/css/style.css b/project/static/css/style.css index 768081a..955a95a 100644 --- a/project/static/css/style.css +++ b/project/static/css/style.css @@ -1,3 +1,454 @@ -h1 { - color: blue; -} \ No newline at end of file + +.body1{ + background-image: url("image1.png"); + height: 100%; +} +.apply-img{ + background-image: url("image1.png"); + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} + +.browse-parallax { + /* The image used */ + background-image: url("boat.jpg"); + + /* Set a specific height */ + height: 500px; + + /* Create the parallax scrolling effect */ + background-attachment: fixed; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} +.profile-parallax { + /* The image used */ + background-image: url("profile.png"); + + /* Set a specific height */ + height: 500px; + + /* Create the parallax scrolling effect */ + background-attachment: fixed; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} + + + +.journey-cont { + + position: relative; + text-align: center; + color: black; + font-size: 14px; +} + +.journey-img{ + + width:300px ; + height:200px; + -webkit-filter: brightness(1); + filter: brightness(1); +} + +.browse-img{ + background-image: url("{{ url_for('static', filename='pictures/boat.jpg') }}"); + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} + +.fixed-bg { + background-attachment: fixed; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} + +.cover { + /* The image used */ + /* Set a specific height */ + /* Create the parallax scrolling effect */ + background-attachment: fixed; + background-position: center; + background-repeat: no-repeat; + background-size: auto; +} +.row{ + width: 100% + +} + + +.navbar-inner { + background-color:transparent; + color:white; + font: normal 25px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; ; + +} + +.nav-option-border { + border-right: 2px solid white; +} + +.guy{ + right: 0px; +} + +.button2 { + + background-color: #1C6E8C; + + border: none; + + color: white; + + padding: 6px 60px; + + text-align: center; + + text-decoration: none; + + display: inline-block; + + font-size: 20px; + + cursor: pointer; + +}.container { + width: 70%; + height: 90px; + margin: 0 auto; + background-color: rgba(0,0,0,0.1); + border-radius:3px; +} + + +.input { + position: relative; + left: 20px; + display: inline-block; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + padding: 10px 20px; + border: 2px solid white; + -webkit-border-radius: 10px; + border-radius: 10px; + font: normal 16px/normal Arial; + color: white; + -o-text-overflow: clip; + text-overflow: clip; + background: rgba(255,255,255,0.1); + -webkit-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1); + -moz-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1); + -o-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1); + transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1); +} + +.head1 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 60px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: white; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +} +.head2 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 60px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: black; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +} + +.head3 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 30px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: black; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +} + +.head4 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 20px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: black; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +/* float: left;*/ +} + +.head5 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 15px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: black; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + /*float: left*/; +} + +.head6 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 15px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: black; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + float: left; +} + +.head7 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 20px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: #3399ff; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; +/* float: left;*/ +} + +.div1 { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + width: 900px; + + padding: 20px; + overflow: hidden; + -webkit-border-radius: 6px; + border-radius: 1px; + font:normal 20px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif; + color: white; + text-align: center; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + background:rgba(400,400,400,0.0); + + + text-shadow: 1px 1px 1px rgba(0,0,0,0.2) ; + +} + +.div2{ + background:rgba(400,400,400,0.0); + border-radius:7px; +} + +.div3{ + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + width: 900px; + + padding: 20px; + overflow: hidden; + -webkit-border-radius: 6px; + border-radius: 1px; + font:normal 20px/1 Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif; + color: white; + text-align: left; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + background:rgba(400,400,400,0.0); + + + text-shadow: 1px 1px 1px rgba(0,0,0,0.2) ; + +} + +.button2s { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + padding: 10px 20px; + border: 2px solid black; + -webkit-border-radius: 10px; + border-radius: 30px; + font: normal 16px/normal Arial,bold; + color: black; + background:white; + + +} + +.words { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + border: none; + font: normal 24px/normal Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: white; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + display: inline-block; + text-align: right; + width: 180px; +} + +.typewriter{ + position: absolute; + top: 200px; + left: 75px; +} +.typewriter h1 { + overflow: hidden; /* Ensures the content is not revealed until the animation */ + border-right: .15em solid orange; + color:white;/* The typwriter cursor */ + white-space: nowrap; /* Keeps the content on a single line */ + margin: 0 auto; /* Gives that scrolling effect as the typing happens */ + letter-spacing: .15em; /* Adjust as needed */ + animation: + typing 2.5s steps(40, end), + blink-caret .75s step-end infinite, + blink-caret infinite; + +} + +/* The typing effect */ +@keyframes typing { + from { width: 0 } + to { width: 100% } + +} + +/* The typewriter cursor effect */ +@keyframes blink-caret { + from, to { border-color: transparent } + 50% { border-color: orange; } +} + + +/*browse view details button design +*/ +.myButton { + -moz-box-shadow: 0px 10px 14px -7px #276873; + -webkit-box-shadow: 0px 10px 14px -7px #276873; + box-shadow: 0px 10px 14px -7px #276873; + background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #dbf5ff), color-stop(1, #408c99)); + background:-moz-linear-gradient(top, #dbf5ff 5%, #408c99 100%); + background:-webkit-linear-gradient(top, #dbf5ff 5%, #408c99 100%); + background:-o-linear-gradient(top, #dbf5ff 5%, #408c99 100%); + background:-ms-linear-gradient(top, #dbf5ff 5%, #408c99 100%); + background:linear-gradient(to bottom, #dbf5ff 5%, #408c99 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dbf5ff', endColorstr='#408c99',GradientType=0); + background-color:#dbf5ff; + -moz-border-radius:9px; + -webkit-border-radius:9px; + border-radius:9px; + border:2px solid white; + display:inline-block; + cursor:pointer; + color:#ffffff; + font-family:new roman; + + font-size:20px; + font-weight:bold; + padding:12px 28px; + text-decoration:none; + text-shadow:0px 1px 50px #528da1; +} +.myButton:hover { + background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #408c99), color-stop(1, #dbf5ff)); + background:-moz-linear-gradient(top, #408c99 5%, #dbf5ff 100%); + background:-webkit-linear-gradient(top, #408c99 5%, #dbf5ff 100%); + background:-o-linear-gradient(top, #408c99 5%, #dbf5ff 100%); + background:-ms-linear-gradient(top, #408c99 5%, #dbf5ff 100%); + background:linear-gradient(to bottom, #408c99 5%, #dbf5ff 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#408c99', endColorstr='#dbf5ff',GradientType=0); + background-color:#408c99; +} +.myButton:active { + position:relative; + top:1px; +} + +.limit{ + position: absolute; + left: 65px; + text-align: left; + width:200px; + word-wrap: break-word; +} + + + +.bg_blue{ + background-color: #3399ff /*#99ccff*/; + width: 1000px; + height: 1600px; + position: relative; + top:-220px; + border-color: white; + border-width: 9px; + border-radius: 3px; +} + + +.bg_blue1{ + background-color: #3399ff /*#99ccff*/; + width: 1000px; + height:3200px; + position: relative; + left: 100px; + top:-220px; + border-color: white; + border-width: 9px; + border-radius: 3px; +} + +.bg_blue2{ + background-color: #99ccff /*#99ccff*/; + width: 500px; + height: 1600px; + position: relative; + left: 650px; + top:-500px; + border-color: white; + border-width: 9px; + border-radius: 3px; +} +.bio{ + font: normal 24px/normal Avantgarde, TeX Gyre Adventor, URW Gothic L, sans-serif,bold; + color: white; + position: relative; + left: 20px; +} + +.i2{ + background-color: rgb(0,0,0,0.1); + color: black; +} + +.leftpad{ + padding-left: 50px; +} + +.toppad{ + padding-top: 30px; +} + diff --git a/project/static/css/w3-style.css b/project/static/css/w3-style.css new file mode 100644 index 0000000..fa7c6f7 --- /dev/null +++ b/project/static/css/w3-style.css @@ -0,0 +1,231 @@ +/* W3.CSS 4.10 February 2018 by Jan Egil and Borge Refsnes */ +html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} +/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ +html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} +article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block} +audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} +audio:not([controls]){display:none;height:0}[hidden],template{display:none} +a{background-color:transparent;-webkit-text-decoration-skip:objects} +a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} +dfn{font-style:italic}mark{background:#ff0;color:#000} +small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden} +code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} +button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold} +button,input{overflow:visible}button,select{text-transform:none} +button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button} +button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0} +button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText} +fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} +legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} +[type=checkbox],[type=radio]{padding:0} +[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} +[type=search]{-webkit-appearance:textfield;outline-offset:-2px} +[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none} +::-webkit-input-placeholder{color:inherit;opacity:0.54} +::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} +/* End extract */ +html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden} +h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.w3-serif{font-family:serif} +h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px} +hr{border:0;border-top:1px solid #eee;margin:20px 0} +.w3-image{max-width:100%;height:auto}img{vertical-align:middle}a{color:inherit} +.w3-table,.w3-table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.w3-table-all{border:1px solid #ccc} +.w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #ddd}.w3-striped tbody tr:nth-child(even){background-color:#f1f1f1} +.w3-table-all tr:nth-child(odd){background-color:#fff}.w3-table-all tr:nth-child(even){background-color:#f1f1f1} +.w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center} +.w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} +.w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px} +.w3-btn,.w3-button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} +.w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} +.w3-btn,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.w3-disabled,.w3-btn:disabled,.w3-button:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none} +.w3-btn.w3-disabled:hover,.w3-btn:disabled:hover{box-shadow:none} +.w3-badge,.w3-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%} +.w3-ul{list-style-type:none;padding:0;margin:0}.w3-ul li{padding:8px 16px;border-bottom:1px solid #ddd}.w3-ul li:last-child{border-bottom:none} +.w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block} +.w3-ripple:active{opacity:0.5}.w3-ripple{transition:opacity 0s} +.w3-input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%} +.w3-select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc} +.w3-dropdown-click,.w3-dropdown-hover{position:relative;display:inline-block;cursor:pointer} +.w3-dropdown-hover:hover .w3-dropdown-content{display:block} +.w3-dropdown-hover:first-child,.w3-dropdown-click:hover{background-color:#ccc;color:#000} +.w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000} +.w3-dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1} +.w3-check,.w3-radio{width:24px;height:24px;position:relative;top:6px} +.w3-sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} +.w3-bar-block .w3-dropdown-hover,.w3-bar-block .w3-dropdown-click{width:100%} +.w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} +.w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} +.w3-main,#main{transition:margin-left .4s} +.w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} +.w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} +.w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} +.w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} +.w3-bar .w3-dropdown-hover,.w3-bar .w3-dropdown-click{position:static;float:left} +.w3-bar .w3-button{white-space:normal} +.w3-bar-block .w3-bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0} +.w3-bar-block.w3-center .w3-bar-item{text-align:center}.w3-block{display:block;width:100%} +.w3-responsive{display:block;overflow-x:auto} +.w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before, +.w3-cell-row:before,.w3-cell-row:after,.w3-clear:after,.w3-clear:before,.w3-bar:before,.w3-bar:after{content:"";display:table;clear:both} +.w3-col,.w3-half,.w3-third,.w3-twothird,.w3-threequarter,.w3-quarter{float:left;width:100%} +.w3-col.s1{width:8.33333%}.w3-col.s2{width:16.66666%}.w3-col.s3{width:24.99999%}.w3-col.s4{width:33.33333%} +.w3-col.s5{width:41.66666%}.w3-col.s6{width:49.99999%}.w3-col.s7{width:58.33333%}.w3-col.s8{width:66.66666%} +.w3-col.s9{width:74.99999%}.w3-col.s10{width:83.33333%}.w3-col.s11{width:91.66666%}.w3-col.s12{width:99.99999%} +@media (min-width:601px){.w3-col.m1{width:8.33333%}.w3-col.m2{width:16.66666%}.w3-col.m3,.w3-quarter{width:24.99999%}.w3-col.m4,.w3-third{width:33.33333%} +.w3-col.m5{width:41.66666%}.w3-col.m6,.w3-half{width:49.99999%}.w3-col.m7{width:58.33333%}.w3-col.m8,.w3-twothird{width:66.66666%} +.w3-col.m9,.w3-threequarter{width:74.99999%}.w3-col.m10{width:83.33333%}.w3-col.m11{width:91.66666%}.w3-col.m12{width:99.99999%}} +@media (min-width:993px){.w3-col.l1{width:8.33333%}.w3-col.l2{width:16.66666%}.w3-col.l3{width:24.99999%}.w3-col.l4{width:33.33333%} +.w3-col.l5{width:41.66666%}.w3-col.l6{width:49.99999%}.w3-col.l7{width:58.33333%}.w3-col.l8{width:66.66666%} +.w3-col.l9{width:74.99999%}.w3-col.l10{width:83.33333%}.w3-col.l11{width:91.66666%}.w3-col.l12{width:99.99999%}} +.w3-content{max-width:980px;margin:auto}.w3-rest{overflow:hidden} +.w3-cell-row{display:table;width:100%}.w3-cell{display:table-cell} +.w3-cell-top{vertical-align:top}.w3-cell-middle{vertical-align:middle}.w3-cell-bottom{vertical-align:bottom} +.w3-hide{display:none!important}.w3-show-block,.w3-show{display:block!important}.w3-show-inline-block{display:inline-block!important} +@media (max-width:600px){.w3-modal-content{margin:0 10px;width:auto!important}.w3-modal{padding-top:30px} +.w3-dropdown-hover.w3-mobile .w3-dropdown-content,.w3-dropdown-click.w3-mobile .w3-dropdown-content{position:relative} +.w3-hide-small{display:none!important}.w3-mobile{display:block;width:100%!important}.w3-bar-item.w3-mobile,.w3-dropdown-hover.w3-mobile,.w3-dropdown-click.w3-mobile{text-align:center} +.w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}} +@media (max-width:768px){.w3-modal-content{width:500px}.w3-modal{padding-top:50px}} +@media (min-width:993px){.w3-modal-content{width:900px}.w3-hide-large{display:none!important}.w3-sidebar.w3-collapse{display:block!important}} +@media (max-width:992px) and (min-width:601px){.w3-hide-medium{display:none!important}} +@media (max-width:992px){.w3-sidebar.w3-collapse{display:none}.w3-main{margin-left:0!important;margin-right:0!important}} +.w3-top,.w3-bottom{position:fixed;width:100%;z-index:1}.w3-top{top:0}.w3-bottom{bottom:0} +.w3-overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} +.w3-display-topleft{position:absolute;left:0;top:0}.w3-display-topright{position:absolute;right:0;top:0} +.w3-display-bottomleft{position:absolute;left:0;bottom:0}.w3-display-bottomright{position:absolute;right:0;bottom:0} +.w3-display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} +.w3-display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} +.w3-display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} +.w3-display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none} +.w3-display-position{position:absolute} +.w3-circle{border-radius:50%} +.w3-round-small{border-radius:2px}.w3-round,.w3-round-medium{border-radius:4px}.w3-round-large{border-radius:8px}.w3-round-xlarge{border-radius:16px}.w3-round-xxlarge{border-radius:32px} +.w3-row-padding,.w3-row-padding>.w3-half,.w3-row-padding>.w3-third,.w3-row-padding>.w3-twothird,.w3-row-padding>.w3-threequarter,.w3-row-padding>.w3-quarter,.w3-row-padding>.w3-col{padding:0 8px} +.w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px} +.w3-code,.w3-codespan{font-family:Consolas,"courier new";font-size:16px} +.w3-code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} +.w3-codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} +.w3-card,.w3-card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)} +.w3-card-4,.w3-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} +.w3-spin{animation:w3-spin 2s infinite linear}@keyframes w3-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} +.w3-animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} +.w3-animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} +.w3-animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} +.w3-animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} +.w3-animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} +.w3-animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} +.w3-animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} +.w3-animate-input{transition:width 0.4s ease-in-out}.w3-animate-input:focus{width:100%!important} +.w3-opacity,.w3-hover-opacity:hover{opacity:0.60}.w3-opacity-off,.w3-hover-opacity-off:hover{opacity:1} +.w3-opacity-max{opacity:0.25}.w3-opacity-min{opacity:0.75} +.w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)} +.w3-greyscale,.w3-grayscale{filter:grayscale(75%)}.w3-greyscale-min,.w3-grayscale-min{filter:grayscale(50%)} +.w3-sepia{filter:sepia(75%)}.w3-sepia-max,.w3-hover-sepia:hover{filter:sepia(100%)}.w3-sepia-min{filter:sepia(50%)} +.w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important} +.w3-xlarge{font-size:24px!important}.w3-xxlarge{font-size:36px!important}.w3-xxxlarge{font-size:48px!important}.w3-jumbo{font-size:64px!important} +.w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important} +.w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important} +.w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important} +.w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important} +.w3-topbar{border-top:6px solid #ccc!important}.w3-bottombar{border-bottom:6px solid #ccc!important} +.w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important} +.w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important} +.w3-margin{margin:16px!important}.w3-margin-top{margin-top:16px!important}.w3-margin-bottom{margin-bottom:16px!important} +.w3-margin-left{margin-left:16px!important}.w3-margin-right{margin-right:16px!important} +.w3-padding-small{padding:4px 8px!important}.w3-padding{padding:8px 16px!important}.w3-padding-large{padding:12px 24px!important} +.w3-padding-16{padding-top:16px!important;padding-bottom:16px!important}.w3-padding-24{padding-top:24px!important;padding-bottom:24px!important} +.w3-padding-32{padding-top:32px!important;padding-bottom:32px!important}.w3-padding-48{padding-top:48px!important;padding-bottom:48px!important} +.w3-padding-64{padding-top:64px!important;padding-bottom:64px!important} +.w3-left{float:left!important}.w3-right{float:right!important} +.w3-button:hover{color:#000!important;background-color:#ccc!important} +.w3-transparent,.w3-hover-none:hover{background-color:transparent!important} +.w3-hover-none:hover{box-shadow:none!important} +/* Colors */ +.w3-amber,.w3-hover-amber:hover{color:#000!important;background-color:#ffc107!important} +.w3-aqua,.w3-hover-aqua:hover{color:#000!important;background-color:#00ffff!important} +.w3-blue,.w3-hover-blue:hover{color:#fff!important;background-color:#2196F3!important} +.w3-light-blue,.w3-hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} +.w3-brown,.w3-hover-brown:hover{color:#fff!important;background-color:#795548!important} +.w3-cyan,.w3-hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} +.w3-blue-grey,.w3-hover-blue-grey:hover,.w3-blue-gray,.w3-hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important} +.w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#4CAF50!important} +.w3-light-green,.w3-hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} +.w3-indigo,.w3-hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} +.w3-khaki,.w3-hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} +.w3-lime,.w3-hover-lime:hover{color:#000!important;background-color:#cddc39!important} +.w3-orange,.w3-hover-orange:hover{color:#000!important;background-color:#ff9800!important} +.w3-deep-orange,.w3-hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} +.w3-pink,.w3-hover-pink:hover{color:#fff!important;background-color:#e91e63!important} +.w3-purple,.w3-hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} +.w3-deep-purple,.w3-hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} +.w3-red,.w3-hover-red:hover{color:#fff!important;background-color:#f44336!important} +.w3-sand,.w3-hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} +.w3-teal,.w3-hover-teal:hover{color:#fff!important;background-color:#009688!important} +.w3-yellow,.w3-hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} +.w3-white,.w3-hover-white:hover{color:#000!important;background-color:#fff!important} +.w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important} +.w3-grey,.w3-hover-grey:hover,.w3-gray,.w3-hover-gray:hover{color:#000!important;background-color:#9e9e9e!important} +.w3-light-grey,.w3-hover-light-grey:hover,.w3-light-gray,.w3-hover-light-gray:hover{color:#000!important;background-color:#f1f1f1!important} +.w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important} +.w3-pale-red,.w3-hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important} +.w3-pale-green,.w3-hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important} +.w3-pale-yellow,.w3-hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important} +.w3-pale-blue,.w3-hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important} +.w3-text-amber,.w3-hover-text-amber:hover{color:#ffc107!important} +.w3-text-aqua,.w3-hover-text-aqua:hover{color:#00ffff!important} +.w3-text-blue,.w3-hover-text-blue:hover{color:#2196F3!important} +.w3-text-light-blue,.w3-hover-text-light-blue:hover{color:#87CEEB!important} +.w3-text-brown,.w3-hover-text-brown:hover{color:#795548!important} +.w3-text-cyan,.w3-hover-text-cyan:hover{color:#00bcd4!important} +.w3-text-blue-grey,.w3-hover-text-blue-grey:hover,.w3-text-blue-gray,.w3-hover-text-blue-gray:hover{color:#607d8b!important} +.w3-text-green,.w3-hover-text-green:hover{color:#4CAF50!important} +.w3-text-light-green,.w3-hover-text-light-green:hover{color:#8bc34a!important} +.w3-text-indigo,.w3-hover-text-indigo:hover{color:#3f51b5!important} +.w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important} +.w3-text-lime,.w3-hover-text-lime:hover{color:#cddc39!important} +.w3-text-orange,.w3-hover-text-orange:hover{color:#ff9800!important} +.w3-text-deep-orange,.w3-hover-text-deep-orange:hover{color:#ff5722!important} +.w3-text-pink,.w3-hover-text-pink:hover{color:#e91e63!important} +.w3-text-purple,.w3-hover-text-purple:hover{color:#9c27b0!important} +.w3-text-deep-purple,.w3-hover-text-deep-purple:hover{color:#673ab7!important} +.w3-text-red,.w3-hover-text-red:hover{color:#f44336!important} +.w3-text-sand,.w3-hover-text-sand:hover{color:#fdf5e6!important} +.w3-text-teal,.w3-hover-text-teal:hover{color:#009688!important} +.w3-text-yellow,.w3-hover-text-yellow:hover{color:#d2be0e!important} +.w3-text-white,.w3-hover-text-white:hover{color:#fff!important} +.w3-text-black,.w3-hover-text-black:hover{color:#000!important} +.w3-text-grey,.w3-hover-text-grey:hover,.w3-text-gray,.w3-hover-text-gray:hover{color:#757575!important} +.w3-text-light-grey,.w3-hover-text-light-grey:hover,.w3-text-light-gray,.w3-hover-text-light-gray:hover{color:#f1f1f1!important} +.w3-text-dark-grey,.w3-hover-text-dark-grey:hover,.w3-text-dark-gray,.w3-hover-text-dark-gray:hover{color:#3a3a3a!important} +.w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important} +.w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important} +.w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important} +.w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important} +.w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important} +.w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important} +.w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important} +.w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important} +.w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important} +.w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important} +.w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important} +.w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important} +.w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important} +.w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important} +.w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important} +.w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important} +.w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important} +.w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important} +.w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important} +.w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important} +.w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important} +.w3-border-white,.w3-hover-border-white:hover{border-color:#fff!important} +.w3-border-black,.w3-hover-border-black:hover{border-color:#000!important} +.w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important} +.w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#f1f1f1!important} +.w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important} +.w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important} +.w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important} \ No newline at end of file diff --git a/project/static/js/script.js b/project/static/js/script.js index dec5c7d..077f8bc 100644 --- a/project/static/js/script.js +++ b/project/static/js/script.js @@ -1,3 +1,2 @@ $(document).ready(function() { - debugger; }); \ No newline at end of file diff --git a/project/static/pictures/Login_Background.png b/project/static/pictures/Login_Background.png new file mode 100644 index 0000000..081a63b Binary files /dev/null and b/project/static/pictures/Login_Background.png differ diff --git a/project/static/pictures/coverphoto.jpg b/project/static/pictures/coverphoto.jpg new file mode 100644 index 0000000..20752a0 Binary files /dev/null and b/project/static/pictures/coverphoto.jpg differ diff --git a/project/static/pictures/images.jpeg b/project/static/pictures/images.jpeg new file mode 100644 index 0000000..791f5a4 Binary files /dev/null and b/project/static/pictures/images.jpeg differ diff --git a/project/static/pictures/images.jpg b/project/static/pictures/images.jpg new file mode 100644 index 0000000..77451a7 Binary files /dev/null and b/project/static/pictures/images.jpg differ diff --git a/project/static/pictures/logo.jpg b/project/static/pictures/logo.jpg new file mode 100644 index 0000000..5e7b806 Binary files /dev/null and b/project/static/pictures/logo.jpg differ diff --git a/project/static/pictures/profile.png b/project/static/pictures/profile.png new file mode 100644 index 0000000..84dd6ee Binary files /dev/null and b/project/static/pictures/profile.png differ diff --git a/project/static/pictures/register_bg.PNG b/project/static/pictures/register_bg.PNG new file mode 100644 index 0000000..12edcb0 Binary files /dev/null and b/project/static/pictures/register_bg.PNG differ diff --git a/project/static/profile.png b/project/static/profile.png new file mode 100644 index 0000000..822078a Binary files /dev/null and b/project/static/profile.png differ diff --git a/project/templates/add_journey.html b/project/templates/add_journey.html new file mode 100644 index 0000000..be25de4 --- /dev/null +++ b/project/templates/add_journey.html @@ -0,0 +1,87 @@ +
+{% extends "layout.html" %} +{% block content %} +
+ +

Tell Us About Your Journey

+ +
+
+
Title: + +
+ + +
+ +

Tell us about your journey...

+ +
+ + + +

+ +

Locations

+ +
+ + + +

Duration of Journey

+ +
+ + + +

Target Audience

+ +
+ + +
+ +

Requirements

+ +
+ + +

+ +

Number of Participants

+ +
+ + +

+ +

Enter Intended Price

+ +
+ + +

+ +

add image url

+ +
+ + + +



+ + +
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/project/templates/apply.html b/project/templates/apply.html new file mode 100644 index 0000000..f039835 --- /dev/null +++ b/project/templates/apply.html @@ -0,0 +1,65 @@ +
+{% extends "layout.html" %} +{% block content %} +
+







+

Become a Storyteller

+
+ +
+ +


+ +
+


+
+

Emphasis on the Storytellers feelings and experience, not on facts.
How your life story affected you. + Don’t include details that aren’t necessary or interesting, and don’t be repetitive.
+ Talk about a challenge or hardship you overcame.
+ Talk about your desires, dreams,...
+ Try to include something for people to take away from your story: message, life lesson, values, inspiration, etc…
+ Be careful with your words- remember that your listeners may know nothing about your community, culture, or way of living.
What you say is what they know. +

+

+
+ + + + + +

+ + +

+ + +

+ + +

+ + +

+ + + +

+ + + +

+ + +
+
+ + + +
+ + +
+ + + +{% endblock %} \ No newline at end of file diff --git a/project/templates/browse.html b/project/templates/browse.html new file mode 100644 index 0000000..2c55613 --- /dev/null +++ b/project/templates/browse.html @@ -0,0 +1,79 @@ +
+{% extends "layout.html" %} +{% block content %} + + + +
+

Welcome To Roots {{current_user.name}}

+
+ +
+ + +
+
+



+
+ + {% for i in range(all_journeys|length) %} + + + +
+
+
+
+
+ + + + + +
+
+
+

{{ all_journeys[i].title }}

+

The journey will be at {{ all_journeys[i].location }}

+

This journey would intrest people who are {{ all_journeys[i].category |truncate(15) }}


+
+






+ +
+ + + +
+
+
+ + + {% endfor %} +
+
+
+ + + + + + + + + + + + + + +{% endblock %} diff --git a/project/templates/contact.html b/project/templates/contact.html new file mode 100644 index 0000000..3e7ec81 --- /dev/null +++ b/project/templates/contact.html @@ -0,0 +1,28 @@ +{% extends "layout.html" %} +{% block content %} + + + + + Profile + + + + +{%if user%} + +

{{user.name}}

+

{{user.email}}

+{%if is_user==True%} +

this is your profile

+ Become a Storyteller +{%else%} +

this is not your profile

+{%endif%} +{%endif%} + + + + + +{% endblock %} \ No newline at end of file diff --git a/project/templates/index.html b/project/templates/index.html deleted file mode 100644 index 0eba06c..0000000 --- a/project/templates/index.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -

Hello world!

-{% endblock %} diff --git a/project/templates/journey.html b/project/templates/journey.html new file mode 100644 index 0000000..afdbece --- /dev/null +++ b/project/templates/journey.html @@ -0,0 +1,162 @@ +
+{% extends "layout.html" %} +{% block content %} +
+







+

{{ journey.title }}

+
+
+ + + + + + +
+
+
+ Responsive image + +
+

{{creator.name}}

+

{{creator.bio}}

+
+
+
+ + + +
+

location : {{journey.location}}

+

description : {{journey.description}}

+

duration : {{journey.duration}}

+

price : {{journey.price}}

+

category : {{journey.category}}

+

requirements : {{journey.requirements}}

+

people range : {{journey.people_range}}

+ +
+ {% if current_user.is_authenticated %} + +
+ +
+ {%else%} +
+ +
+ {% endif %} + +
+
+
+
+
+

Reviews of {{ journey.title }}

+ +{% for rating in all_ratings %} + +{{rating.stars}} stars
+{{rating.title}} +By:{{rating.user}}
+{{rating.review}}
+at: {{rating.time}} + +{%endfor%} + +
+
+

Questions about {{journey.title}}

+ +{% for question in all_questions %} +{{question.title}} by {{question.user_id}} at {{question.time}}
+{{question.question}} + +{%endfor%} +
+
+
+
+ + {% if current_user.is_authenticated %} + +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ + + {%else%} + + +
+ + +
+ {% endif %} +
+ +
+ + {% if current_user.is_authenticated %} + + +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + {%else%} +
+
+ +
+ + {% endif %} + +
+
+ + + + +{% endblock %} \ No newline at end of file diff --git a/project/templates/layout.html b/project/templates/layout.html index 25f5f3e..044ee53 100644 --- a/project/templates/layout.html +++ b/project/templates/layout.html @@ -1,17 +1,146 @@ + + - Hello + + Roots - Embrace Diversity + + + - + + + + - - - {% block content %} - {% endblock %} + + + + + + + {% if form %} + + + {% endif %} + + + + + + {% if form %} + + + {% endif %} + + {% block content %} + {% endblock %} \ No newline at end of file diff --git a/project/templates/layout_user.html b/project/templates/layout_user.html new file mode 100644 index 0000000..f81a8c2 --- /dev/null +++ b/project/templates/layout_user.html @@ -0,0 +1,24 @@ + + + + Roots - Embrace Diversity + + + + + + + + + + + + + + current user: {{ current_user.name }} + + + {% block content %} + {% endblock %} + + \ No newline at end of file diff --git a/project/templates/login.html b/project/templates/login.html deleted file mode 100644 index 9022f7d..0000000 --- a/project/templates/login.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "layout.html" %} -{% block content %} - -
- - - -
- {{ form.csrf_token }} - {{ form.username(placeholder="Username") }} - {{ form.password(placeholder="Password") }} - -
- -
- -{% endblock %} diff --git a/project/templates/new.php b/project/templates/new.php new file mode 100644 index 0000000..62a076b --- /dev/null +++ b/project/templates/new.php @@ -0,0 +1,50 @@ +
+//file upload +
+ + + alert(\"File upload error + + \");"; + } + } + } else { + $flag = 0; + echo ""; \ No newline at end of file diff --git a/project/templates/notifications.html b/project/templates/notifications.html new file mode 100644 index 0000000..dac27a2 --- /dev/null +++ b/project/templates/notifications.html @@ -0,0 +1,29 @@ +
+{% extends "layout.html" %} +{% block content %} +
} + + +
+
+

Notifications



+{% for notification in all_notifications %} + +{{notification.interested_user_name}} is interested in your journey {{notification.journey_title}} + +
+{{notification.time}} +
+------------------- +
+

+{%endfor%} + +
+ + + + + + +{%endblock%} \ No newline at end of file diff --git a/project/templates/private.html b/project/templates/private.html deleted file mode 100644 index 50c4fb3..0000000 --- a/project/templates/private.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends "layout.html" %} -{% block content %} -

Private!

-{% endblock %} diff --git a/project/templates/profile.html b/project/templates/profile.html new file mode 100644 index 0000000..a53e75e --- /dev/null +++ b/project/templates/profile.html @@ -0,0 +1,19 @@ +{% extends "layout.html" %} +{% block content %} + + +

{{profile.name}}

+

{{profile.email}}

+{% if current_user.id == profile.id %} +

this is your profile

+ + +

+ +
+ +{% else %} +

this is not your profile

+{% endif %} + +{% endblock %} \ No newline at end of file diff --git a/project/templates/register.html b/project/templates/register.html deleted file mode 100644 index 8528126..0000000 --- a/project/templates/register.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "layout.html" %} -{% block content %} - -
- - - -
- {{ form.csrf_token }} - {{ form.username(placeholder="Username") }} - {{ form.password(placeholder="Password") }} - {{ form.confirm(placeholder="Confirm Password") }} - -
- -
- -{% endblock %} diff --git a/project/templates/reviews.html b/project/templates/reviews.html new file mode 100644 index 0000000..4782957 --- /dev/null +++ b/project/templates/reviews.html @@ -0,0 +1,40 @@ +{%extends "layout.html"%} +{%block content%} + +


+

Reviews of {{ this_journey.title }}

+ +{% for rating in all_ratings %} +
+{{rating.stars}}
+{{rating.title}} +By:{{rating.user}} +
+{{rating.review}}
+{{rating.time}}
+------------------- +
+{%endfor%} + + + +
+ How many stars? + + Title of review: + + Review: + + + +
+ + + + + + + + + +{%endblock%} \ No newline at end of file diff --git a/project/templates/st_profile.html b/project/templates/st_profile.html new file mode 100644 index 0000000..05cfd77 --- /dev/null +++ b/project/templates/st_profile.html @@ -0,0 +1,71 @@ +
+{% extends "layout.html" %} +{% block content %} +
+







+

Profile

+
+
+ + + +{% if current_user.id == profile.id %} + +{% else %} + +{% endif %} + +
+
+ +
+ {% if profile.profile_img == none %} + + + {% else %} + + + {% endif %} +
+ +
+
+
+

City:

{{profile.city}}


+

Country:

{{profile.country}}


+

Profession:

{{profile.profession}}


+

Bio:

{{profile.bio}}

+
+
+
+

{{profile.name}}


+ +
+ + + + +
+ + +

{{ profile.name }}'s journeys:

+ {% for journey in st_journeys %} + + {% endfor %} +
+ +
+
+ +
+ +{% if current_user.id == profile.id %} +
+ +
+{% endif %} + +
+{% endblock %} diff --git a/project/templates/wishlist.html b/project/templates/wishlist.html new file mode 100644 index 0000000..cf5bd3c --- /dev/null +++ b/project/templates/wishlist.html @@ -0,0 +1,19 @@ +
+{% extends "layout.html" %} +{% block content %} +
+ + +
+
+

My Wishlist



+{% for wish in all_wishes %} +{{current_user.id}} + + {{wish.journey_title}} + +

+{% endfor %} +
+ +{% endblock %} \ No newline at end of file diff --git a/project/users.py b/project/users.py index b5eacd5..227f6ba 100644 --- a/project/users.py +++ b/project/users.py @@ -10,37 +10,67 @@ from project.models import User + + +from flask import request, redirect, Flask, render_template +from flask_sqlalchemy import SQLAlchemy +from flask_login import UserMixin +from werkzeug.security import check_password_hash, generate_password_hash +from project.models import Journey, User, Ratings, Notification, Wishlist, Question + + + + users_bp = Blueprint('users', __name__) +# current_user = 'Not Logged In' @users_bp.route('/register', methods=['GET', 'POST']) def register(): form = RegisterForm(request.form) - # TODO: Fill this in! - return render_template('register.html', form=form) - -@users_bp.route('/login', methods=['GET', 'POST']) + if request.method == 'POST': + if form.validate_on_submit(): + name = form.name.data + email = form.email.data + password = form.password.data + is_storyteller = False + user = User.query.filter_by(email=email).first() + if user != None: + return Response ("

account already exists

") + return render_template('register.html', form=form) + else: + user = User(email=email, name= name, password= password, is_storyteller= is_storyteller) + db.session.add(user) + db.session.commit() + return redirect(url_for('browse')) + + else: + logout_user() + return render_template('register.html', form=form) + + +@users_bp.route('/login', methods=['GET','POST']) def login(): form = LoginForm(request.form) if request.method == 'POST': if form.validate_on_submit(): - username = form.username.data + email = form.email.data password = form.password.data - user = User.query.filter_by(username=username).first() + user = User.query.filter_by(email=email).first() if user is None or not user.check_password(password): - return Response("

Incorrect username or password

") + return Response("

Incorrect email or password

") login_user(user, remember=True) - next_page = request.args.get('next') - if not next_page or url_parse(next_page).netloc != '': - next_page = url_for('private_route') - return redirect(next_page) + return redirect(url_for('browse')) else: return Response("

invalid form

") - return render_template('login.html', form=form) + else: + return render_template('login.html', form=form) @users_bp.route('/logout') @login_required def logout(): logout_user() - return Response("

Logged out

") + + form = LoginForm(request.form) + return redirect(url_for('browse')) diff --git a/project/views.py b/project/views.py index ca0cb88..825584d 100644 --- a/project/views.py +++ b/project/views.py @@ -1,14 +1,160 @@ -from flask import render_template -from flask_login import login_required +from flask import render_template, request, Flask, session, redirect, url_for +from flask import session as login_session +from flask_login import login_required, current_user +from . import app, db +import time +from project.forms import RegisterForm, LoginForm -from . import app +from project.models import Journey, User, Ratings, Notification, Wishlist, Question @app.route('/') -def index(): - return render_template('index.html') +def browse(): + form = None + all_journeys = Journey.query.all() + if not current_user.is_authenticated: + form = RegisterForm(request.form) + return render_template('browse.html', all_journeys=all_journeys, form=form) -@app.route('/private') + +@app.route('/apply', methods=['GET', 'POST']) +@login_required +def apply(): + if request.method=='POST': + current_user.country = request.form.get('country') + current_user.profession = request.form.get('profession') + current_user.birthday = request.form.get('birthday') + current_user.city = request.form.get('city') + current_user.number = request.form.get('number') + current_user.bio = request.form.get('bio') + current_user.profile_img = request.form.get('picture') + current_user.is_storyteller = True + db.session.commit() + return redirect(url_for('profile', user_id=current_user.id)) + else: + if current_user.is_storyteller==True: + return redirect(url_for('profile', user_id=current_user.id)) + else: + return render_template('apply.html') + + + +@app.route('/profile/') +def profile(user_id): + profile = User.query.filter_by(id=user_id).first() + if profile.is_storyteller==True: + st_journeys = Journey.query.filter_by(creator_id=user_id).all() + return render_template('st_profile.html',st_journeys=st_journeys, profile=profile) + else: + return render_template('profile.html', profile=profile) + + + +@app.route('/add_journey', methods=['GET', 'POST']) @login_required -def private_route(): - return render_template('private.html') +def add_journey(): + if request.method=='POST': + new_journey = Journey() + new_journey.creator_id = current_user.id + new_journey.title = request.form.get('title') + new_journey.description = request.form.get('description') + new_journey.location = request.form.get('location') + new_journey.duration = request.form.get('duration') + new_journey.category = request.form.get('category') + new_journey.requirements = request.form.get('requirements') + new_journey.people_range = request.form.get('people_range') + new_journey.price = request.form.get('price') + new_journey.picture = request.form.get('picture') + db.session.add(new_journey) + db.session.commit() + return redirect(url_for('display_journey', journey_id=new_journey.id)) + else: + return render_template('add_journey.html') + + +@app.route('/im_interested/', methods=['POST']) +def im_interested(journey_id): + journey = Journey.query.filter_by(id=journey_id).first() + new_notification = Notification() + new_notification.st_id = journey.creator_id + new_notification.journey_id = journey_id + new_notification.interested_user_id = current_user.id + new_notification.interested_user_name = current_user.name + new_notification.journey_title = journey.title + localtime = time.localtime(time.time()) + new_notification.time = str(localtime[1])+"/"+str(localtime[2])+"/"+str(localtime[0])+" at "+str(localtime[3])+":"+str(localtime[4]) + new_wish = Wishlist() + new_wish.user_id = current_user.id + new_wish.journey_id = journey_id + new_wish.journey_title = journey.title + db.session.add(new_notification) + db.session.add(new_wish) + db.session.commit() + return redirect(url_for('display_wishlist', user_id=current_user.id)) + + +@app.route('/ratings/', methods=['POST']) +@login_required +def add_rating(journey_id): + journey = Journey.query.filter_by(id=journey_id).first() + all_ratings = Ratings.query.filter_by(journey_id=journey_id).all() + creator = User.query.filter_by(id=journey.creator_id).first() + new_rating = Ratings() + new_rating.journey_id = journey_id + new_rating.user = current_user.name + new_rating.stars = request.form.get('stars') + new_rating.title = request.form.get('title') + new_rating.review = request.form.get('review') + localtime = time.localtime(time.time()) + new_rating.time = str(localtime[1])+"/"+str(localtime[2])+"/"+str(localtime[0])+" at "+str(localtime[3])+":"+str(localtime[4]) + db.session.add(new_rating) + db.session.commit() # I had a bug with this line. The problem was that I did "new_rating.user = current_user" and current_user in an object, but in the DB it is defined as a String. + return redirect(url_for('display_journey', journey_id=journey_id)) + + +@app.route('/question/', methods=['POST']) +def question(journey_id): + journey = Journey.query.filter_by(id=journey_id).first() + creator = User.query.filter_by(id=journey.creator_id).first() + new_question = Question() + new_question.journey_id = journey_id + new_question.user_id = current_user.id + new_question.title = request.form.get('title') + new_question.question = request.form.get('question') + localtime = time.localtime(time.time()) + new_question.time = str(localtime[1])+"/"+str(localtime[2])+"/"+str(localtime[0])+" at "+str(localtime[3])+":"+str(localtime[4]) + db.session.add(new_question) + db.session.commit() #bug is here + return redirect(url_for('display_journey', journey_id=journey_id)) + + +@app.route('/journey/') +def display_journey(journey_id): + journey = Journey.query.filter_by(id=journey_id).first() + creator = User.query.filter_by(id=journey.creator_id).first() + all_ratings = Ratings.query.filter_by(journey_id=journey_id).all() + all_questions = Question.query.filter_by(journey_id=journey_id).all() + return render_template('journey.html', journey=journey, all_questions=all_questions, creator=creator, all_ratings=all_ratings) + + +@app.route('/notification/', methods=['GET']) +@login_required +def display_notifications(st_id): + all_notifications = Notification.query.filter_by(st_id=st_id) + return render_template('notifications.html', all_notifications=all_notifications) + + +@app.route('/wishlist/', methods=['GET']) +@login_required +def display_wishlist(user_id): + all_wishes = Wishlist.query.filter_by(user_id=user_id).all() + return render_template('wishlist.html', all_wishes=all_wishes) + + +if __name__ == "__main__": + app.run() + + + + +# Ratings doesn't display \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 828c621..e4963e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,12 @@ +click==6.7 Flask==1.0 Flask-Login==0.4.1 Flask-SQLAlchemy==2.3.1 Flask-WTF==0.14.2 +gunicorn==19.9.0 +itsdangerous==0.24 +Jinja2==2.10 +MarkupSafe==1.0 +SQLAlchemy==1.2.10 +Werkzeug==0.14.1 +WTForms==2.2.1