Added layout
This commit is contained in:
parent
df93897fa9
commit
dc5d42bedc
|
|
@ -0,0 +1,27 @@
|
||||||
|
from flask import Flask, url_for
|
||||||
|
import logging
|
||||||
|
|
||||||
|
def make_app():
|
||||||
|
app = Flask(__name__)
|
||||||
|
app.config['DEBUG'] = True
|
||||||
|
app.config['SECRET_KEY'] = 'SECRET_KEY'
|
||||||
|
# Function to easily find your assets
|
||||||
|
# In your template use <link rel=stylesheet href="{{ static('filename') }}">
|
||||||
|
app.jinja_env.globals['static'] = (
|
||||||
|
lambda filename: url_for('static', filename = filename)
|
||||||
|
)
|
||||||
|
app.config['LIVERELOAD'] = True
|
||||||
|
|
||||||
|
return app
|
||||||
|
|
||||||
|
app = make_app()
|
||||||
|
|
||||||
|
log = logging.getLogger()
|
||||||
|
|
||||||
|
def configure(config_file):
|
||||||
|
config = load_config(config_file)
|
||||||
|
app.api_config = config
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import ferry.views
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
|
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
||||||
|
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
||||||
|
<head>
|
||||||
|
<title>Gräsö färja</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
<meta name="apple-mobile-web-app-title" content="home">
|
||||||
|
|
||||||
|
<!-- Place this data between the <head> tags of your website -->
|
||||||
|
<meta name="description" content="Describe your App" />
|
||||||
|
|
||||||
|
<link type="text/css" rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/css/materialize.min.css" media="screen,projection"/>
|
||||||
|
<link type="text/css" rel="stylesheet" href="{{ static('css/style.css') }}" media="screen,projection"/>
|
||||||
|
<link type="text/css" rel="stylesheet" href="{{ static('css/addtohomescreen.css') }}" media="screen,projection"/>
|
||||||
|
<link type="text/css" rel="stylesheet" href="{{ static('css/social-likes_flat.css') }}" media="screen,projection"/>
|
||||||
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
{% block body %}{% endblock %}
|
||||||
|
|
||||||
|
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script>
|
||||||
|
<script>!window.jQuery && document.write("{{ static('js/jquery-2.1.3.min.js') }}")</script>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
|
||||||
|
<!-- <script src="{{ static('js/materialize.min.js') }}"></script> -->
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/js/materialize.min.js"></script>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js"></script>
|
||||||
|
<script src="{{ static('js/addtohomescreen.min.js') }}"></script>
|
||||||
|
<script src="{{ static('js/social-likes.min.js') }}"></script>
|
||||||
|
|
||||||
|
<script src="{{ static('js/init.js') }}"></script>
|
||||||
|
<script src="{{ static('js/sl.js') }}"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
|
||||||
|
<nav class="teal lighten-3" role="navigation">
|
||||||
|
<div class="nav-wrapper container"><a id="logo-container" href="#" class="brand-logo">Logo</a>
|
||||||
|
<a href="#" data-activates="nav-mobile" class="button-collapse"><i class="material-icons">menu</i></a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div class="container teal lighten-5">
|
||||||
|
<div class="section">
|
||||||
|
|
||||||
|
<!-- Icon Section -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12 m4">
|
||||||
|
<div class="icon-block">
|
||||||
|
<h2 class="center light-blue-text"><i class="material-icons">flash_on</i></h2>
|
||||||
|
<h5 class="center">Speeds up development</h5>
|
||||||
|
|
||||||
|
<p class="light">We did most of the heavy lifting for you to provide a default stylings that incorporate our custom components. Additionally, we refined animations and transitions to provide a smoother experience for developers.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
|
<div class="icon-block">
|
||||||
|
<h2 class="center light-blue-text"><i class="material-icons">group</i></h2>
|
||||||
|
<h5 class="center">User Experience Focused</h5>
|
||||||
|
|
||||||
|
<p class="light">By utilizing elements and principles of Material Design, we were able to create a framework that incorporates components and animations that provide more feedback to users. Additionally, a single underlying responsive system across all platforms allow for a more unified user experience.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
|
<div class="icon-block">
|
||||||
|
<h2 class="center light-blue-text"><i class="material-icons">settings</i></h2>
|
||||||
|
<h5 class="center">Easy to work with</h5>
|
||||||
|
|
||||||
|
<p class="light">We have provided detailed documentation as well as specific code examples to help new users get started. We are also always open to feedback and can answer any questions a user may have about Materialize.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<footer class="page-footer teal">
|
||||||
|
<div class="footer-copyright">
|
||||||
|
<div class="container">
|
||||||
|
Made by Simon
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
from flask import Flask
|
from ferry.app import app
|
||||||
import requests
|
from flask import render_template
|
||||||
app = Flask(__name__)
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def hello():
|
@app.route('/index')
|
||||||
r = request()
|
def index():
|
||||||
return r.text
|
return render_template('index.html')
|
||||||
|
|
||||||
|
|
||||||
def request():
|
def request():
|
||||||
url = 'http://api.trafikinfo.trafikverket.se/beta/data.json'
|
url = 'http://api.trafikinfo.trafikverket.se/beta/data.json'
|
||||||
|
|
@ -35,7 +34,3 @@ def request():
|
||||||
"""
|
"""
|
||||||
r = requests.post(url, data=xml_data, headers=headers)
|
r = requests.post(url, data=xml_data, headers=headers)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
app.run(debug=True)
|
|
||||||
|
|
||||||
|
|
@ -1,8 +1,93 @@
|
||||||
|
apsw==3.8.11.1.post1
|
||||||
|
attrs==16.0.0
|
||||||
|
BeautifulSoup==3.2.1
|
||||||
|
beautifulsoup4==4.5.1
|
||||||
|
blinker==1.3
|
||||||
|
boto==2.40.0
|
||||||
|
cffi==1.7.0
|
||||||
|
characteristic==14.3.0
|
||||||
|
chardet==2.3.0
|
||||||
|
CherryPy==3.5.0
|
||||||
click==6.7
|
click==6.7
|
||||||
|
configobj==5.0.6
|
||||||
|
cryptography==1.5
|
||||||
|
cssselect==0.9.2
|
||||||
|
cssutils==1.0
|
||||||
|
debtags==2.0
|
||||||
|
decorator==4.0.6
|
||||||
|
defer==1.0.6
|
||||||
|
dirspec==13.10
|
||||||
|
dnspython==1.14.0
|
||||||
|
dulwich==0.14.1
|
||||||
|
duplicity==0.7.6
|
||||||
|
enum34==1.1.6
|
||||||
|
ExifRead==2.1.2
|
||||||
|
fastimport==0.9.6
|
||||||
|
feedparser==5.1.3
|
||||||
Flask==0.12.1
|
Flask==0.12.1
|
||||||
|
html5lib==0.999
|
||||||
|
httplib2==0.9.1
|
||||||
|
idna==2.1
|
||||||
|
ipaddress==1.0.16
|
||||||
|
ipython==2.4.1
|
||||||
itsdangerous==0.24
|
itsdangerous==0.24
|
||||||
Jinja2==2.9.6
|
Jinja2==2.9.6
|
||||||
|
lockfile==0.12.2
|
||||||
|
lxml==3.6.4
|
||||||
|
Markdown==2.6.7
|
||||||
MarkupSafe==1.0
|
MarkupSafe==1.0
|
||||||
requests==2.13.0
|
mechanize==0.2.5
|
||||||
|
meld==3.16.3
|
||||||
|
mutagen==1.34
|
||||||
|
ndg-httpsclient==0.4.2
|
||||||
|
netifaces==0.10.4
|
||||||
|
oauthlib==1.1.2
|
||||||
|
oneconf==0.3.9
|
||||||
|
PAM==0.4.2
|
||||||
|
pbr==1.8.1
|
||||||
|
pexpect==4.2.0
|
||||||
|
Pillow==3.3.1
|
||||||
|
piston-mini-client==0.7.5
|
||||||
|
Pivy==0.5.0
|
||||||
|
ply==3.7
|
||||||
|
ptyprocess==0.5.1
|
||||||
|
pyasn1==0.1.9
|
||||||
|
pyasn1-modules==0.0.7
|
||||||
|
pycparser==2.14
|
||||||
|
pycrypto==2.6.1
|
||||||
|
pycups==1.9.73
|
||||||
|
Pygments==2.1.3
|
||||||
|
pygobject==3.22.0
|
||||||
|
PyJWT==1.4.1
|
||||||
|
pyOpenSSL==16.1.0
|
||||||
|
pyparsing==2.1.8
|
||||||
|
pyserial==3.1.1
|
||||||
|
python-apt==1.1.0b5
|
||||||
|
python-cloudfiles==1.7.10
|
||||||
|
python-dateutil==2.4.2
|
||||||
|
python-debian==0.1.29
|
||||||
|
pyxdg==0.25
|
||||||
|
PyYAML==3.11
|
||||||
|
rabbitvcs==0.16.0
|
||||||
|
repoze.lru==0.6
|
||||||
|
requests==2.10.0
|
||||||
|
Routes==2.2
|
||||||
|
service-identity==16.0.0
|
||||||
|
simplegeneric==0.8.1
|
||||||
|
simplejson==3.8.2
|
||||||
|
six==1.10.0
|
||||||
|
software-center-aptd-plugins==0.0.0
|
||||||
|
stevedore==1.10.0
|
||||||
|
svtplay-dl==0.30.2016.1.10
|
||||||
|
Twisted==16.4.1
|
||||||
|
urllib3==1.15.1
|
||||||
|
uTidylib==0.3
|
||||||
|
vboxapi==1.0
|
||||||
|
virtualenv==13.1.2
|
||||||
|
virtualenv-clone==0.2.6
|
||||||
|
virtualenvwrapper==4.7.1
|
||||||
|
WebOb==1.6.1
|
||||||
Werkzeug==0.12.1
|
Werkzeug==0.12.1
|
||||||
wheel==0.24.0
|
wxPython==3.0.2.0
|
||||||
|
wxPython-common==3.0.2.0
|
||||||
|
zope.interface==4.2.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue