{ "info": { "author": "ondoheer", "author_email": "ondoheer@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-zurb-foundation\n=======================\n\n\n\n.. image:: https://travis-ci.org/ondoheer/flask-zurb-foundation.png?branch=master\n :target: https://travis-ci.org/ondoheer/flask-zurb-foundation\n\n\nFlask-Zurb-Foundation packages `Foundation 5\n`_ (*5.5.1*) into an extension as a blueprint called foundation.\nSo far it justs wrappes a project in the basic `Foundation 5\n`_ styles and scripts.\n\n\nNote:\n--------\n\n*Basic navigation macros have been added, I'll try to add other foundation components macros as I need them in our projects.*\n\nIndex\n---------\n\n- `How to use it in flask`_\n- `Config Variables`_\n- `How to extend your templates`_\n- `Template Blocks`_\n- `Foundation Components Macros`_\n\n\n\n\nUsage\n------\n\nHow to use it in flask\n************************\n\nJust wrapp your aplication like this::\n\n from flask_zurb_foundation import Foundation\n\n [...] # your initiation code here\n\n Foundation(app)\n\n\nNow you will have a \"*foundation/base.html*\" template at your disposition to start developing your project fast enough.\n\n\nConfig Variables\n******************\n\n**config[\"FOUNDATION_MINIFIED\"]** - *defaults to True* - Will load most libraries and css minified\n\n**config[\"FOUNDATION_CDN\"]** - *defaults to False* - Will load most libraries from CDN \n\n**config[\"FOUNDATION_ICONS\"]** - *defaults to True* - will load the foundation icons css.\n\n**config[\"FOUNDATION_TEXT_DIRECTION\"]** - *defaults to 'ltr'* - if set to 'rtl' will switch text reading orientation for languages that are read from right to left.\n\n**config[\"FOUNDATION_LANG\"]** - *defaults to \"en\"* - accepts a string, will set the html attribute language.\n\n\nHow to extend your templates\n*******************************\n\n\t{% extends \"foundation/base.html\" %}\n\n\t\n\nTemplate Blocks\n******************\n\nHere are the template blocks you can build upon.\nTo use them just call::\n\n\t{% block %}\n\t\t...your code...\n\t{% endblock %}\n\n\nblock doc\n++++++++++\n\nStarts before declaring the , can be used to overwrite everything.\n\nblock html_attribs\n+++++++++++++++++++\n\nopening tag, used to add attributes to it.\n\n\nblock html\n+++++++++++\n\nincludes everything inside the tag.\n\n\nblock head\n+++++++++++\n\nincludes everything inside the tag. This includes the , <meta> and <link> tags, it should be used with **super()** so it keeps calling the foundation CSS\n\nlike so::\n\n\t{% block head %}\n\t\t{{ super() }}\n\t\t...your code...\n\t{% endblock head %}\n\n\nblock metas\n++++++++++++\n\nit just includes::\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\nit should be called with **super()** unless you want to overwritte this behaviour.\n\nblock styles\n++++++++++++\n\nthis includes the foundation css and the foundation-icons css. \n\nit should be used with **super()**\n\nblock head_scripts\n+++++++++++++++++++\n\nincludes **modernizr.js**\n\nit should be used with **super()**\n\nblock body_attributes\n++++++++++++++++++++++\n\nblock inside the opening <body> tag. Used to add classes, id or data attributes to it.\n\n\nblock navbar\n+++++++++++++++\n\nGoes before block content, just a way to organize your code.\n\nblock content\n+++++++++++++++\n\nmain web content should go here\n\nblock footer\n+++++++++++++\n\ngoes before the scripts block \n\nblock footer_scripts\n+++++++++++++++++++++\n\nJavaScript files should be linked here.\nit loads jquery, jquery.cookie, modernizr, placeholder, fastclick and foundation JavaScript files.\nIt should be used with **super()**\n\nFoundation Components Macros\n*****************************\n\nThere are a few built-in Foundation components macros.\n\nThe macros add the basic Foundation markup for them to work. So, basically they are just macros that wrap a **call**.\n\nto use them first import the macros::\n\n\t{% import \"foundation/components.html\" as components%}\n\n\nthen just open a **call block** importing the component like so::\n\n\t{% call components.topbar(class=\"fixed\") %}\n\n\t\t<li>item1</li>\n\t\t<li>item2</li>\n\t\t<li>item3</li>\n\t\t<li>item4</li>\n\t\t<li>item5</li>\n\n\t{%\tendcall %}\n\n\ncomponents.topbar\n++++++++++++++++++\n\n`Foundation docs: topbar <http://foundation.zurb.com/docs/components/topbar.html>`_\n\nIt should be used inside the **navbar** block.\n\nparams\n```````\n\n- class: adds string to the topbar container. Used for fixed, sticky, contain-to-grid clases.\n\n- data_options: adds string to topbar data-options.\n\n**example**::\n\n\t{% block navbar %}\n\t\t{% call components.topbar(class=\"fixed\") %}\n\t\t\n\t\t\t<li>item1</li>\n\t\t\t<li>item2</li>\n\t\t\t<li>item3</li>\n\t\t\t<li>item4</li>\n\t\t\t<li>item5</li>\n\n\t\t{%\tendcall %}\n\n\t \n\t{% endblock %}\n\n\n\n\n\ncomponents.sidenav\n++++++++++++++++++++\n\n`Foundation docs: sidenav <http://foundation.zurb.com/docs/components/sidenav.html>`_\n\nparams\n```````\n\n- title: accepts a string that will render as the sidenav title.\n\n\n**example**::\n\n\t{% call components.sidenav(title=\"Mi menu\") %}\n\n\t <li role=\"menuitem\"><a href=\"#\">Link 1</a></li>\n\t <li role=\"menuitem\"><a href=\"#\">Link 2</a></li>\n\t <li role=\"menuitem\"><a href=\"#\">Link 3</a></li>\n\t <li role=\"menuitem\"><a href=\"#\">Link 4</a></li>\n\t </div>\n\t{% endcall %}\n\n\n\ncomponents.subnav\n++++++++++++++++++++\n\n`Foundation docs: subnav <http://foundation.zurb.com/docs/components/subnav.html>`_\n\nparams\n```````\n\n- title: accepts a string that will render as the subnav title.\n\n\n**example**::\n\n\t{% call components.subnav(title=\"Filter: \") %}\n\t\t\n\t\t<dd class=\"active\"><a href=\"#\">All</a></dd>\n\t\t<dd><a href=\"#\">Active</a></dd>\n\t\t<dd><a href=\"#\">Pending</a></dd>\n\t\t<dd class=\"hide-for-small-only\"><a href=\"#\">Suspended</a></dd>\n\t{% endcall %}\n\n\ncomponents.iconbar\n+++++++++++++++++++\n\n`Foundation docs: iconbar <http://foundation.zurb.com/docs/components/icon-bar.html>`_\n\nSince flask-zurb-foundation comes with all the Foundation icons by default the iconbar macro allows you to work complex icon menues easily.\n\nparams\n```````\n\n- number : -*string* - written number, ex. \"one\", \"five\"; from one to eight. It will render evely distributed icons according to the number passed to it.\n- vertical: - *bool* - defaults to False.\n- type: - *string* - defaults to *img*, acepts *icon*. Img will load the default Foundation SVGs, using icon will load the icons as font-icons, allowing for an easier change of icons colors.\n- icons: - *list* - acceptsa list of strings with the name of the icons or imgs you want to load for the iconbar. Place them in the order you want them to appear. Just pass to the array the name of the foundation `icons <http://zurb.com/playground/foundation-icon-fonts-3>`_ preceded by \"fi-\". (check the example)\n- labels: - *list* - defaults to empty. List of strings that will display under the icons (if you need it). Write them in the same order as their corresponding icons.\n\n**example**::\n\n\t{% call components.iconbar(number=\"four\", vertical=True, icons=[\"fi-home\", \"fi-bookmark\", \"fi-info\", \"fi-anchor\"], labels=[\"Home\", \"Bookmarks\", \"info\", \"anchor\"]) %}\n \n\t{% endcall%}\n\n\n\ncomponents.offcanvas\n++++++++++++++++++++++\n\n`Foundation docs: offcanvas <http://foundation.zurb.com/docs/components/offcanvas.html>`_\n\nJust the basic off canvas markup. Remeber all of your web content should fit inside of the **call**.\n\n**example**::\n\n\t{% call components.offcanvas() %}\n\t\t<!-- Off Canvas Menu -->\n\t\t <aside class=\"left-off-canvas-menu\">\n\t\t <!-- whatever you want goes here -->\n\t\t <ul>\n\t\t <li><a href=\"#\">Item 1</a></li>\n\t\t ...\n\t\t </ul>\n\t\t </aside>\n\n\t\t <!-- main content goes here -->\n\t\t <p>Set in the year 0 F.E. (\"Foundation Era\"), The Psychohistorians opens on Trantor, the capital of the 12,000-year-old Galactic Empire. Though the empire appears stable and powerful, it is slowly decaying in ways that parallel the decline of the Western Roman Empire. Hari Seldon, a mathematician and psychologist, has developed psychohistory, a new field of science and psychology that equates all possibilities in large societies to mathematics, allowing for the prediction of future events.</p>\n {% endcall %}", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ondoheer/flask-zurb-foundation", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Flask-Zurb-Foundation", "package_url": "https://pypi.org/project/Flask-Zurb-Foundation/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Zurb-Foundation/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ondoheer/flask-zurb-foundation" }, "release_url": "https://pypi.org/project/Flask-Zurb-Foundation/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "A Foundation Wrapper for Flask", "version": "0.2.1" }, "last_serial": 1496661, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "06c43f3c99046a77c886abf93498203a", "sha256": "2a32e6d6df9eea94e6276fa8eb20c8903412ea473519ddb021d7fa3f8bd41a4d" }, "downloads": -1, "filename": "Flask-Zurb-Foundation-0.2.0.tar.gz", "has_sig": false, "md5_digest": "06c43f3c99046a77c886abf93498203a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 602518, "upload_time": "2015-03-24T23:01:31", "url": "https://files.pythonhosted.org/packages/4f/92/4fe19837f4f24a75c3cce81236b5a82e0faa6e9ed4c1dd321fb63bd35b56/Flask-Zurb-Foundation-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7e096c621a23d98387536f45e5342dc6", "sha256": "d58b336d6120bbeac46415b7b560f57be1064770cacf4c70a1bb0a23dd37ac92" }, "downloads": -1, "filename": "Flask-Zurb-Foundation-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7e096c621a23d98387536f45e5342dc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 598918, "upload_time": "2015-04-09T01:49:44", "url": "https://files.pythonhosted.org/packages/6b/6e/d145a4e447764a50ec2b414f98adebbb7cebceeff02f4d7d7980bb511365/Flask-Zurb-Foundation-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7e096c621a23d98387536f45e5342dc6", "sha256": "d58b336d6120bbeac46415b7b560f57be1064770cacf4c70a1bb0a23dd37ac92" }, "downloads": -1, "filename": "Flask-Zurb-Foundation-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7e096c621a23d98387536f45e5342dc6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 598918, "upload_time": "2015-04-09T01:49:44", "url": "https://files.pythonhosted.org/packages/6b/6e/d145a4e447764a50ec2b414f98adebbb7cebceeff02f4d7d7980bb511365/Flask-Zurb-Foundation-0.2.1.tar.gz" } ] }