Skip to content

Commit 595c42c

Browse files
committed
Replaced bootstrap css framework with skeleton.
1 parent 5e5967d commit 595c42c

File tree

153 files changed

+10533
-24027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+10533
-24027
lines changed

‎flask/app/app.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'''The app module, containing the app factory function.'''
33
from flask import Flask, render_template
44

5-
from settings import Config
5+
from config import Config
66
from assets import assets
77
from extensions import (
88
bcrypt,
@@ -32,7 +32,7 @@ def create_app(config_object=Config):
3232
def register_extensions(app):
3333
assets.init_app(app)
3434
bcrypt.init_app(app)
35-
cache.init_app(app)
35+
cache.init_app(app, app.config['CACHE_ENV'] )
3636
db.init_app(app)
3737
login_manager.init_app(app)
3838
debug_toolbar.init_app(app)

‎flask/app/assets.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
from flask_assets import Bundle, Environment
33

44
css = Bundle(
5-
"libs/bootstrap/dist/css/bootstrap.css",
5+
"libs/skeleton/css/skeleton.css",
6+
"libs/skeleton/css/normalize.css",
67
"css/style.css",
78
filters="cssmin",
89
output="public/css/common.css"
910
)
1011

1112
js = Bundle(
13+
"libs/d3/d3.js",
1214
"libs/jQuery/dist/jquery.js",
13-
"libs/bootstrap/dist/js/bootstrap.js",
1415
"js/plugins.js",
1516
filters='jsmin',
1617
output="public/js/common.js"

‎flask/app/settings.py‎ renamed to ‎flask/app/config.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import logging, os
44
from datetime import timedelta
5+
from textwrap import dedent
56

67
# base config class; extend it to your needs.
78
class Config(object):
@@ -44,7 +45,26 @@ def __get_blueprints_from_env():
4445
else:
4546
return ['blog']
4647

48+
def __get_cache_info_from_env():
49+
cache_info = { 'CACHE_TYPE': os.getenv('CACHE_TYPE', 'null') }
50+
if cache_info['CACHE_TYPE'] == 'redis':
51+
if 'CACHE_PORT_6379_TCP' in os.environ:
52+
cache_info['CACHE_REDIS_HOST'] = os.environ['CACHE_PORT_6379_TCP_ADDR']
53+
if 'CACHE_REDIS_DB' in os.environ:
54+
cache_info['CACHE_REDIS_DB'] = os.environ['CACHE_REDIS_DB']
55+
elif 'CACHE_REDIS_URL' in os.environ:
56+
cache_info['CACHE_REDIS_URL'] = os.environ['CACHE_REDIS_URL']
57+
else:
58+
print dedent("""\
59+
Warning: CACHE_TYPE specified as 'redis', \
60+
but no linked Redis container could be found, \
61+
and CACHE_REDIS_URL not specified.""")
62+
return cache_info
63+
64+
4765
ENV = "prod"
66+
USER_EMAIL = os.getenv('USER_EMAIL',"postmaster@%s" % os.getenv('SERVER_NAME','example.com'))
67+
PROJECT_NAME = os.getenv('PROJECT_NAME','Flask Template')
4868

4969
# use DEBUG mode?
5070
DEBUG = False
@@ -60,6 +80,10 @@ def __get_blueprints_from_env():
6080
SQLALCHEMY_DATABASE_URI = __get_db_uri_from_env()
6181
SQLALCHEMY_ECHO = False
6282

83+
# Cache
84+
CACHE_ENV = __get_cache_info_from_env()
85+
86+
# Secret keys and security
6387
WTF_CSRF_ENABLED = True
6488
SECRET_KEY = os.environ['FLASK_SECRET_KEY']
6589

‎flask/app/static/css/style.css‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ textarea {
2929

3030
.navbar-form input[type="text"],
3131
.navbar-form input[type="password"] {
32-
width: 180px;
32+
width: 100%;
3333
}
3434

35+
.navbar-form input[type="submit"],
36+
.navbar-form a.button,
37+
.login {
38+
width: 450%;
39+
}
3540

3641
.form-register {
3742
width: 50%;

‎flask/app/static/libs/LICENSE‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2010-2015, Michael Bostock
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
* The name Michael Bostock may not be used to endorse or promote products
15+
derived from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
21+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

‎flask/app/static/libs/bootstrap/.bower.json‎

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)