Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask 1 #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
HTML page templates, CSS files, and JSON file for testing with data
  • Loading branch information
pjs1221 committed Oct 26, 2018
commit e4c71ff491f7be6734fa4528d255f689600f0e21
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
venv
*.egg-info
venv
*.egg-info
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2018 coding&&community

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2018 coding&&community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Launchpad
The website for students to access coding&&community curriculums online.

## Setup
Setup the virtual environment.
```
python3 -m venv venv
```
Every time you work on the project, start up venv:
```
. venv/bin/activate
```
Install Flask:
```
pip install Flask
```
Windows instructions at http://flask.pocoo.org/docs/1.0/installation/#installation

## Running for the first time
```
export FLASK_APP=launchpad
pip install -e .
flask run
```
Then go to your web browser, and navigate to http://localhost:5000

Instructions may be different on Windows.


# Launchpad
The website for students to access coding&&community curriculums online.
## Setup
Setup the virtual environment.
```
python3 -m venv venv
```
Every time you work on the project, start up venv:
```
. venv/bin/activate
```
Install Flask:
```
pip install Flask
```
Windows instructions at http://flask.pocoo.org/docs/1.0/installation/#installation
## Running for the first time
```
export FLASK_APP=launchpad
pip install -e .
flask run
```
Then go to your web browser, and navigate to http://localhost:5000
Instructions may be different on Windows.
14 changes: 7 additions & 7 deletions launchpad/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Flask
from launchpad.api import launchpad_api
from launchpad.explorer import explorer

app = Flask(__name__)
app.register_blueprint(launchpad_api, url_prefix='/api')
app.register_blueprint(explorer)
from flask import Flask
from launchpad.api import launchpad_api
from launchpad.explorer import explorer
app = Flask(__name__)
app.register_blueprint(launchpad_api, url_prefix='/api')
app.register_blueprint(explorer)
14 changes: 7 additions & 7 deletions launchpad/api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import Blueprint

launchpad_api = Blueprint('launchpad_api', __name__, template_folder='templates')

@launchpad_api.route('/test')
def test():
return 'API test'
from flask import Blueprint
launchpad_api = Blueprint('launchpad_api', __name__, template_folder='templates')
@launchpad_api.route('/test')
def test():
return 'API test'
22 changes: 11 additions & 11 deletions launchpad/explorer.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from flask import Blueprint

explorer = Blueprint('explorer', __name__, template_folder='templates')

@explorer.route('/')
def index():
return 'Explorer index'

@explorer.route('/test')
def test():
return 'Explorer test'
from flask import Blueprint
explorer = Blueprint('explorer', __name__, template_folder='templates')
@explorer.route('/')
def index():
return 'Explorer index'
@explorer.route('/test')
def test():
return 'Explorer test'
56 changes: 28 additions & 28 deletions launchpad/static/Projects.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"projects": [
{
"lang": "python",
"level": 1,
"description": "Get started with this beginner Python project!"
},
{
"lang": "java",
"level": 2,
"description": "Try this fun Java project!"
},
{
"lang": "c++",
"level": 2,
"description": "Try your skills with this great C++ project!"
},
{
"lang": "reactjs",
"level": 3,
"description": "Challenge yourself with this level 3 JavaScript library!"
}

],

"dataTitle": "Projects",
"version": 1.0
}
{
"projects": [
{
"lang": "python",
"level": 1,
"description": "Get started with this beginner Python project!"
},
{
"lang": "java",
"level": 2,
"description": "Try this fun Java project!"
},
{
"lang": "c++",
"level": 2,
"description": "Try your skills with this great C++ project!"
},
{
"lang": "reactjs",
"level": 3,
"description": "Challenge yourself with this level 3 JavaScript library!"
}
],
"dataTitle": "Projects",
"version": 1.0
}
18 changes: 9 additions & 9 deletions launchpad/static/Style.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.container{
margin-left: 8%;
}

.card:hover{
-webkit-box-shadow: -1px 9px 40px -12px rgba(0,0,0,0.75);
-moz-box-shadow: -1px 9px 40px -12px rgba(0,0,0,0.75);
box-shadow: -1px 9px 40px -12px rgba(0, 0, 0, 0.75);
}
.container{
margin-left: 8%;
}
.card:hover{
-webkit-box-shadow: -1px 9px 40px -12px rgba(0,0,0,0.75);
-moz-box-shadow: -1px 9px 40px -12px rgba(0,0,0,0.75);
box-shadow: -1px 9px 40px -12px rgba(0, 0, 0, 0.75);
}
158 changes: 79 additions & 79 deletions launchpad/static/main.css
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
body {
background: #fafafa;
color: #333333;
margin-top: 5rem;
}

h1, h2, h3, h4, h5, h6 {
color: #444444;
}

.bg-steel {
background-color: #5f788a;
}

.site-header .navbar-nav .nav-link {
color: #cbd5db;
}

.site-header .navbar-nav .nav-link:hover {
color: #ffffff;
}

.site-header .navbar-nav .nav-link.active {
font-weight: 500;
}

.content-section {
background: #ffffff;
padding: 10px 20px;
border: 1px solid #dddddd;
border-radius: 3px;
margin-bottom: 20px;
}

.article-title {
color: #444444;
}

a.article-title:hover {
color: #428bca;
text-decoration: none;
}

.article-content {
white-space: pre-line;
}

.article-img {
height: 65px;
width: 65px;
margin-right: 16px;
}

.article-metadata {
padding-bottom: 1px;
margin-bottom: 4px;
border-bottom: 1px solid #e3e3e3
}

.article-metadata a:hover {
color: #333;
text-decoration: none;
}

.article-svg {
width: 25px;
height: 25px;
vertical-align: middle;
}

.account-img {
height: 125px;
width: 125px;
margin-right: 20px;
margin-bottom: 16px;
}

.account-heading {
font-size: 2.5rem;
body {
background: #fafafa;
color: #333333;
margin-top: 5rem;
}
h1, h2, h3, h4, h5, h6 {
color: #444444;
}
.bg-steel {
background-color: #5f788a;
}
.site-header .navbar-nav .nav-link {
color: #cbd5db;
}
.site-header .navbar-nav .nav-link:hover {
color: #ffffff;
}
.site-header .navbar-nav .nav-link.active {
font-weight: 500;
}
.content-section {
background: #ffffff;
padding: 10px 20px;
border: 1px solid #dddddd;
border-radius: 3px;
margin-bottom: 20px;
}
.article-title {
color: #444444;
}
a.article-title:hover {
color: #428bca;
text-decoration: none;
}
.article-content {
white-space: pre-line;
}
.article-img {
height: 65px;
width: 65px;
margin-right: 16px;
}
.article-metadata {
padding-bottom: 1px;
margin-bottom: 4px;
border-bottom: 1px solid #e3e3e3
}
.article-metadata a:hover {
color: #333;
text-decoration: none;
}
.article-svg {
width: 25px;
height: 25px;
vertical-align: middle;
}
.account-img {
height: 125px;
width: 125px;
margin-right: 20px;
margin-bottom: 16px;
}
.account-heading {
font-size: 2.5rem;
}
Loading