Flask-Pure - a Flask extension for Pure.css
Project description
Flask-Pure is an extension to Flask that helps integrate Pure.css to your Flask application.
Quick Start
Installation
pip install Flask-Pure
Configuration
from flask import Flask, render_template from flask.ext.pure import Pure app = Flask(__name__) app.config['PURECSS_USE_CDN'] = True app.config['PURECSS_USE_MINIFIED'] = True Pure(app) @app.route('/') def hello(): return render_template('hello.html') if __name__ == '__main__': app.run(debug=True)
In
templates/hello.html
:
{% extends "pure/layout.html" %} {% block title %}Hello world from flask-pure{% endblock %} {% block nav %} <div class="pure-menu pure-menu-horizontal"> <!-- ... --> </div> {% endblock %} {% block content %} <h1>Hello world</h1> {% endblock %}
Profit!
License
BSD New, see LICENSE for details.
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Pure-0.1.tar.gz
(20.4 kB
view hashes)