-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes a github auth, showing the profile of the user, and allow the creation of a game. Sadly no persistence yet.
- Loading branch information
Showing
13 changed files
with
260 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.env | ||
.env.example | ||
.gitignore | ||
.git | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
myvenv | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from flask_wtf import FlaskForm | ||
from wtforms import RadioField, TextField | ||
from wtforms.validators import InputRequired, Length | ||
|
||
class NewGame(FlaskForm): | ||
gamename = TextField("Game name", [InputRequired(), Length(max=20,min=1)]) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/* | ||
https://github.com/pure-css/pure/blob/075862bf23684ab042d0dc27063eefcee4a5830c/site/static/layouts/pricing/styles.css | ||
*/ | ||
|
||
/* | ||
* -- BASE STYLES -- | ||
* Most of these are inherited from Base, but I want to change a few. | ||
*/ | ||
body { | ||
color: #526066; | ||
} | ||
|
||
h2, h3 { | ||
letter-spacing: 0.25em; | ||
text-transform: uppercase; | ||
font-weight: 600; | ||
} | ||
|
||
p { | ||
line-height: 1.6em; | ||
} | ||
|
||
/* | ||
* -- Layout Styles -- | ||
*/ | ||
.l-content { | ||
margin: 0 auto; | ||
} | ||
|
||
.l-box { | ||
padding: 0.5em 2em; | ||
} | ||
|
||
/* | ||
* -- MENU STYLES -- | ||
* Make the menu have a very faint box-shadow. | ||
*/ | ||
.pure-menu { | ||
box-shadow: 0 1px 1px rgba(0,0,0, 0.10); | ||
} | ||
|
||
.pure-menu-link { | ||
padding: .5em .7em; | ||
} | ||
|
||
.pure-menu { | ||
text-align: left; | ||
} | ||
|
||
.pure-menu-list { | ||
float: right; | ||
} | ||
|
||
|
||
/* | ||
* -- BANNER -- | ||
* The top banner with the headings. By using a combination | ||
* of `display: table;` and `display: table-cell;`, we can | ||
* vertically center the text. | ||
*/ | ||
|
||
.banner { | ||
/* background: transparent url('http://24.media.tumblr.com/ccb268832580ac12951828a1c179de69/tumblr_mo2xbk8JUK1st5lhmo1_1280.jpg') 0 0 no-repeat fixed; */ | ||
text-align: center; | ||
background-size: cover; | ||
/* filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://24.media.tumblr.com/ccb268832580ac12951828a1c179de69/tumblr_mo2xbk8JUK1st5lhmo1_1280.jpg', sizingMethod='scale'); */ | ||
|
||
height: 200px; | ||
width: 100%; | ||
margin-bottom: 3em; | ||
display: table; | ||
} | ||
|
||
.banner-head { | ||
display: table-cell; | ||
vertical-align: middle; | ||
margin-bottom: 0; | ||
font-size: 2em; | ||
color: white; | ||
font-weight: 500; | ||
text-shadow: 0 1px 1px black; | ||
} | ||
|
||
|
||
|
||
/* | ||
* -- TABLET MEDIA QUERIES -- | ||
* On tablets, we want to slightly adjust the size of the banner | ||
* text and add some vertical space between the various pricing tables | ||
*/ | ||
@media(min-width: 767px) { | ||
|
||
.banner-head { | ||
font-size: 4em; | ||
} | ||
|
||
} | ||
|
||
/* | ||
* -- PHONE MEDIA QUERIES -- | ||
* On phones, we want to reduce the height and font-size of the banner further | ||
*/ | ||
@media (min-width: 480px) { | ||
.banner { | ||
height: 400px; | ||
} | ||
.banner-head { | ||
font-size: 3em; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ flask | |
python-dotenv | ||
requests | ||
authlib>=0.14.1 | ||
six | ||
Flask-WTF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!doctype html> | ||
<title>{% block title %}{% endblock %} - Stunning happiness</title> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ" crossorigin="anonymous"> | ||
<link rel="stylesheet" href="/public/pure.css"> | ||
</head> | ||
<div class="header"> | ||
<div class="home-menu pure-menu pure-menu-horizontal"> | ||
<a class="pure-menu-heading pure-menu-disabled" href="/">Stunning happiness boardgames</a> | ||
<ul class="pure-menu-list"> | ||
{% if session['profile'] and session['profile']['user_id'] %} | ||
<li class="pure-menu-item"> | ||
<img class="pure-img-responsive" style="max-height:18px" src="{{ session['profile']['picture']}}"/> | ||
</li> | ||
<li class="pure-menu-item"> | ||
<span>{{ session['profile']['name'] }}</span> | ||
</li> | ||
<li class="pure-menu-item"> | ||
<a class="pure-button pure-button-primary" id="qsLogoutBtn" href="/logout">Log Out</a> | ||
</li> | ||
{% else %} | ||
<li class="pure-menu-item"> | ||
<a class="pure-button pure-button-primary" href="{{ url_for('login') }}">Log In</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="content-wrapper"> | ||
<div class="content"> | ||
<header> | ||
{% block header %}{% endblock %} | ||
</header> | ||
{% for message in get_flashed_messages() %} | ||
<div class="flash">{{ message }}</div> | ||
{% endfor %} | ||
{% block content %} | ||
{% endblock %} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- font awesome from BootstrapCDN --> | ||
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | ||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> | ||
<link href="/public/app.css" rel="stylesheet"> | ||
</head> | ||
<body class="home"> | ||
<div class="container"> | ||
<div class="login-page clearfix"> | ||
<div class="logged-in-box auth0-box logged-in"> | ||
<h1 id="logo"><img src="//cdn.auth0.com/samples/auth0_logo_final_blue_RGB.png" /></h1> | ||
<img class="avatar" src="{{userinfo['picture']}}"/> | ||
<h2>Welcome {{userinfo['name']}}</h2> | ||
<pre>{{userinfo_pretty}}</pre> | ||
<a id="qsLogoutBtn" class="btn btn-primary btn-lg btn-logout btn-block" href="/logout">Logout</a> | ||
</div> | ||
</div> | ||
{% extends 'base.html' %} | ||
|
||
{% block header %} | ||
<h1>{% block title %}Welcome {{userinfo['name']}}{% endblock %}</h1> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<div> | ||
For full transparency, here is the information I got from github: | ||
<pre>{{userinfo_pretty}}</pre> | ||
<pre>{{userinfo}}</pre> | ||
<a class="pure-button pure-button-primary" href="/party/new">Create game</a> | ||
<a class="pure-button pure-button-primary" href="/party/join">Join game</a> | ||
</div> | ||
</body> | ||
</html> | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.