Skip to content

Commit

Permalink
build: Version 1.0 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun authored Sep 14, 2022
1 parent d05b72c commit f569176
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 38 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
Changelog
=========

Unreleased
1.0.0
==========
* Fix packages.json, gulpfile.js to allow automatic build of js and css
* Fix accordion markup
* Fix dark mode for select2 widget
* Fix lint errors in scss files
* removed forms app
* Minor docs corrections
* For the boostrap5 base template include bootstrap v5.2.1, jQuery 3.6.1
* Base template respects admin color scheme
* Fix for ``Image`` plugin where the associated ``filer.Image`` has been deleted.

0.9.4
Expand Down
2 changes: 1 addition & 1 deletion djangocms_frontend/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.4"
__version__ = "1.0.0"
8 changes: 4 additions & 4 deletions djangocms_frontend/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ def link_to_framework_doc(ui_item, topic):


def add_plugin(placeholder, plugin):
"""CMS version save function to add a plugin to a placeholder"""
if hasattr(placeholder, "add_plugin"): # CMS v4?
"""CMS version-save function to add a plugin to a placeholder"""
if hasattr(placeholder, "add_plugin"): # available as of CMS v4
placeholder.add_plugin(plugin)
else: # CMS < v4
if plugin.parent:
plugin.position -= plugin.parent.position + 1
plugin.position -= plugin.parent.position + 1 # Restart position counting at 0
else:
plugin.position = 0
plugin.position -= 1 # 0-based counting in v3
plugin.save()


Expand Down
17 changes: 14 additions & 3 deletions djangocms_frontend/templates/bootstrap5/base.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{% extends "djangocms_frontend.html" %}{% load cms_tags menu_tags %}
{% block base_css %}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"/>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous"/>
{% endblock %}
{% block base_js %}
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
{% endblock %}
{% block navbar %}
<nav class="navbar {% block navbar_options %}navbar-expand-lg navbar-dark bg-dark{% endblock %}">
Expand Down Expand Up @@ -34,6 +33,18 @@
--bs-light-rgb: 196, 196, 196;
}
}
:root[data-color-scheme="dark"] {
--bs-body-bg: #1e1e1e;
--bs-body-bg-rgb: 30, 30, 30;
--bs-body-color: #FFF;
--bs-body-color-rgb: 255, 255, 255;
--bs-dark: #3D3D3D;
--bs-dark-rgb: 61, 61, 61;
--bs-light: #c4c4c4;
--bs-light-rgb: 196, 196, 196;
}
}

</style>
{{ block.super }}
{% endblock %}
11 changes: 11 additions & 0 deletions docs/source/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,17 @@ Code component
**************

Have code snippets on your site using this plugin, either inline or as a code block.
djangocms-frontend offers the `ace code editor <https://ace.c9.io>`_
to enter code bits.

.. warning::
By default the ace code editor javascript code is retrieved over the internet
from a cdn. If you do not want this to happen, e.g., for data privacy reasons
or because your system is not connected to the internet, please use the
weak dependency on `djangocms-static-ace <https://github.com/django-cms/djangocms-static-ace>`_
by chaning your requirement from ``djangocms-frontend`` to
``djangocms-frontend[static-ace]`` and include
``"djangocms_static_ace"`` in your ``INSTALLED_APPS``.

.. index::
single: Figure
Expand Down
51 changes: 25 additions & 26 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ by adding an option:

.. code::
djangocms-frontend[reCaptcha] # Installs django-recaptcha enabling reCaptcha for forms
djangocms-frontend[djangocms-icon] # Installs djangocms-icon for icons support in links
djangocms-frontend[static-ace] # Installs djangocms-static-ace to include the ace code editor in static files
djangocms-frontend[reCaptcha, djangocms-icon] # comma-separate multiple dependencies
`djangocms-frontend[static-ace]` is useful if your project cannot or should not
access a CDN to load the code editor ace (https://ace.c9.io) for the code plugin.
djangocms-frontend[static-ace, djangocms-icon] # comma-separate multiple dependencies
``djangocms-frontend[static-ace]`` is useful if your project cannot or should not
access a CDN to load the `ace code editor <https://ace.c9.io>`_ for the code plugin.
Please be sure to in this case also add ``"djangocms_static_ace"`` to your
project's ``INSTALLED_APPS``.

Make apps available to your django project
==========================================
Expand All @@ -42,25 +42,24 @@ Add the following entries to your ``INSTALLED_APPS``:

.. code::
'djangocms_icon', # optional
'django_recaptcha', # optional
'easy_thumbnails',
'djangocms_frontend',
'djangocms_frontend.contrib.accordion',
'djangocms_frontend.contrib.alert',
'djangocms_frontend.contrib.badge',
'djangocms_frontend.contrib.card',
'djangocms_frontend.contrib.carousel',
'djangocms_frontend.contrib.collapse',
'djangocms_frontend.contrib.content',
'djangocms_frontend.contrib.grid',
'djangocms_frontend.contrib.image',
'djangocms_frontend.contrib.jumbotron',
'djangocms_frontend.contrib.link',
'djangocms_frontend.contrib.listgroup',
'djangocms_frontend.contrib.media',
'djangocms_frontend.contrib.tabs',
'djangocms_frontend.contrib.utilities',
"djangocms_icon", # optional
"easy_thumbnails",
"djangocms_frontend",
"djangocms_frontend.contrib.accordion",
"djangocms_frontend.contrib.alert",
"djangocms_frontend.contrib.badge",
"djangocms_frontend.contrib.card",
"djangocms_frontend.contrib.carousel",
"djangocms_frontend.contrib.collapse",
"djangocms_frontend.contrib.content",
"djangocms_frontend.contrib.grid",
"djangocms_frontend.contrib.image",
"djangocms_frontend.contrib.jumbotron",
"djangocms_frontend.contrib.link",
"djangocms_frontend.contrib.listgroup",
"djangocms_frontend.contrib.media",
"djangocms_frontend.contrib.tabs",
"djangocms_frontend.contrib.utilities",
.. note :: Using Django 2.2 to 3.1
Expand Down Expand Up @@ -279,12 +278,12 @@ djangocms-bootstrap4 apps need to be included in ``INSTALLED_APPS``.

.. warning::

The order of the apps in ``INSTALLED_APPS`` is cruicial.
The order of the apps in ``INSTALLED_APPS`` is **cruicial**.

1. First is ``djangocms_link`` which is needed by ``djangocms_bootstrap4``,
2. second come all ``djangocms_bootstrap4`` plugins.
``djangocms_bootstrap4.contrib.bootstrap4_link`` uninstalls the Link
plugin of ``djangocms_link```
plugin of ``djangocms_link``
3. At last come all ``djangocms_frontend`` apps.

.. code::
Expand Down
19 changes: 16 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from djangocms_frontend import __version__

REQUIREMENTS = [
"Django>=2.2,<4.1",
"Django>=2.2",
"django-cms>=3.7",
"django-filer>=1.7",
"djangocms-attributes-field>=1",
Expand All @@ -19,7 +19,7 @@
],
"static-ace": [
"djangocms-static-ace",
]
],
}

CLASSIFIERS = [
Expand All @@ -36,23 +36,35 @@
"Framework :: Django",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django CMS",
"Framework :: Django CMS :: 3.8",
"Framework :: Django CMS :: 3.9",
"Framework :: Django CMS :: 3.10",
"Framework :: Django CMS :: 3.11",
"Framework :: Django CMS :: 4.0",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
]

PROJECT_URLS = {
"Documentation": "https://djangocms-frontend.readthedocs.io",
"Release notes": "https://github.com/django-cms/djangocms-frontend/blob/master/CHANGELOG.rst",
"Issues": "https://github.com/django-cms/djangocms-frontend/issues",
"Source": "https://github.com/django-cms/djangocms-frontend",
}


setup(
name="djangocms-frontend",
version=__version__,
author="fsbraun",
author_email="[email protected]",
url="https://github.com/fsbraun/djangocms-frontend",
maintainer="Django CMS Association and contributors",
maintainer_email="[email protected]",
url="https://github.com/django-cms/djangocms-frontend",
license="BSD-3-Clause",
description="Adds abstract User Interface items as plugins.",
long_description=open("README.rst").read(),
Expand All @@ -63,5 +75,6 @@
install_requires=REQUIREMENTS,
extras_require=EXTRA_REQUIREMENTS,
classifiers=CLASSIFIERS,
project_urls=PROJECT_URLS,
test_suite="run_tests.run",
)

0 comments on commit f569176

Please sign in to comment.