Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
change to aldryn-boilerplates setup
Browse files Browse the repository at this point in the history
  • Loading branch information
FinalAngel committed Feb 3, 2015
1 parent 94f122e commit a9c9e73
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
0.3.0 (2015-02-03)
==================

* multi-boilerplate support
new requirement: aldryn-boilerplates (needs configuration)
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include README.rst
include CHANGELOG
recursive-include aldryn_accordion/templates *
recursive-include aldryn_accordion/static *
recursive-include aldryn_accordion/boilerplates *
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ Redeploy the site.
Manuall Installation
--------------------

Run ``pip install aldryn-accordion``.
::

Add below apps to ``INSTALLED_APPS``: ::
pip install aldryn-accordion

INSTALLED_APPS = [
Add ``aldryn_accordion`` to ``INSTALLED_APPS``.

'aldryn_accordion',
]
Configure ``aldryn-boilerplates`` (https://pypi.python.org/pypi/aldryn-boilerplates/).

To use the old templates, set ``ALDRYN_BOILERPLATE_NAME='legacy'``.
To use https://github.com/aldryn/aldryn-boilerplate-standard (recommended, will be renamed to
``aldryn-boilerplate-bootstrap3``) set ``ALDRYN_BOILERPLATE_NAME='bootstrap3'``.

When using the ``legacy`` boilerplate, **jQuery** and
`classjs <https://github.com/finalangel/classjs-plugins>`_ cl.accordion are required.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{% load i18n static cms_tags sekizai_tags %}

<div class="plugin plugin-accordion{% if accordion.custom_classes %} {{ accordion.custom_classes }}{% endif %}" id="{{ accordion_id }}">
{% for plugin in accordion.child_plugin_instances %}
{% with parentloop=forloop %}{% render_plugin plugin %}{% endwith %}
{% endfor %}
</div>

{% addtoblock "js" %}<script src="{% static 'js/libs/class.min.js' %}"></script>{% endaddtoblock %}
{% addtoblock "js" %}<script src="{% static 'js/addons/cl.accordion.min.js' %}"></script>{% endaddtoblock %}
{% addtoblock "js" %}
<script>
jQuery(document).ready(function ($) {
new Cl.Accordion("#{{ accordion_id }}", {
// settings
{% if accordion.index %}'index': {{ accordion.index }},{% endif %}
'grouping': {% if accordion.grouping %}true{% else %}false{% endif %},
// static
'forceClose': true,
'cls': {
'trigger': '.accordion-trigger',
'container': '.accordion-container'
},
'lang': {
'expanded': '{% trans "Close" %} ',
'collapsed': '{% trans "Open" %} '
}
});
});
</script>
{% endaddtoblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% load cms_tags i18n %}

<div class="accordion-trigger">
{{ item.title }} <span class="text">{% trans "Close" %}</span>
</div>

<div class="accordion-container">
<div class="accordion-item {% if item.custom_classes %} {{ item.custom_classes }}{% endif %}{% if parentloop.first %} alpha{% endif %}{% if parentloop.last %} omega{% endif %}">
{% for plugin in item.child_plugin_instances %}
{% render_plugin plugin %}
{% endfor %}
</div>
</div>
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
).group(1)


REQUIREMENTS = []
REQUIREMENTS = [
'aldryn-boilerplates>=0.6',
]


CLASSIFIERS = [
Expand Down

0 comments on commit a9c9e73

Please sign in to comment.