├── demo_zinnia_bootstrap ├── __init__.py ├── urls.py └── settings.py ├── zinnia_bootstrap ├── static │ └── zinnia_bootstrap │ │ ├── img │ │ └── zinnia.png │ │ ├── assets │ │ ├── ico │ │ │ ├── apple-touch-icon-114-precomposed.png │ │ │ ├── apple-touch-icon-144-precomposed.png │ │ │ ├── apple-touch-icon-57-precomposed.png │ │ │ └── apple-touch-icon-72-precomposed.png │ │ └── js │ │ │ ├── html5shiv.js │ │ │ └── respond.min.js │ │ └── bootstrap │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.svg │ │ └── js │ │ ├── bootstrap.min.js │ │ └── bootstrap.js ├── __init__.py └── templates │ ├── zinnia │ ├── tags │ │ ├── breadcrumbs.html │ │ ├── entries_similar.html │ │ ├── entries_random.html │ │ ├── entries_recent.html │ │ ├── entries_popular.html │ │ ├── linkbacks_recent.html │ │ ├── comments_recent.html │ │ ├── categories.html │ │ ├── authors.html │ │ ├── search_form.html │ │ └── pagination.html │ ├── tag_list.html │ ├── author_list.html │ ├── category_list.html │ ├── sitemap.html │ ├── entry_search.html │ ├── base.html │ ├── _entry_detail_base.html │ ├── skeleton.html │ └── entry_detail_base.html │ └── comments │ └── zinnia │ └── entry │ └── form.html ├── MANIFEST.in ├── .gitignore ├── setup.py ├── README.rst ├── versions.cfg └── LICENSE.txt /demo_zinnia_bootstrap/__init__.py: -------------------------------------------------------------------------------- 1 | """Demo of Zinnia with zinnia-theme-bootstrap""" 2 | -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/img/zinnia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/img/zinnia.png -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include LICENSE.txt 3 | include versions.cfg 4 | include buildout.cfg 5 | include bootstrap.py 6 | recursive-include zinnia_bootstrap/templates *.html 7 | recursive-include zinnia_bootstrap/static * 8 | -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-114-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-114-precomposed.png -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-144-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-144-precomposed.png -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-57-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-57-precomposed.png -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-72-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/assets/ico/apple-touch-icon-72-precomposed.png -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/django-blog-zinnia/zinnia-theme-bootstrap/HEAD/zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /zinnia_bootstrap/__init__.py: -------------------------------------------------------------------------------- 1 | """zinnia_bootstrap""" 2 | __version__ = '0.5.2' 3 | __license__ = 'BSD License' 4 | 5 | __author__ = 'Fantomas42' 6 | __email__ = 'fantomas42@gmail.com' 7 | 8 | __url__ = 'https://github.com/Fantomas42/zinnia-theme-bootstrap' 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.pyc 3 | TODO 4 | README.html 5 | bin 6 | lib 7 | dist 8 | eggs 9 | parts 10 | build 11 | include 12 | downloads 13 | src_eggs 14 | develop-eggs 15 | .installed.cfg 16 | .sass-cache 17 | uploads 18 | django-apps-src 19 | demo_zinnia_bootstrap/demo.db* 20 | zinnia_theme_bootstrap.egg-info 21 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/entries_similar.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 13 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/entries_random.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 13 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/entries_recent.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 13 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/entries_popular.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 17 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/linkbacks_recent.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 18 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/comments_recent.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 19 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tag_list.html: -------------------------------------------------------------------------------- 1 | {% extends "zinnia:zinnia/tag_list.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |

{% trans "Tag list" %}

6 | 7 | 22 | {% endblock content %} 23 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/categories.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 18 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/authors.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 19 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/author_list.html: -------------------------------------------------------------------------------- 1 | {% extends "zinnia:zinnia/author_list.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |

{% trans "Author list" %}

6 | 7 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/category_list.html: -------------------------------------------------------------------------------- 1 | {% extends "zinnia:zinnia/category_list.html" %} 2 | {% load i18n %} 3 | 4 | {% block content %} 5 |

{% trans "Category list" %}

6 | 7 | 23 | {% endblock content %} 24 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/sitemap.html: -------------------------------------------------------------------------------- 1 | {% extends "zinnia:zinnia/sitemap.html" %} 2 | {% load i18n zinnia mptt_tags %} 3 | 4 | {% block content %} 5 |

{% trans "Sitemap" %}

6 | 7 |
8 |

{% trans "Entries per categories" %}

9 | {% for category in categories %} 10 |

{{ category }}

11 | 27 | {% endfor %} 28 |
29 | 30 |
31 |

{% trans "Monthly archives" %}

32 | {% get_archives_entries %} 33 |
34 | {% endblock content %} 35 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/search_form.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 24 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | """Setup script for zinnia-theme-bootstrap""" 2 | from setuptools import setup 3 | from setuptools import find_packages 4 | 5 | import zinnia_bootstrap 6 | 7 | setup( 8 | name='zinnia-theme-bootstrap', 9 | version=zinnia_bootstrap.__version__, 10 | 11 | description='Bootstrap theme for django-blog-zinnia', 12 | long_description=open('README.rst').read(), 13 | 14 | keywords='django, blog, weblog, zinnia, theme, skin, bootstrap', 15 | 16 | author=zinnia_bootstrap.__author__, 17 | author_email=zinnia_bootstrap.__email__, 18 | url=zinnia_bootstrap.__url__, 19 | 20 | packages=find_packages(exclude=['demo_zinnia_bootstrap']), 21 | classifiers=[ 22 | 'Framework :: Django', 23 | 'Development Status :: 5 - Production/Stable', 24 | 'Environment :: Web Environment', 25 | 'Programming Language :: Python', 26 | 'Programming Language :: Python :: 3', 27 | 'Intended Audience :: Developers', 28 | 'Operating System :: OS Independent', 29 | 'License :: OSI Approved :: BSD License', 30 | 'Topic :: Software Development :: Libraries :: Python Modules'], 31 | 32 | license=zinnia_bootstrap.__license__, 33 | include_package_data=True, 34 | zip_safe=False 35 | ) 36 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | Zinnia-theme-bootstrap 3 | ====================== 4 | 5 | Zinnia-theme-bootstrap is a python package providing a theme built on 6 | `Bootstrap 3` for `django-blog-zinnia`_. 7 | 8 | Installation 9 | ============ 10 | 11 | First of all you need to install and configure 12 | `django-app-namespace-template-loader`_ into your project. 13 | 14 | The once `Zinnia is installed`_ on your Django project and this package 15 | installed on your `PYTHON_PATH`, simply register the `zinnia_bootstrap` 16 | application in the `INSTALLED_APP` section of your project's settings. 17 | 18 | Now Zinnia is Bootstrap ready. 19 | 20 | .. warning:: 21 | * `zinnia_bootstrap` must be registered before the `zinnia` app to bypass 22 | the loading of the Zinnia's templates. 23 | * You need to use the ``django.template.loaders.eggs.Loader`` template 24 | loader if you have installed the package as an egg. 25 | 26 | 27 | .. _`Bootstrap 3`: http://getbootstrap.com/ 28 | .. _`django-blog-zinnia`: http://www.django-blog-zinnia.com/ 29 | .. _`django-app-namespace-template-loader`: https://github.com/Fantomas42/django-app-namespace-template-loader 30 | .. _`Zinnia is installed`: http://docs.django-blog-zinnia.com/en/latest/getting-started/install.html 31 | 32 | -------------------------------------------------------------------------------- /versions.cfg: -------------------------------------------------------------------------------- 1 | [versions] 2 | beautifulsoup4 = 4.5.3 3 | buildout-versions-checker = 1.9.4 4 | configparser = 3.5.0 5 | django = 1.10.6 6 | django-app-namespace-template-loader = 0.4.1 7 | django-contrib-comments = 1.8.0 8 | django-mptt = 0.8.7 9 | django-tagging = 0.4.5 10 | django-xmlrpc = 0.1.7 11 | djangorecipe = 2.2.1 12 | enum34 = 1.1.6 13 | flake8 = 3.3.0 14 | flake8-import-order = 0.12 15 | futures = 3.0.5 16 | gp.vcsdevelop = 2.2.3 17 | mccabe = 0.6.1 18 | mots-vides = 2015.5.11 19 | olefile = 0.44 20 | pep8-naming = 0.4.1 21 | pillow = 4.0.0 22 | pycodestyle = 2.3.1 23 | pyflakes = 1.5.0 24 | pytz = 2016.10 25 | regex = 2017.2.8 26 | zc.buildout = 2.9.1 27 | zc.recipe.egg = 2.0.3 28 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/entry_search.html: -------------------------------------------------------------------------------- 1 | {% extends "zinnia:zinnia/entry_search.html" %} 2 | {% load i18n zinnia %} 3 | 4 | {% block content-title %} 5 |

{% blocktrans %}Search results for '{{ pattern }}'{% endblocktrans %}

6 | 7 | {% if error %} 8 |

{{ error }}

9 | {% else %} 10 |

11 | 12 | 13 | {% blocktrans %}RSS feed of search results for '{{ pattern }}'{% endblocktrans %} 14 | 15 |

16 | {% endif %} 17 | 18 | {% if object_list %} 19 |

20 | {% blocktrans count entry_count=paginator.count %}{{ entry_count }} entry found{% plural %}{{ entry_count }} entries found{% endblocktrans %} 21 |

22 | {% endif %} 23 | 24 | {% endblock content-title %} 25 | 26 | {% block content-loop %} 27 | {% if not error %} 28 | {% for object in object_list %} 29 | {% zinnia_loop_template object.content_template as template %} 30 | {% include template with object_content=object.html_preview continue_reading=1 %} 31 | {% empty %} 32 |

{% trans "Nothing found." %}

33 | {% endfor %} 34 | {% endif %} 35 | {% endblock content-loop %} 36 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012, Julien Fache 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 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following 12 | disclaimer in the documentation and/or other materials provided 13 | with the distribution. 14 | * Neither the name of the author nor the names of other 15 | contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /demo_zinnia_bootstrap/urls.py: -------------------------------------------------------------------------------- 1 | """Urls for the zinnia-theme-bootstrap demo""" 2 | from django.conf import settings 3 | from django.conf.urls import include 4 | from django.conf.urls import url 5 | from django.contrib import admin 6 | from django.contrib.sitemaps.views import index 7 | from django.contrib.sitemaps.views import sitemap 8 | from django.views.defaults import bad_request 9 | from django.views.defaults import page_not_found 10 | from django.views.defaults import permission_denied 11 | from django.views.defaults import server_error 12 | from django.views.generic.base import RedirectView 13 | from django.views.static import serve 14 | 15 | from zinnia.sitemaps import AuthorSitemap 16 | from zinnia.sitemaps import CategorySitemap 17 | from zinnia.sitemaps import EntrySitemap 18 | from zinnia.sitemaps import TagSitemap 19 | 20 | 21 | urlpatterns = [ 22 | url(r'^$', RedirectView.as_view(url='/blog/', permanent=True)), 23 | url(r'^blog/', include('zinnia.urls', namespace='zinnia')), 24 | url(r'^comments/', include('django_comments.urls')), 25 | url(r'^i18n/', include('django.conf.urls.i18n')), 26 | url(r'^admin/', admin.site.urls), 27 | ] 28 | 29 | sitemaps = { 30 | 'tags': TagSitemap, 31 | 'blog': EntrySitemap, 32 | 'authors': AuthorSitemap, 33 | 'categories': CategorySitemap 34 | } 35 | 36 | urlpatterns += [ 37 | url(r'^sitemap.xml$', 38 | index, 39 | {'sitemaps': sitemaps}), 40 | url(r'^sitemap-(?P
.+)\.xml$', 41 | sitemap, 42 | {'sitemaps': sitemaps}), 43 | ] 44 | 45 | urlpatterns += [ 46 | url(r'^400/$', bad_request), 47 | url(r'^403/$', permission_denied), 48 | url(r'^404/$', page_not_found), 49 | url(r'^500/$', server_error), 50 | ] 51 | 52 | if settings.DEBUG: 53 | urlpatterns += [ 54 | url(r'^media/(?P.*)$', serve, 55 | {'document_root': settings.MEDIA_ROOT}) 56 | ] 57 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/comments/zinnia/entry/form.html: -------------------------------------------------------------------------------- 1 | {% load comments i18n %} 2 |
3 |
{% csrf_token %}
4 | {% if form.non_field_errors %} 5 |
6 | {{ form.non_field_errors }} 7 |
8 | {% endif %} 9 |
10 | {% trans "Post your comment" %} 11 | 12 | {% for field in form %} 13 | {% if field.is_hidden %}{{ field }}{% else %} 14 | {% if user.email and field.name in "namemailurl" %}{% else %} 15 |
41 |
42 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/tags/pagination.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 62 | -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/assets/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",version:"3.6.2pre",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d 6 |
7 | {% trans "Welcome!" %} 8 |
9 |
10 |

11 | {% trans "This simple theme is the default appearance of Zinnia." %} 12 |

13 |

14 | {% trans "Don't hesitate to override the template zinnia/base.html to start customizing your Weblog." %} 15 |

16 |
17 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 | {% if user.is_authenticated %} 61 | 92 | {% endif %} 93 | {% endblock sidebar %} 94 | -------------------------------------------------------------------------------- /demo_zinnia_bootstrap/settings.py: -------------------------------------------------------------------------------- 1 | """Settings for the zinnia-theme-bootstrap demo""" 2 | import os 3 | 4 | gettext = lambda s: s # noqa 5 | 6 | DEBUG = True 7 | 8 | DATABASES = {'default': 9 | {'ENGINE': 'django.db.backends.sqlite3', 10 | 'NAME': os.path.join(os.path.dirname(__file__), 'demo.db')} 11 | } 12 | 13 | TIME_ZONE = 'Europe/Paris' 14 | 15 | STATIC_URL = '/static/' 16 | 17 | MEDIA_URL = '/media/' 18 | 19 | SECRET_KEY = 'jo-1rzm(%sf)3#n+fb7h945ybv3xpt63abhi12_t7e^^5q8dyw' 20 | 21 | USE_TZ = True 22 | USE_I18N = True 23 | USE_L10N = True 24 | 25 | SITE_ID = 1 26 | 27 | LANGUAGE_CODE = 'en' 28 | 29 | LANGUAGES = ( 30 | ('en', gettext('English')), 31 | ('fr', gettext('French')), 32 | ('de', gettext('German')), 33 | ('es', gettext('Spanish')), 34 | ('it', gettext('Italian')), 35 | ('nl', gettext('Dutch')), 36 | ('sl', gettext('Slovenian')), 37 | ('bg', gettext('Bulgarian')), 38 | ('hu', gettext('Hungarian')), 39 | ('cs', gettext('Czech')), 40 | ('sk', gettext('Slovak')), 41 | ('lt', gettext('Lithuanian')), 42 | ('ru', gettext('Russian')), 43 | ('pl', gettext('Polish')), 44 | ('eu', gettext('Basque')), 45 | ('he', gettext('Hebrew')), 46 | ('ca', gettext('Catalan')), 47 | ('tr', gettext('Turkish')), 48 | ('sv', gettext('Swedish')), 49 | ('is', gettext('Icelandic')), 50 | ('hr_HR', gettext('Croatian')), 51 | ('pt_BR', gettext('Brazilian Portuguese')), 52 | ('fa_IR', gettext('Persian')), 53 | ('fi_FI', gettext('Finnish')), 54 | ('uk_UA', gettext('Ukrainian')), 55 | ('zh-hans', gettext('Simplified Chinese')), 56 | ) 57 | 58 | MIDDLEWARE = [ 59 | 'django.middleware.security.SecurityMiddleware', 60 | 'django.contrib.sessions.middleware.SessionMiddleware', 61 | 'django.middleware.common.CommonMiddleware', 62 | 'django.middleware.csrf.CsrfViewMiddleware', 63 | 'django.middleware.locale.LocaleMiddleware', 64 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 65 | 'django.contrib.messages.middleware.MessageMiddleware', 66 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 67 | ] 68 | 69 | ROOT_URLCONF = 'demo_zinnia_bootstrap.urls' 70 | 71 | TEMPLATES = [ 72 | { 73 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 74 | 'OPTIONS': { 75 | 'loaders': [ 76 | 'app_namespace.Loader', 77 | 'django.template.loaders.app_directories.Loader', 78 | ], 79 | 'context_processors': [ 80 | 'django.contrib.auth.context_processors.auth', 81 | 'django.template.context_processors.i18n', 82 | 'django.template.context_processors.request', 83 | 'django.contrib.messages.context_processors.messages', 84 | 'zinnia.context_processors.version', 85 | ] 86 | } 87 | } 88 | ] 89 | 90 | INSTALLED_APPS = ( 91 | 'django.contrib.auth', 92 | 'django.contrib.sitemaps', 93 | 'django.contrib.contenttypes', 94 | 'django.contrib.sessions', 95 | 'django.contrib.messages', 96 | 'django.contrib.sites', 97 | 'django.contrib.admin', 98 | 'django.contrib.admindocs', 99 | 'django.contrib.staticfiles', 100 | 'django_comments', 101 | 'mptt', 102 | 'tagging', 103 | 'zinnia_bootstrap', 104 | 'zinnia', 105 | ) 106 | -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/assets/js/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */ 2 | /*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */ 3 | window.matchMedia=window.matchMedia||function(a){"use strict";var c,d=a.documentElement,e=d.firstElementChild||d.firstChild,f=a.createElement("body"),g=a.createElement("div");return g.id="mq-test-1",g.style.cssText="position:absolute;top:-100em",f.style.background="none",f.appendChild(g),function(a){return g.innerHTML='­',d.insertBefore(f,e),c=42===g.offsetWidth,d.removeChild(f),{matches:c,media:a}}}(document); 4 | 5 | /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 6 | (function(a){"use strict";function x(){u(!0)}var b={};a.respond=b,b.update=function(){},b.mediaQueriesSupported=a.matchMedia&&a.matchMedia("only all").matches,b.mediaQueriesSupported;var q,r,t,c=a.document,d=c.documentElement,e=[],f=[],g=[],h={},i=30,j=c.getElementsByTagName("head")[0]||d,k=c.getElementsByTagName("base")[0],l=j.getElementsByTagName("link"),m=[],n=function(){for(var b=0;l.length>b;b++){var c=l[b],d=c.href,e=c.media,f=c.rel&&"stylesheet"===c.rel.toLowerCase();d&&f&&!h[d]&&(c.styleSheet&&c.styleSheet.rawCssText?(p(c.styleSheet.rawCssText,d,e),h[d]=!0):(!/^([a-zA-Z:]*\/\/)/.test(d)&&!k||d.replace(RegExp.$1,"").split("/")[0]===a.location.host)&&m.push({href:d,media:e}))}o()},o=function(){if(m.length){var a=m.shift();v(a.href,function(b){p(b,a.href,a.media),h[a.href]=!0,setTimeout(function(){o()},0)})}},p=function(a,b,c){var d=a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),g=d&&d.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+b+"$2$3")},i=!g&&c;b.length&&(b+="/"),i&&(g=1);for(var j=0;g>j;j++){var k,l,m,n;i?(k=c,f.push(h(a))):(k=d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,f.push(RegExp.$2&&h(RegExp.$2))),m=k.split(","),n=m.length;for(var o=0;n>o;o++)l=m[o],e.push({media:l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:f.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},s=function(){var a,b=c.createElement("div"),e=c.body,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",e||(e=f=c.createElement("body"),e.style.background="none"),e.appendChild(b),d.insertBefore(e,d.firstChild),a=b.offsetWidth,f?d.removeChild(e):e.removeChild(b),a=t=parseFloat(a)},u=function(a){var b="clientWidth",h=d[b],k="CSS1Compat"===c.compatMode&&h||c.body[b]||h,m={},n=l[l.length-1],o=(new Date).getTime();if(a&&q&&i>o-q)return clearTimeout(r),r=setTimeout(u,i),void 0;q=o;for(var p in e)if(e.hasOwnProperty(p)){var v=e[p],w=v.minw,x=v.maxw,y=null===w,z=null===x,A="em";w&&(w=parseFloat(w)*(w.indexOf(A)>-1?t||s():1)),x&&(x=parseFloat(x)*(x.indexOf(A)>-1?t||s():1)),v.hasquery&&(y&&z||!(y||k>=w)||!(z||x>=k))||(m[v.media]||(m[v.media]=[]),m[v.media].push(f[v.rules]))}for(var B in g)g.hasOwnProperty(B)&&g[B]&&g[B].parentNode===j&&j.removeChild(g[B]);for(var C in m)if(m.hasOwnProperty(C)){var D=c.createElement("style"),E=m[C].join("\n");D.type="text/css",D.media=C,j.insertBefore(D,n.nextSibling),D.styleSheet?D.styleSheet.cssText=E:D.appendChild(c.createTextNode(E)),g.push(D)}},v=function(a,b){var c=w();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},w=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}();n(),b.update=n,a.addEventListener?a.addEventListener("resize",x,!1):a.attachEvent&&a.attachEvent("onresize",x)})(this); 7 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/_entry_detail_base.html: -------------------------------------------------------------------------------- 1 | {% load comments i18n zinnia %} 2 |
3 | {% block entry-header %} 4 |
5 |

6 | {% block entry-title %} 7 | 8 | {{ object.title|widont }} 9 | 10 | {% endblock entry-title %} 11 | {% block entry-info %} 12 |
13 | 43 | {% endblock entry-info %} 44 |

45 | {% block entry-last-update %} 46 | 49 | {% endblock entry-last-update %} 50 |
51 | {% endblock entry-header %} 52 | 53 | {% block entry-body %} 54 |
55 | {% block entry-image %} 56 | {% if object.image %} 57 |
58 |

59 | {% if continue_reading %} 60 | 61 | {% endif %} 62 | {{ object.title }} 63 | {% if continue_reading %} 64 | 65 | {% endif %} 66 |

67 |
68 | {% endif %} 69 | {% endblock entry-image %} 70 | {% block entry-content %} 71 |
72 | {{ object_content|safe }} 73 |
74 | {% endblock entry-content %} 75 | {% block continue-reading %} 76 | {% if continue_reading and object_content.has_more %} 77 |

78 | 81 | {% trans "Continue reading" %} 82 | 83 |

84 | {% endif %} 85 | {% endblock continue-reading %} 86 |
87 | {% endblock entry-body %} 88 | 89 | {% block entry-footer %} 90 | 157 | {% endblock entry-footer %} 158 |
159 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/skeleton.html: -------------------------------------------------------------------------------- 1 | {% load i18n staticfiles %} 2 | 3 | 4 | 5 | 6 | Zinnia's Weblog - {% block title %}{% endblock title %}{% block title-page %}{% endblock title-page %} 7 | 8 | 9 | 10 | 11 | 12 | {% block meta %}{% endblock meta %} 13 | 14 | 15 | 16 | 28 | 32 | 33 | 34 | 35 | 36 | 37 | {% block link %}{% endblock link %} 38 | {% block script %}{% endblock script %} 39 | 40 | 41 | 103 | {% block slider %}{% endblock %} 104 |
105 |
106 |
107 | {% block breadcrumbs %}{% endblock %} 108 | {% block content %} 109 | 124 | 128 | {% endblock content %} 129 |
130 | 134 |
135 |
136 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /zinnia_bootstrap/templates/zinnia/entry_detail_base.html: -------------------------------------------------------------------------------- 1 | {% extends "zinnia:zinnia/entry_detail_base.html" %} 2 | {% load i18n zinnia %} 3 | 4 | {% block entry-widgets %} 5 | 57 | {% endblock entry-widgets %} 58 | 59 | {% block entry-pingbacks %} 60 | {% if object.pingback_count %} 61 |
62 |
63 | {% trans "Pingbacks" %} 64 |
65 | {% with pingback_list=object.pingbacks %} 66 | {% block pingbacks-loop %} 67 |
    68 | {% for pingback in pingback_list %} 69 |
  1. 70 | {% block pingback-info %} 71 |

    72 | {{ pingback.name }} 74 | {% trans "on" context "on date" %} 75 | 76 | {{ pingback.submit_date|date:"SHORT_DATETIME_FORMAT" }} 77 | 78 | # 81 |

    82 | {% endblock pingback-info %} 83 | {% block pingback-content %} 84 |

    85 | {{ pingback.comment }} 86 |

    87 | {% endblock pingback-content %} 88 |
  2. 89 | {% endfor %} 90 |
91 | {% endblock pingbacks-loop %} 92 | {% endwith %} 93 |
94 | {% endif %} 95 | {% block pingbacks-status %} 96 | {% if object.pingbacks_are_open %} 97 |

{% trans "Pingbacks are open." %}

98 | {% else %} 99 |

{% trans "Pingbacks are closed." %}

100 | {% endif %} 101 | {% endblock pingbacks-status %} 102 | {% endblock entry-pingbacks %} 103 | 104 | {% block entry-trackbacks %} 105 | {% if object.trackback_count %} 106 |
107 |
108 | {% trans "Trackbacks" %} 109 |
110 | {% with trackback_list=object.trackbacks %} 111 | {% block trackbacks-loop %} 112 |
    113 | {% for trackback in trackback_list %} 114 |
  1. 115 | {% block trackback-info %} 116 |

    117 | {{ trackback.name }} 119 | {% trans "on" context "on date" %} 120 | 121 | {{ trackback.submit_date|date:"SHORT_DATETIME_FORMAT" }} 122 | 123 | # 126 |

    127 | {% endblock trackback-info %} 128 | {% block trackback-content %} 129 |

    130 | {{ trackback.comment }} 131 |

    132 | {% endblock trackback-content %} 133 |
  2. 134 | {% endfor %} 135 |
136 | {% endblock trackbacks-loop %} 137 | {% endwith %} 138 |
139 | {% endif %} 140 | {% block trackbacks-status %} 141 | {% if object.trackbacks_are_open %} 142 |

143 | 144 | {% trans "Trackback URL" %} 145 |

146 | {% endif %} 147 | {% endblock trackbacks-status %} 148 | {% endblock entry-trackbacks %} 149 | 150 | {% block entry-comments %} 151 | {% if object.comment_count %} 152 |
153 |
154 | {% trans "Comments" %} 155 |
156 | {% with comment_list=object.comments %} 157 | {% block comments-loop %} 158 |
    159 | {% for comment in comment_list %} 160 |
  1. 162 | {% block comment-info %} 163 |

    164 | {% block comment-image %} 165 | {{ comment.name }} 167 | {% endblock comment-image %} 168 | {% if comment.url %} 169 | {{ comment.name }} 171 | {% else %} 172 | {{ comment.name }} 173 | {% endif %} 174 | {% trans "on" context "on date" %} 175 | 176 | {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }} 177 | 178 | # 181 |

    182 | {% endblock comment-info %} 183 | {% block comment-content %} 184 | {{ comment.comment|linebreaks }} 185 | {% endblock comment-content %} 186 |
  2. 187 | {% endfor %} 188 |
189 | {% endblock comments-loop %} 190 | {% endwith %} 191 |
192 | {% else %} 193 | {% if object.comments_are_open %} 194 |

{% trans "No comments yet." %}

195 | {% else %} 196 |

{% trans "Comments are closed." %}

197 | {% endif %} 198 | {% endif %} 199 | {% endblock entry-comments %} 200 | 201 | {% block admin-tools %} 202 | {% if perms.zinnia.change_entry %} 203 |
  • 204 | 205 | 206 | {% trans "Edit the entry" %} 207 | 208 |
  • 209 | {% endif %} 210 | {% endblock admin-tools %} 211 | -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * bootstrap.js v3.0.0 by @fat and @mdo 3 | * Copyright 2013 Twitter Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0 5 | */ 6 | if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery); -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/fonts/glyphicons-halflings-regular.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | -------------------------------------------------------------------------------- /zinnia_bootstrap/static/zinnia_bootstrap/bootstrap/js/bootstrap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * bootstrap.js v3.0.0 by @fat and @mdo 3 | * Copyright 2013 Twitter Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0 5 | */ 6 | if (!jQuery) { throw new Error("Bootstrap requires jQuery") } 7 | 8 | /* ======================================================================== 9 | * Bootstrap: transition.js v3.0.0 10 | * http://twbs.github.com/bootstrap/javascript.html#transitions 11 | * ======================================================================== 12 | * Copyright 2013 Twitter, Inc. 13 | * 14 | * Licensed under the Apache License, Version 2.0 (the "License"); 15 | * you may not use this file except in compliance with the License. 16 | * You may obtain a copy of the License at 17 | * 18 | * http://www.apache.org/licenses/LICENSE-2.0 19 | * 20 | * Unless required by applicable law or agreed to in writing, software 21 | * distributed under the License is distributed on an "AS IS" BASIS, 22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | * See the License for the specific language governing permissions and 24 | * limitations under the License. 25 | * ======================================================================== */ 26 | 27 | 28 | +function ($) { "use strict"; 29 | 30 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 31 | // ============================================================ 32 | 33 | function transitionEnd() { 34 | var el = document.createElement('bootstrap') 35 | 36 | var transEndEventNames = { 37 | 'WebkitTransition' : 'webkitTransitionEnd' 38 | , 'MozTransition' : 'transitionend' 39 | , 'OTransition' : 'oTransitionEnd otransitionend' 40 | , 'transition' : 'transitionend' 41 | } 42 | 43 | for (var name in transEndEventNames) { 44 | if (el.style[name] !== undefined) { 45 | return { end: transEndEventNames[name] } 46 | } 47 | } 48 | } 49 | 50 | // http://blog.alexmaccaw.com/css-transitions 51 | $.fn.emulateTransitionEnd = function (duration) { 52 | var called = false, $el = this 53 | $(this).one($.support.transition.end, function () { called = true }) 54 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 55 | setTimeout(callback, duration) 56 | return this 57 | } 58 | 59 | $(function () { 60 | $.support.transition = transitionEnd() 61 | }) 62 | 63 | }(window.jQuery); 64 | 65 | /* ======================================================================== 66 | * Bootstrap: alert.js v3.0.0 67 | * http://twbs.github.com/bootstrap/javascript.html#alerts 68 | * ======================================================================== 69 | * Copyright 2013 Twitter, Inc. 70 | * 71 | * Licensed under the Apache License, Version 2.0 (the "License"); 72 | * you may not use this file except in compliance with the License. 73 | * You may obtain a copy of the License at 74 | * 75 | * http://www.apache.org/licenses/LICENSE-2.0 76 | * 77 | * Unless required by applicable law or agreed to in writing, software 78 | * distributed under the License is distributed on an "AS IS" BASIS, 79 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 80 | * See the License for the specific language governing permissions and 81 | * limitations under the License. 82 | * ======================================================================== */ 83 | 84 | 85 | +function ($) { "use strict"; 86 | 87 | // ALERT CLASS DEFINITION 88 | // ====================== 89 | 90 | var dismiss = '[data-dismiss="alert"]' 91 | var Alert = function (el) { 92 | $(el).on('click', dismiss, this.close) 93 | } 94 | 95 | Alert.prototype.close = function (e) { 96 | var $this = $(this) 97 | var selector = $this.attr('data-target') 98 | 99 | if (!selector) { 100 | selector = $this.attr('href') 101 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 102 | } 103 | 104 | var $parent = $(selector) 105 | 106 | if (e) e.preventDefault() 107 | 108 | if (!$parent.length) { 109 | $parent = $this.hasClass('alert') ? $this : $this.parent() 110 | } 111 | 112 | $parent.trigger(e = $.Event('close.bs.alert')) 113 | 114 | if (e.isDefaultPrevented()) return 115 | 116 | $parent.removeClass('in') 117 | 118 | function removeElement() { 119 | $parent.trigger('closed.bs.alert').remove() 120 | } 121 | 122 | $.support.transition && $parent.hasClass('fade') ? 123 | $parent 124 | .one($.support.transition.end, removeElement) 125 | .emulateTransitionEnd(150) : 126 | removeElement() 127 | } 128 | 129 | 130 | // ALERT PLUGIN DEFINITION 131 | // ======================= 132 | 133 | var old = $.fn.alert 134 | 135 | $.fn.alert = function (option) { 136 | return this.each(function () { 137 | var $this = $(this) 138 | var data = $this.data('bs.alert') 139 | 140 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 141 | if (typeof option == 'string') data[option].call($this) 142 | }) 143 | } 144 | 145 | $.fn.alert.Constructor = Alert 146 | 147 | 148 | // ALERT NO CONFLICT 149 | // ================= 150 | 151 | $.fn.alert.noConflict = function () { 152 | $.fn.alert = old 153 | return this 154 | } 155 | 156 | 157 | // ALERT DATA-API 158 | // ============== 159 | 160 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 161 | 162 | }(window.jQuery); 163 | 164 | /* ======================================================================== 165 | * Bootstrap: button.js v3.0.0 166 | * http://twbs.github.com/bootstrap/javascript.html#buttons 167 | * ======================================================================== 168 | * Copyright 2013 Twitter, Inc. 169 | * 170 | * Licensed under the Apache License, Version 2.0 (the "License"); 171 | * you may not use this file except in compliance with the License. 172 | * You may obtain a copy of the License at 173 | * 174 | * http://www.apache.org/licenses/LICENSE-2.0 175 | * 176 | * Unless required by applicable law or agreed to in writing, software 177 | * distributed under the License is distributed on an "AS IS" BASIS, 178 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 179 | * See the License for the specific language governing permissions and 180 | * limitations under the License. 181 | * ======================================================================== */ 182 | 183 | 184 | +function ($) { "use strict"; 185 | 186 | // BUTTON PUBLIC CLASS DEFINITION 187 | // ============================== 188 | 189 | var Button = function (element, options) { 190 | this.$element = $(element) 191 | this.options = $.extend({}, Button.DEFAULTS, options) 192 | } 193 | 194 | Button.DEFAULTS = { 195 | loadingText: 'loading...' 196 | } 197 | 198 | Button.prototype.setState = function (state) { 199 | var d = 'disabled' 200 | var $el = this.$element 201 | var val = $el.is('input') ? 'val' : 'html' 202 | var data = $el.data() 203 | 204 | state = state + 'Text' 205 | 206 | if (!data.resetText) $el.data('resetText', $el[val]()) 207 | 208 | $el[val](data[state] || this.options[state]) 209 | 210 | // push to event loop to allow forms to submit 211 | setTimeout(function () { 212 | state == 'loadingText' ? 213 | $el.addClass(d).attr(d, d) : 214 | $el.removeClass(d).removeAttr(d); 215 | }, 0) 216 | } 217 | 218 | Button.prototype.toggle = function () { 219 | var $parent = this.$element.closest('[data-toggle="buttons"]') 220 | 221 | if ($parent.length) { 222 | var $input = this.$element.find('input') 223 | .prop('checked', !this.$element.hasClass('active')) 224 | .trigger('change') 225 | if ($input.prop('type') === 'radio') $parent.find('.active').removeClass('active') 226 | } 227 | 228 | this.$element.toggleClass('active') 229 | } 230 | 231 | 232 | // BUTTON PLUGIN DEFINITION 233 | // ======================== 234 | 235 | var old = $.fn.button 236 | 237 | $.fn.button = function (option) { 238 | return this.each(function () { 239 | var $this = $(this) 240 | var data = $this.data('bs.button') 241 | var options = typeof option == 'object' && option 242 | 243 | if (!data) $this.data('bs.button', (data = new Button(this, options))) 244 | 245 | if (option == 'toggle') data.toggle() 246 | else if (option) data.setState(option) 247 | }) 248 | } 249 | 250 | $.fn.button.Constructor = Button 251 | 252 | 253 | // BUTTON NO CONFLICT 254 | // ================== 255 | 256 | $.fn.button.noConflict = function () { 257 | $.fn.button = old 258 | return this 259 | } 260 | 261 | 262 | // BUTTON DATA-API 263 | // =============== 264 | 265 | $(document).on('click.bs.button.data-api', '[data-toggle^=button]', function (e) { 266 | var $btn = $(e.target) 267 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') 268 | $btn.button('toggle') 269 | e.preventDefault() 270 | }) 271 | 272 | }(window.jQuery); 273 | 274 | /* ======================================================================== 275 | * Bootstrap: carousel.js v3.0.0 276 | * http://twbs.github.com/bootstrap/javascript.html#carousel 277 | * ======================================================================== 278 | * Copyright 2012 Twitter, Inc. 279 | * 280 | * Licensed under the Apache License, Version 2.0 (the "License"); 281 | * you may not use this file except in compliance with the License. 282 | * You may obtain a copy of the License at 283 | * 284 | * http://www.apache.org/licenses/LICENSE-2.0 285 | * 286 | * Unless required by applicable law or agreed to in writing, software 287 | * distributed under the License is distributed on an "AS IS" BASIS, 288 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 289 | * See the License for the specific language governing permissions and 290 | * limitations under the License. 291 | * ======================================================================== */ 292 | 293 | 294 | +function ($) { "use strict"; 295 | 296 | // CAROUSEL CLASS DEFINITION 297 | // ========================= 298 | 299 | var Carousel = function (element, options) { 300 | this.$element = $(element) 301 | this.$indicators = this.$element.find('.carousel-indicators') 302 | this.options = options 303 | this.paused = 304 | this.sliding = 305 | this.interval = 306 | this.$active = 307 | this.$items = null 308 | 309 | this.options.pause == 'hover' && this.$element 310 | .on('mouseenter', $.proxy(this.pause, this)) 311 | .on('mouseleave', $.proxy(this.cycle, this)) 312 | } 313 | 314 | Carousel.DEFAULTS = { 315 | interval: 5000 316 | , pause: 'hover' 317 | , wrap: true 318 | } 319 | 320 | Carousel.prototype.cycle = function (e) { 321 | e || (this.paused = false) 322 | 323 | this.interval && clearInterval(this.interval) 324 | 325 | this.options.interval 326 | && !this.paused 327 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) 328 | 329 | return this 330 | } 331 | 332 | Carousel.prototype.getActiveIndex = function () { 333 | this.$active = this.$element.find('.item.active') 334 | this.$items = this.$active.parent().children() 335 | 336 | return this.$items.index(this.$active) 337 | } 338 | 339 | Carousel.prototype.to = function (pos) { 340 | var that = this 341 | var activeIndex = this.getActiveIndex() 342 | 343 | if (pos > (this.$items.length - 1) || pos < 0) return 344 | 345 | if (this.sliding) return this.$element.one('slid', function () { that.to(pos) }) 346 | if (activeIndex == pos) return this.pause().cycle() 347 | 348 | return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) 349 | } 350 | 351 | Carousel.prototype.pause = function (e) { 352 | e || (this.paused = true) 353 | 354 | if (this.$element.find('.next, .prev').length && $.support.transition.end) { 355 | this.$element.trigger($.support.transition.end) 356 | this.cycle(true) 357 | } 358 | 359 | this.interval = clearInterval(this.interval) 360 | 361 | return this 362 | } 363 | 364 | Carousel.prototype.next = function () { 365 | if (this.sliding) return 366 | return this.slide('next') 367 | } 368 | 369 | Carousel.prototype.prev = function () { 370 | if (this.sliding) return 371 | return this.slide('prev') 372 | } 373 | 374 | Carousel.prototype.slide = function (type, next) { 375 | var $active = this.$element.find('.item.active') 376 | var $next = next || $active[type]() 377 | var isCycling = this.interval 378 | var direction = type == 'next' ? 'left' : 'right' 379 | var fallback = type == 'next' ? 'first' : 'last' 380 | var that = this 381 | 382 | if (!$next.length) { 383 | if (!this.options.wrap) return 384 | $next = this.$element.find('.item')[fallback]() 385 | } 386 | 387 | this.sliding = true 388 | 389 | isCycling && this.pause() 390 | 391 | var e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction: direction }) 392 | 393 | if ($next.hasClass('active')) return 394 | 395 | if (this.$indicators.length) { 396 | this.$indicators.find('.active').removeClass('active') 397 | this.$element.one('slid', function () { 398 | var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) 399 | $nextIndicator && $nextIndicator.addClass('active') 400 | }) 401 | } 402 | 403 | if ($.support.transition && this.$element.hasClass('slide')) { 404 | this.$element.trigger(e) 405 | if (e.isDefaultPrevented()) return 406 | $next.addClass(type) 407 | $next[0].offsetWidth // force reflow 408 | $active.addClass(direction) 409 | $next.addClass(direction) 410 | $active 411 | .one($.support.transition.end, function () { 412 | $next.removeClass([type, direction].join(' ')).addClass('active') 413 | $active.removeClass(['active', direction].join(' ')) 414 | that.sliding = false 415 | setTimeout(function () { that.$element.trigger('slid') }, 0) 416 | }) 417 | .emulateTransitionEnd(600) 418 | } else { 419 | this.$element.trigger(e) 420 | if (e.isDefaultPrevented()) return 421 | $active.removeClass('active') 422 | $next.addClass('active') 423 | this.sliding = false 424 | this.$element.trigger('slid') 425 | } 426 | 427 | isCycling && this.cycle() 428 | 429 | return this 430 | } 431 | 432 | 433 | // CAROUSEL PLUGIN DEFINITION 434 | // ========================== 435 | 436 | var old = $.fn.carousel 437 | 438 | $.fn.carousel = function (option) { 439 | return this.each(function () { 440 | var $this = $(this) 441 | var data = $this.data('bs.carousel') 442 | var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) 443 | var action = typeof option == 'string' ? option : options.slide 444 | 445 | if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) 446 | if (typeof option == 'number') data.to(option) 447 | else if (action) data[action]() 448 | else if (options.interval) data.pause().cycle() 449 | }) 450 | } 451 | 452 | $.fn.carousel.Constructor = Carousel 453 | 454 | 455 | // CAROUSEL NO CONFLICT 456 | // ==================== 457 | 458 | $.fn.carousel.noConflict = function () { 459 | $.fn.carousel = old 460 | return this 461 | } 462 | 463 | 464 | // CAROUSEL DATA-API 465 | // ================= 466 | 467 | $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { 468 | var $this = $(this), href 469 | var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 470 | var options = $.extend({}, $target.data(), $this.data()) 471 | var slideIndex = $this.attr('data-slide-to') 472 | if (slideIndex) options.interval = false 473 | 474 | $target.carousel(options) 475 | 476 | if (slideIndex = $this.attr('data-slide-to')) { 477 | $target.data('bs.carousel').to(slideIndex) 478 | } 479 | 480 | e.preventDefault() 481 | }) 482 | 483 | $(window).on('load', function () { 484 | $('[data-ride="carousel"]').each(function () { 485 | var $carousel = $(this) 486 | $carousel.carousel($carousel.data()) 487 | }) 488 | }) 489 | 490 | }(window.jQuery); 491 | 492 | /* ======================================================================== 493 | * Bootstrap: collapse.js v3.0.0 494 | * http://twbs.github.com/bootstrap/javascript.html#collapse 495 | * ======================================================================== 496 | * Copyright 2012 Twitter, Inc. 497 | * 498 | * Licensed under the Apache License, Version 2.0 (the "License"); 499 | * you may not use this file except in compliance with the License. 500 | * You may obtain a copy of the License at 501 | * 502 | * http://www.apache.org/licenses/LICENSE-2.0 503 | * 504 | * Unless required by applicable law or agreed to in writing, software 505 | * distributed under the License is distributed on an "AS IS" BASIS, 506 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 507 | * See the License for the specific language governing permissions and 508 | * limitations under the License. 509 | * ======================================================================== */ 510 | 511 | 512 | +function ($) { "use strict"; 513 | 514 | // COLLAPSE PUBLIC CLASS DEFINITION 515 | // ================================ 516 | 517 | var Collapse = function (element, options) { 518 | this.$element = $(element) 519 | this.options = $.extend({}, Collapse.DEFAULTS, options) 520 | this.transitioning = null 521 | 522 | if (this.options.parent) this.$parent = $(this.options.parent) 523 | if (this.options.toggle) this.toggle() 524 | } 525 | 526 | Collapse.DEFAULTS = { 527 | toggle: true 528 | } 529 | 530 | Collapse.prototype.dimension = function () { 531 | var hasWidth = this.$element.hasClass('width') 532 | return hasWidth ? 'width' : 'height' 533 | } 534 | 535 | Collapse.prototype.show = function () { 536 | if (this.transitioning || this.$element.hasClass('in')) return 537 | 538 | var startEvent = $.Event('show.bs.collapse') 539 | this.$element.trigger(startEvent) 540 | if (startEvent.isDefaultPrevented()) return 541 | 542 | var actives = this.$parent && this.$parent.find('> .panel > .in') 543 | 544 | if (actives && actives.length) { 545 | var hasData = actives.data('bs.collapse') 546 | if (hasData && hasData.transitioning) return 547 | actives.collapse('hide') 548 | hasData || actives.data('bs.collapse', null) 549 | } 550 | 551 | var dimension = this.dimension() 552 | 553 | this.$element 554 | .removeClass('collapse') 555 | .addClass('collapsing') 556 | [dimension](0) 557 | 558 | this.transitioning = 1 559 | 560 | var complete = function () { 561 | this.$element 562 | .removeClass('collapsing') 563 | .addClass('in') 564 | [dimension]('auto') 565 | this.transitioning = 0 566 | this.$element.trigger('shown.bs.collapse') 567 | } 568 | 569 | if (!$.support.transition) return complete.call(this) 570 | 571 | var scrollSize = $.camelCase(['scroll', dimension].join('-')) 572 | 573 | this.$element 574 | .one($.support.transition.end, $.proxy(complete, this)) 575 | .emulateTransitionEnd(350) 576 | [dimension](this.$element[0][scrollSize]) 577 | } 578 | 579 | Collapse.prototype.hide = function () { 580 | if (this.transitioning || !this.$element.hasClass('in')) return 581 | 582 | var startEvent = $.Event('hide.bs.collapse') 583 | this.$element.trigger(startEvent) 584 | if (startEvent.isDefaultPrevented()) return 585 | 586 | var dimension = this.dimension() 587 | 588 | this.$element 589 | [dimension](this.$element[dimension]()) 590 | [0].offsetHeight 591 | 592 | this.$element 593 | .addClass('collapsing') 594 | .removeClass('collapse') 595 | .removeClass('in') 596 | 597 | this.transitioning = 1 598 | 599 | var complete = function () { 600 | this.transitioning = 0 601 | this.$element 602 | .trigger('hidden.bs.collapse') 603 | .removeClass('collapsing') 604 | .addClass('collapse') 605 | } 606 | 607 | if (!$.support.transition) return complete.call(this) 608 | 609 | this.$element 610 | [dimension](0) 611 | .one($.support.transition.end, $.proxy(complete, this)) 612 | .emulateTransitionEnd(350) 613 | } 614 | 615 | Collapse.prototype.toggle = function () { 616 | this[this.$element.hasClass('in') ? 'hide' : 'show']() 617 | } 618 | 619 | 620 | // COLLAPSE PLUGIN DEFINITION 621 | // ========================== 622 | 623 | var old = $.fn.collapse 624 | 625 | $.fn.collapse = function (option) { 626 | return this.each(function () { 627 | var $this = $(this) 628 | var data = $this.data('bs.collapse') 629 | var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) 630 | 631 | if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) 632 | if (typeof option == 'string') data[option]() 633 | }) 634 | } 635 | 636 | $.fn.collapse.Constructor = Collapse 637 | 638 | 639 | // COLLAPSE NO CONFLICT 640 | // ==================== 641 | 642 | $.fn.collapse.noConflict = function () { 643 | $.fn.collapse = old 644 | return this 645 | } 646 | 647 | 648 | // COLLAPSE DATA-API 649 | // ================= 650 | 651 | $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) { 652 | var $this = $(this), href 653 | var target = $this.attr('data-target') 654 | || e.preventDefault() 655 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 656 | var $target = $(target) 657 | var data = $target.data('bs.collapse') 658 | var option = data ? 'toggle' : $this.data() 659 | var parent = $this.attr('data-parent') 660 | var $parent = parent && $(parent) 661 | 662 | if (!data || !data.transitioning) { 663 | if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed') 664 | $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed') 665 | } 666 | 667 | $target.collapse(option) 668 | }) 669 | 670 | }(window.jQuery); 671 | 672 | /* ======================================================================== 673 | * Bootstrap: dropdown.js v3.0.0 674 | * http://twbs.github.com/bootstrap/javascript.html#dropdowns 675 | * ======================================================================== 676 | * Copyright 2012 Twitter, Inc. 677 | * 678 | * Licensed under the Apache License, Version 2.0 (the "License"); 679 | * you may not use this file except in compliance with the License. 680 | * You may obtain a copy of the License at 681 | * 682 | * http://www.apache.org/licenses/LICENSE-2.0 683 | * 684 | * Unless required by applicable law or agreed to in writing, software 685 | * distributed under the License is distributed on an "AS IS" BASIS, 686 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 687 | * See the License for the specific language governing permissions and 688 | * limitations under the License. 689 | * ======================================================================== */ 690 | 691 | 692 | +function ($) { "use strict"; 693 | 694 | // DROPDOWN CLASS DEFINITION 695 | // ========================= 696 | 697 | var backdrop = '.dropdown-backdrop' 698 | var toggle = '[data-toggle=dropdown]' 699 | var Dropdown = function (element) { 700 | var $el = $(element).on('click.bs.dropdown', this.toggle) 701 | } 702 | 703 | Dropdown.prototype.toggle = function (e) { 704 | var $this = $(this) 705 | 706 | if ($this.is('.disabled, :disabled')) return 707 | 708 | var $parent = getParent($this) 709 | var isActive = $parent.hasClass('open') 710 | 711 | clearMenus() 712 | 713 | if (!isActive) { 714 | if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { 715 | // if mobile we we use a backdrop because click events don't delegate 716 | $('