Skip to content

Commit fdfe7f2

Browse files
committed
Update docs
1 parent f865a48 commit fdfe7f2

File tree

7 files changed

+93
-101
lines changed

7 files changed

+93
-101
lines changed

README.rst

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ its specific version.
1616
Key features
1717
============
1818

19-
- Easy to implement re-usable frontend custom components.
19+
- **Easy to implement re-usable frontend custom components**, which in the
20+
simples case consist of a template and declarative sort of form class.
21+
2022
- Support of `Bootstrap 5 <https://getbootstrap.com>`_, django CMS 3.8+
21-
and django CMS 4.
23+
and django CMS 4 out of the box.
2224

2325
- **Separation of plugins from css framework**, i.e. no need to
2426
rebuild you site's plugin tree if css framework is changed in the
@@ -38,10 +40,6 @@ Key features
3840
(e.g. in a custom app) giving your whole project a more consistent
3941
user experience.
4042

41-
- A management command to **migrate from djangocms-bootstrap4**. This
42-
command automatically migrates all ``djangocms-bootstrap4`` plugins to
43-
``djangocms-frontend``.
44-
4543

4644
Description
4745
===========
@@ -58,10 +56,6 @@ Instead all design parameters are stored in a common JSON field and
5856
future releases of improved frontend features will not require to
5957
rebuild your full plugin tree.
6058

61-
The link plugin has been rewritten to not only allow internal links to other
62-
CMS pages, but also to other django models such as, e.g., posts of
63-
`djangocms-blog <https://github.com/nephila/djangocms-blog>`_.
64-
6559
The plugins are designed to be re-usable as UI components in your
6660
project, e.g. in a custom app, giving your whole project a more
6761
consistent user experience.
@@ -101,8 +95,7 @@ file for additional dependencies:
10195
- django-cms, version 3.7 or later
10296
- django-filer, version 1.7 or later
10397
- djangocms-attributes-field, version 1.0 or later
104-
- djangocms-text-ckeditor, version 3.1 or later
105-
- django-select2
98+
- djangocms-text
10699
- django-entangled
107100

108101
Make sure `django Filer
@@ -124,23 +117,22 @@ For a manual install:
124117
125118
'easy_thumbnails',
126119
'djangocms_frontend',
127-
'djangocms_frontend.contrib.accordion',
128-
'djangocms_frontend.contrib.alert',
129-
'djangocms_frontend.contrib.badge',
130-
'djangocms_frontend.contrib.card',
131-
'djangocms_frontend.contrib.carousel',
132-
'djangocms_frontend.contrib.collapse',
133-
'djangocms_frontend.contrib.component',
134-
'djangocms_frontend.contrib.content',
135-
'djangocms_frontend.contrib.grid',
136-
'djangocms_frontend.contrib.icon',
137-
'djangocms_frontend.contrib.image',
138-
'djangocms_frontend.contrib.jumbotron',
139-
'djangocms_frontend.contrib.link',
140-
'djangocms_frontend.contrib.listgroup',
141-
'djangocms_frontend.contrib.media',
142-
'djangocms_frontend.contrib.tabs',
143-
'djangocms_frontend.contrib.utilities',
120+
'djangocms_frontend.contrib.accordion', # optional
121+
'djangocms_frontend.contrib.alert', # optional
122+
'djangocms_frontend.contrib.badge', # optional
123+
'djangocms_frontend.contrib.card', # optional
124+
'djangocms_frontend.contrib.carousel', # optional
125+
'djangocms_frontend.contrib.collapse', # optional
126+
'djangocms_frontend.contrib.content', # optional
127+
'djangocms_frontend.contrib.grid', # optional
128+
'djangocms_frontend.contrib.icon', # optional
129+
'djangocms_frontend.contrib.image', # optional
130+
'djangocms_frontend.contrib.jumbotron', # optional
131+
'djangocms_frontend.contrib.link', # optional
132+
'djangocms_frontend.contrib.listgroup', # optional
133+
'djangocms_frontend.contrib.media', # optional
134+
'djangocms_frontend.contrib.tabs', # optional
135+
'djangocms_frontend.contrib.utilities', # optional
144136
145137
- run ``python manage.py migrate``
146138

djangocms_frontend/static/djangocms_frontend/css/base.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

djangocms_frontend/templates/djangocms_frontend/admin/base-tabs.html

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@
77
{% endblock %}
88
{% block content_subtitle %}{% endblock %}
99
{% block field_sets %}
10-
<div class="djangocms-frontend
11-
{% block custom_class %}{% endblock %}" data-static="{% get_static_prefix %}">
12-
<ul class="djangocms-frontend nav nav-pills" role="tablist">
13-
{% for fieldset in adminform %}
14-
{% if forloop.counter == 1 or "collapse" in fieldset.classes %}
15-
<li class="nav-item" role="presentation">
16-
<a class="nav-link" href="#tab-{{ forloop.counter }}"
17-
{% if forloop.counter == 1 and original %}title="{{ original.pk|safe }}"{% endif %}
18-
data-bs-toggle="tab" id="lnk-{{ forloop.counter }}" type="button" role="tab"
19-
data-bs-target="#tab-{{ forloop.counter }}">{{ fieldset.name|default:adminform.model_admin }}
20-
{% if "attributes" in fieldset.classes and original.attributes %}
21-
<span class="indicator attributes"></span>
22-
{% endif %}
23-
<span class="indicator error"></span>
24-
</a>
25-
</li>
26-
{% endif %}
27-
{% endfor %}
28-
{% if original %}
29-
<div class="tab-pk">{{ original.pk|safe }}</div>
30-
{% endif %}
31-
</ul>
32-
<div class="djangocms-frontend tab-content">
33-
{% for fieldset in adminform %}
34-
{% if forloop.counter == 1 or "collapse" in fieldset.classes %}
35-
{% if forloop.counter != 1 %}</div>{% endif %}
36-
<div class="tab-pane fade" id="tab-{{ forloop.counter }}" role="tabpanel">
37-
{% endif %}
38-
{% include "djangocms_frontend/admin/includes/fieldset.html" %}
39-
{% endfor %}{# djlint:off #}</div>
40-
</div>
10+
<div class="djangocms-frontend
11+
{% block custom_class %}{% endblock %}" data-static="{% get_static_prefix %}">
12+
<ul class="djangocms-frontend nav nav-pills" role="tablist">
13+
{% for fieldset in adminform %}
14+
{% if forloop.counter == 1 or "collapse" in fieldset.classes %}
15+
<li class="nav-item" role="presentation">
16+
<a class="nav-link" href="#tab-{{ forloop.counter }}"
17+
{% if forloop.counter == 1 and original %}title="{{ original.pk|safe }}"{% endif %}
18+
data-bs-toggle="tab" id="lnk-{{ forloop.counter }}" type="button" role="tab"
19+
data-bs-target="#tab-{{ forloop.counter }}">{{ fieldset.name|default:adminform.model_admin }}
20+
{% if "attributes" in fieldset.classes and original.attributes %}
21+
<span class="indicator attributes"></span>
22+
{% endif %}
23+
<span class="indicator error"></span>
24+
</a>
25+
</li>
26+
{% endif %}
27+
{% endfor %}
28+
{% if original %}
29+
<div class="tab-pk">{{ original.pk|safe }}</div>
30+
{% endif %}
31+
</ul>
32+
<div class="djangocms-frontend tab-content">
33+
{% for fieldset in adminform %}
34+
{% if forloop.counter == 1 or "collapse" in fieldset.classes %}
35+
{% if forloop.counter != 1 %}</div>{% endif %}
36+
<div class="tab-pane fade" id="tab-{{ forloop.counter }}" role="tabpanel">
37+
{% endif %}
38+
{% include "djangocms_frontend/admin/includes/fieldset.html" %}
39+
{% endfor %}{# djlint:off #}</div>
40+
</div>
4141
</div>{# djlint:on #}
4242
{% endblock %}

docs/source/custom_components.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ Custom Components
66

77
.. versionadded:: 2.0
88

9-
Some frontend developers prefer custom components specifically tailored to
10-
give the project a unique and distinct look.
9+
Custom components are a powerful tool for content editors, allowing them to build pages without needing
10+
in-depth knowledge of design, HTML, or nested structures. Editors can simply add content to pre-defined
11+
components, creating visually cohesive pages with ease.
1112

1213
When working with `Tailwind CSS <https://tailwindcss.com>`_, for example, you
1314
either create your custom components or customize components from providers,
1415
e.g. `Tailwind UI <https://tailwindui.com>`_,
1516
`Flowbite <https://flowbite.com>`_, or the commiunity
1617
`Tailwind Components <https://tailwindcomponents.com>`_.
1718

18-
With django CMS you make your components available to the content editors for
19-
drag and drop **and** frontend developers for use in templates from a single
19+
With django CMS you make your components available to the content editors to
20+
simply add them to a page by a click **and** frontend developers for use in templates from a single
2021
source.
2122

2223
Custom components are part of the djangocms-frontend root package and do not

docs/source/grid.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
Grid plugins
44
##############
55

6-
For details on how grids work, see, e.g. the `Bootstrap 5 documentation
6+
The grid is the basis for responsive page design. It splits the page into
7+
containers, rows and columns. Depending on the device, columns are shown
8+
next to each other (larger screens) or one below the other (smaller
9+
screens).
10+
11+
The details of the grid system are based on the Bootstrap framework. Therefore,
12+
for details on how grids work, see, e.g. the `Bootstrap 5 documentation
713
<https://getbootstrap.com/docs/5.1/layout/grid/>`_.
814

915
.. index::

docs/source/index.rst

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
..
2-
djangocms-blog documentation master file, created by
3-
sphinx-quickstart on Sun Jun 5 23:27:04 2016.
4-
You can adapt this file completely to your liking, but it should at least
5-
contain the root `toctree` directive.
6-
71
################################################
82
Welcome to djangocms-frontend's documentation!
93
################################################
@@ -12,39 +6,42 @@
126
djangocms-frontend
137
********************
148

15-
**djangocms-frontend** is a plugin bundle based on `djangocms_bootstrap5
16-
<https://github.com/gl-agnx/djangocms-bootstrap5>`_. Its objective is to
17-
provide a set of popular frontend components independent of the
18-
currently used frontend framework such as Bootstrap, or its specific
19-
version.
9+
**django CMS Frontend** is a plugin bundle which originally built on and improved
10+
the architecture of `djangocms-bootstrap4 <https://github.com/django-cms/djangocms-bootstrap4>`_.
11+
Its objective is to provide a toolset to quickly create re-usable frontend
12+
components and comes preloaded with a set of popular frontend components
13+
independent of the currently used frontend framework such as Bootstrap, or
14+
its specific version.
2015

2116
.. image:: ../../preview.png
2217

2318
**************
2419
Key features
2520
**************
2621

27-
- Support of `Bootstrap 5 <https://getbootstrap.com>`_.
22+
- **Easy to implement re-usable frontend custom components**, which in the
23+
simples case consist of a template and declarative sort of form class.
2824

29-
- **Separation of plugins from css framework**, i.e., no need to
30-
rebuild you site's plugin tree if css framework is changed in the
31-
future, e.g., from Bootstrap 5 to a future version.
25+
- Support of `Bootstrap 5 <https://getbootstrap.com>`_, django CMS 3.8+
26+
and django CMS 4 out of the box.
3227

33-
- **New link plugin** allowing to link to internal pages provided by
34-
other applications, such as `djangocms-blog
35-
<https://github.com/nephila/djangocms-blog>`_.
28+
- **Separation of plugins from css framework**, i.e. no need to
29+
rebuild you site's plugin tree if css framework is changed in the
30+
future, e.g. from Bootstrap 5 to a future version.
3631

37-
- **Nice and well-arranged admin frontend** of `djangocms-bootstrap4
38-
<https://github.com/django-cms/djangocms-bootstrap4>`_
32+
- Leverage of new **djangocms-link features** allowing to link to internal pages
33+
provided by other applications, such as `djangocms-blog
34+
<https://github.com/nephila/djangocms-blog>`_.
3935

40-
- Management command to **migrate from djangocms-bootstrap4**. This
41-
command automatically migrates all djangocms-bootstrap4 plugins to
42-
djangocms-frontend.
36+
- **Nice and well-arranged admin frontend** of `djangocms-bootstrap4
37+
<https://github.com/django-cms/djangocms-bootstrap4>`_
4338

44-
- **Extensible** within the project and with separate project (e.g., a
45-
theme app)
39+
- **Extensible** within the project and with separate project (e.g. a
40+
theme app). Create your own components with a few lines of code only.
4641

47-
- **Accordion** plugin.
42+
- **Plugins are re-usable as UI components** anywhere in your project
43+
(e.g. in a custom app) giving your whole project a more consistent
44+
user experience.
4845

4946
*************
5047
Description
@@ -62,10 +59,6 @@ Instead all design parameters are stored in a common JSON field and
6259
future releases of improved frontend features will not require to
6360
rebuild your full plugin tree.
6461

65-
The link plugin has been rewritten to not allow internal links to other
66-
CMS pages, but also to other django models such as, e.g., posts of
67-
`djangocms-blog <https://github.com/nephila/djangocms-blog>`_.
68-
6962
**djangocms-frontend** provides a set of plugins to structure your
7063
layout. This includes three basic elements
7164

@@ -80,10 +73,6 @@ Components
8073
to grasp and easy to use look. Alerts or cards are examples of
8174
components.
8275

83-
Forms
84-
To nicely integrate formss into your page we recommend
85-
**djangocms-form-builder** which works stand-alone but also nicely
86-
integrates with **djangocms-frontend**.
8776

8877
Contents
8978
========
@@ -92,9 +81,9 @@ Contents
9281
:maxdepth: 3
9382

9483
getting_started
84+
custom_components
9585
grid
9686
components
97-
custom_components
9887
how-to/index
9988
reference
10089

private/sass/components/_tabs.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
}
55

66
ul.nav {
7+
&:has(> li ~ div) {
8+
// Hide single tab
9+
display: none;
10+
}
711
.nav-item {
812
margin-inline-end: 1rem;
913
}

0 commit comments

Comments
 (0)