Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS123-Canteeneo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Willard Torres
CS123-Canteeneo
Commits
8d0a7b22
Commit
8d0a7b22
authored
Nov 15, 2016
by
Willard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial styling of landing
parent
45cd4a41
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10270 additions
and
9 deletions
+10270
-9
jquery-3.1.1.js
canteeneo/static/js/jquery-3.1.1.js
+10220
-0
base.html
canteeneo/templates/base.html
+4
-3
landing.html
canteeneo/templates/landing.html
+43
-2
login.html
canteeneo/templates/login.html
+0
-1
views.py
canteeneo/views.py
+3
-3
No files found.
canteeneo/static/js/jquery-3.1.1.js
0 → 100644
View file @
8d0a7b22
This diff is collapsed.
Click to expand it.
canteeneo/templates/base.html
View file @
8d0a7b22
...
@@ -6,14 +6,15 @@
...
@@ -6,14 +6,15 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
{% block head %}
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
{% block head %}
<title>
Canteeneo - {% block title %}{% endblock%}
</title>
<title>
Canteeneo - {% block title %}{% endblock%}
</title>
{% endblock %}
{% endblock %}
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='
style
.css') }}"
>
<link
rel=
"stylesheet"
href=
"{{ url_for('static', filename='
css/bootstrap
.css') }}"
>
</head>
</head>
<body>
<body>
<div
class=
"
flex-container
"
>
<div
class=
"
container-fluid
"
>
{% with messages = get_flashed_messages() %} {% if messages %} {% for message in messages %}
{% with messages = get_flashed_messages() %} {% if messages %} {% for message in messages %}
<span>
{{ message }}
</span><br>
{% endfor %} {% endif %} {% endwith %} {% block content %} {% endblock %}
<span>
{{ message }}
</span><br>
{% endfor %} {% endif %} {% endwith %} {% block content %} {% endblock %}
</div>
</div>
</body>
</body>
<script
src=
"{{ url_for('static', filename='jquery-ajax.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/jquery-3.1.1.js') }}"
></script>
<script
src=
"{{ url_for('static', filename='js/bootstrap.min.js') }}"
></script>
</html>
</html>
\ No newline at end of file
canteeneo/templates/landing.html
View file @
8d0a7b22
...
@@ -3,6 +3,47 @@
...
@@ -3,6 +3,47 @@
{% block title %}Landing Page{% endblock %}
{% block title %}Landing Page{% endblock %}
{% block content %}
{% block content %}
<a
href=
"/login"
><button
class=
"link-button"
>
Login
</button></a>
<div
class=
"row"
>
<a
href=
"/register"
><button
class=
"link-button"
>
Register
</button></a>
<div
class=
"col-md-4 col-md-offset-2"
>
<form
method=
"POST"
action=
"/login"
>
{{ login_form.csrf_token }}
<div
class=
"form-group"
>
{{ login_form.username.label }}
{{ login_form.username(class_="form-control") }}
</div>
<div
class=
"form-group"
>
{{ login_form.password.label }}
{{ login_form.password(class_="form-control") }}
</div>
<button
class=
"btn btn-default btn-large"
type=
"submit"
>
Login
</button>
</form>
</div>
<div
class=
"col-md-4"
>
<form
method=
"POST"
action=
"/register"
>
{{ register_form.csrf_token }}
<div
class=
"form-group"
>
{{ register_form.email.label}}
{{ register_form.email(class_="form-control") }}
</div>
<div
class=
"form-group"
>
{{ register_form.name.label}}
{{ register_form.name(class_="form-control") }}
</div>
<div
class=
"form-group"
>
{{ register_form.username.label}}
{{ register_form.username(class_="form-control") }}
</div>
<div
class=
"form-group"
>
{{ register_form.password.label}}
{{ register_form.password(class_="form-control") }}
</div>
<div
class=
"form-group"
>
{{ register_form.confirm_password.label}}
{{ register_form.confirm_password(class_="form-control") }}
</div>
<button
class=
"btn btn-default btn-large"
type=
"submit"
>
Register
</button>
</form>
</div>
</div>
{% endblock %}
{% endblock %}
\ No newline at end of file
canteeneo/templates/login.html
View file @
8d0a7b22
...
@@ -18,6 +18,5 @@
...
@@ -18,6 +18,5 @@
</div>
</div>
<button
type=
"submit"
>
Login
</button>
<button
type=
"submit"
>
Login
</button>
</div>
</div>
</form>
</form>
{% endblock %}
{% endblock %}
\ No newline at end of file
canteeneo/views.py
View file @
8d0a7b22
...
@@ -37,7 +37,7 @@ class LoginView(FormView):
...
@@ -37,7 +37,7 @@ class LoginView(FormView):
login_user
(
Owner
.
query
.
filter_by
(
username
=
self
.
get_form
()
.
username
.
data
)
.
first
())
login_user
(
Owner
.
query
.
filter_by
(
username
=
self
.
get_form
()
.
username
.
data
)
.
first
())
return
redirect
(
url_for
(
'stalls'
))
return
redirect
(
url_for
(
'stalls'
))
def
render_get
(
self
):
def
render_get
(
self
):
return
render_template
(
'l
ogin.html'
,
form
=
self
.
get_f
orm
())
return
render_template
(
'l
anding.html'
,
login_form
=
OwnerLoginForm
(),
register_form
=
OwnerRegisterF
orm
())
def
get_form
(
self
):
def
get_form
(
self
):
return
OwnerLoginForm
()
return
OwnerLoginForm
()
...
@@ -50,7 +50,7 @@ class RegisterView(FormView):
...
@@ -50,7 +50,7 @@ class RegisterView(FormView):
db
.
session
.
commit
()
db
.
session
.
commit
()
return
redirect
(
url_for
(
'login'
))
return
redirect
(
url_for
(
'login'
))
def
render_get
(
self
):
def
render_get
(
self
):
return
render_template
(
'
register.html'
,
form
=
form
)
return
render_template
(
'
landing.html'
,
login_form
=
OwnerLoginForm
(),
register_form
=
OwnerRegisterForm
()
)
def
get_form
(
self
):
def
get_form
(
self
):
return
OwnerRegisterForm
()
return
OwnerRegisterForm
()
...
@@ -60,7 +60,7 @@ app.add_url_rule('/register', view_func=RegisterView.as_view('register'))
...
@@ -60,7 +60,7 @@ app.add_url_rule('/register', view_func=RegisterView.as_view('register'))
@
app
.
route
(
'/'
)
@
app
.
route
(
'/'
)
@
not_logged_in
@
not_logged_in
def
index
():
def
index
():
return
render_template
(
'landing.html'
)
return
render_template
(
'landing.html'
,
login_form
=
OwnerLoginForm
(),
register_form
=
OwnerRegisterForm
()
)
@
app
.
route
(
'/logout'
)
@
app
.
route
(
'/logout'
)
def
logout
():
def
logout
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment