Browse Source

Merge branch 'dev' into release/1

Vince Salvino 2 years ago
parent
commit
d75394653b
32 changed files with 157 additions and 154 deletions
  1. 8 9
      README.md
  2. 3 3
      coderedcms/bin/coderedcms.py
  3. 1 1
      coderedcms/fields.py
  4. 3 3
      coderedcms/models/page_models.py
  5. 3 3
      coderedcms/models/wagtailsettings_models.py
  6. 8 8
      coderedcms/project_template/basic/project_name/urls.py
  7. 8 8
      coderedcms/project_template/sass/project_name/urls.py
  8. 1 1
      coderedcms/search_urls.py
  9. 2 2
      coderedcms/settings.py
  10. 15 13
      coderedcms/static/coderedcms/css/crx-admin.css
  11. 1 1
      coderedcms/templates/coderedcms/includes/crx_banner.html
  12. 1 1
      coderedcms/templates/coderedcms/pages/base.html
  13. 1 1
      coderedcms/templates/coderedcms/pages/search.html
  14. 1 1
      coderedcms/templates/coderedcms/snippets/navbar.html
  15. 1 1
      coderedcms/templates/wagtailadmin/base.html
  16. 1 1
      coderedcms/templatetags/coderedcms_tags.py
  17. 1 1
      coderedcms/tests/test_templates.py
  18. 2 2
      coderedcms/tests/test_urls.py
  19. 6 15
      coderedcms/tests/urls.py
  20. 3 3
      coderedcms/urls.py
  21. 1 1
      coderedcms/wagtail_hooks.py
  22. 1 1
      docs/advanced/advanced01.rst
  23. 2 2
      docs/features/blocks/contentblocks/button.rst
  24. 6 6
      docs/features/blocks/contentblocks/download.rst
  25. 5 5
      docs/features/blocks/contentblocks/modal.rst
  26. 1 1
      docs/getting_started/customize_design.rst
  27. 29 32
      docs/how_to/add_tracking_scripts.rst
  28. 10 12
      docs/index.rst
  29. 6 3
      docs/reference/django_settings.rst
  30. 17 4
      docs/releases/v1.0.0.rst
  31. 8 8
      tutorial/mysite/mysite/urls.py
  32. 1 1
      tutorial/mysite/website/templates/coderedcms/snippets/navbar.html

+ 8 - 9
README.md

@@ -20,23 +20,22 @@ Wagtail and Bootstrap.
 
 
 ## What is Wagtail CRX?
 ## What is Wagtail CRX?
 
 
-Formerly known as CodeRed CMS, Wagtail CRX (CodeRed Extensions),
-provides a large set of enhancements and pre-built components for Wagtail which
-are ready to use out-of-the box! This saves development time and avoids
-"re-inventing the wheel" by providing features commonly needed by websites:
+CRX, formerly known as CodeRed CMS, provides a large set of enhancements and
+pre-built components for Wagtail which are ready to use out-of-the box! This
+saves development time and avoids "re-inventing the wheel" by providing features
+commonly needed by websites:
 
 
-* Streamfield blocks and templates for Bootstrap 4: rows, columns, hero units,
-  carousels, buttons, modals, cards, and more!
+* Streamfield blocks and page templates for Bootstrap 5: rows, columns, hero
+  units, carousels, buttons, modals, cards, and more!
 
 
 * Settings for adding logo, navigation, footer, and other common elements.
 * Settings for adding logo, navigation, footer, and other common elements.
 
 
 * Rich set of SEO tagging attributes on each page.
 * Rich set of SEO tagging attributes on each page.
 
 
-* Configurable Google Analytics tracking.
+* Configurable Google Analytics and other tracking.
 
 
 * Robust form builder including the ability for multi-step forms, conditional
 * Robust form builder including the ability for multi-step forms, conditional
-  logic, customized confirmation emails, MailChimp integration, and more (all
-  from within the streamfield!)
+  logic, customized confirmation emails, MailChimp integration, and more.
 
 
 * Article pages for building blogs, news, etc.
 * Article pages for building blogs, news, etc.
 
 

+ 3 - 3
coderedcms/bin/coderedcms.py

@@ -60,11 +60,11 @@ class CreateProject(TemplateCommand):
         # Handle custom template logic
         # Handle custom template logic
         import coderedcms
         import coderedcms
 
 
-        codered_path = os.path.dirname(coderedcms.__file__)
+        crx_path = os.path.dirname(coderedcms.__file__)
         if not options["template"]:
         if not options["template"]:
             options["template"] = "basic"
             options["template"] = "basic"
         template_path = os.path.join(
         template_path = os.path.join(
-            os.path.join(codered_path, "project_template"), options["template"]
+            os.path.join(crx_path, "project_template"), options["template"]
         )
         )
 
 
         # Check if provided template is built-in to coderedcms,
         # Check if provided template is built-in to coderedcms,
@@ -86,7 +86,7 @@ class CreateProject(TemplateCommand):
 
 
         if options.get("domain"):
         if options.get("domain"):
             message += " (%(domain)s)"
             message += " (%(domain)s)"
-            # Stip protocol out of domain if it is present.
+            # Strip protocol out of domain if it is present.
             options["domain"] = options["domain"].split("://")[-1]
             options["domain"] = options["domain"].split("://")[-1]
             # Figure out www logic.
             # Figure out www logic.
             if options["domain"].startswith("www."):
             if options["domain"].startswith("www."):

+ 1 - 1
coderedcms/fields.py

@@ -12,7 +12,7 @@ class CoderedStreamField(StreamField):
 
 
     Since our StreamFields are generally huge, and we also let sites override
     Since our StreamFields are generally huge, and we also let sites override
     the blocks in our concrete models dynamically, this creates a slew of
     the blocks in our concrete models dynamically, this creates a slew of
-    migration problems (most commonly: a client overrides CODERED_FRONTEND_*,
+    migration problems (most commonly: a client overrides CRX_FRONTEND_*,
     which changes a string used in a concrete model, which triggers a migration
     which changes a string used in a concrete model, which triggers a migration
     back in coderedcms). Eliminiating the blocks from the deconstructed
     back in coderedcms). Eliminiating the blocks from the deconstructed
     StreamField allows us to have dynamic streamfields without breaking
     StreamField allows us to have dynamic streamfields without breaking

+ 3 - 3
coderedcms/models/page_models.py

@@ -104,18 +104,18 @@ if TYPE_CHECKING:
 logger = logging.getLogger("coderedcms")
 logger = logging.getLogger("coderedcms")
 
 
 
 
-CODERED_PAGE_MODELS = []
+CRX_PAGE_MODELS = []
 
 
 
 
 def get_page_models():
 def get_page_models():
-    return CODERED_PAGE_MODELS
+    return CRX_PAGE_MODELS
 
 
 
 
 class CoderedPageMeta(PageBase):
 class CoderedPageMeta(PageBase):
     def __init__(cls, name, bases, dct):
     def __init__(cls, name, bases, dct):
         super().__init__(name, bases, dct)
         super().__init__(name, bases, dct)
         if not cls._meta.abstract:
         if not cls._meta.abstract:
-            CODERED_PAGE_MODELS.append(cls)
+            CRX_PAGE_MODELS.append(cls)
 
 
 
 
 class CoderedTag(TaggedItemBase):
 class CoderedTag(TaggedItemBase):

+ 3 - 3
coderedcms/models/wagtailsettings_models.py

@@ -311,17 +311,17 @@ class AnalyticsSettings(BaseSetting):
         HelpPanel(
         HelpPanel(
             heading=_("Know your tracking"),
             heading=_("Know your tracking"),
             content=_(
             content=_(
-                "<h3><b>Which tracking IDs do I need?</b></h3>"
+                "<h2>Which tracking IDs do I need?</h2>"
                 "<p>Before adding tracking to your site, "
                 "<p>Before adding tracking to your site, "
                 '<a href="https://docs.coderedcorp.com/wagtail-crx/how_to/add_tracking_scripts.html" '  # noqa
                 '<a href="https://docs.coderedcorp.com/wagtail-crx/how_to/add_tracking_scripts.html" '  # noqa
-                'target="_blank">read about the difference between UA, G, GTM, '
+                'target="_blank">read about the difference between G, UA, GTM, '
                 "and other tracking IDs</a>.</p>"
                 "and other tracking IDs</a>.</p>"
             ),
             ),
         ),
         ),
         MultiFieldPanel(
         MultiFieldPanel(
             [
             [
-                FieldPanel("ga_tracking_id"),
                 FieldPanel("ga_g_tracking_id"),
                 FieldPanel("ga_g_tracking_id"),
+                FieldPanel("ga_tracking_id"),
                 FieldPanel("ga_track_button_clicks"),
                 FieldPanel("ga_track_button_clicks"),
             ],
             ],
             heading=_("Google Analytics"),
             heading=_("Google Analytics"),

+ 8 - 8
coderedcms/project_template/basic/project_name/urls.py

@@ -2,25 +2,25 @@ from django.conf import settings
 from django.urls import include, path
 from django.urls import include, path
 from django.contrib import admin
 from django.contrib import admin
 from wagtail.documents import urls as wagtaildocs_urls
 from wagtail.documents import urls as wagtaildocs_urls
-from coderedcms import admin_urls as coderedadmin_urls
-from coderedcms import search_urls as coderedsearch_urls
-from coderedcms import urls as codered_urls
+from coderedcms import admin_urls as crx_admin_urls
+from coderedcms import search_urls as crx_search_urls
+from coderedcms import urls as crx_urls
 
 
 urlpatterns = [
 urlpatterns = [
     # Admin
     # Admin
     path("django-admin/", admin.site.urls),
     path("django-admin/", admin.site.urls),
-    path("admin/", include(coderedadmin_urls)),
+    path("admin/", include(crx_admin_urls)),
     # Documents
     # Documents
     path("docs/", include(wagtaildocs_urls)),
     path("docs/", include(wagtaildocs_urls)),
     # Search
     # Search
-    path("search/", include(coderedsearch_urls)),
+    path("search/", include(crx_search_urls)),
     # For anything not caught by a more specific rule above, hand over to
     # For anything not caught by a more specific rule above, hand over to
     # the page serving mechanism. This should be the last pattern in
     # the page serving mechanism. This should be the last pattern in
     # the list:
     # the list:
-    path("", include(codered_urls)),
-    # Alternatively, if you want CMS pages to be served from a subpath
+    path("", include(crx_urls)),
+    # Alternatively, if you want pages to be served from a subpath
     # of your site, rather than the site root:
     # of your site, rather than the site root:
-    #    path("pages/", include(codered_urls)),
+    #    path("pages/", include(crx_urls)),
 ]
 ]
 
 
 
 

+ 8 - 8
coderedcms/project_template/sass/project_name/urls.py

@@ -2,25 +2,25 @@ from django.conf import settings
 from django.urls import include, path
 from django.urls import include, path
 from django.contrib import admin
 from django.contrib import admin
 from wagtail.documents import urls as wagtaildocs_urls
 from wagtail.documents import urls as wagtaildocs_urls
-from coderedcms import admin_urls as coderedadmin_urls
-from coderedcms import search_urls as coderedsearch_urls
-from coderedcms import urls as codered_urls
+from coderedcms import admin_urls as crx_admin_urls
+from coderedcms import search_urls as crx_search_urls
+from coderedcms import urls as crx_urls
 
 
 urlpatterns = [
 urlpatterns = [
     # Admin
     # Admin
     path("django-admin/", admin.site.urls),
     path("django-admin/", admin.site.urls),
-    path("admin/", include(coderedadmin_urls)),
+    path("admin/", include(crx_admin_urls)),
     # Documents
     # Documents
     path("docs/", include(wagtaildocs_urls)),
     path("docs/", include(wagtaildocs_urls)),
     # Search
     # Search
-    path("search/", include(coderedsearch_urls)),
+    path("search/", include(crx_search_urls)),
     # For anything not caught by a more specific rule above, hand over to
     # For anything not caught by a more specific rule above, hand over to
     # the page serving mechanism. This should be the last pattern in
     # the page serving mechanism. This should be the last pattern in
     # the list:
     # the list:
-    path("", include(codered_urls)),
-    # Alternatively, if you want CMS pages to be served from a subpath
+    path("", include(crx_urls)),
+    # Alternatively, if you want pages to be served from a subpath
     # of your site, rather than the site root:
     # of your site, rather than the site root:
-    #    path("pages/", include(codered_urls)),
+    #    path("pages/", include(crx_urls)),
 ]
 ]
 
 
 
 

+ 1 - 1
coderedcms/search_urls.py

@@ -2,5 +2,5 @@ from django.urls import path
 from coderedcms.views import search
 from coderedcms.views import search
 
 
 urlpatterns = [
 urlpatterns = [
-    path("", search, name="codered_search"),
+    path("", search, name="crx_search"),
 ]
 ]

+ 2 - 2
coderedcms/settings.py

@@ -253,8 +253,8 @@ class _DefaultSettings:
     }
     }
 
 
     CRX_BANNER = None
     CRX_BANNER = None
-    CRX_BANNER_BACKGROUND = "#f00"
-    CRX_BANNER_TEXT_COLOR = "#fff"
+    CRX_BANNER_BACKGROUND = "#ff0"
+    CRX_BANNER_TEXT_COLOR = "#000"
 
 
     def __getattribute__(self, attr: str):
     def __getattribute__(self, attr: str):
         # First load from Django settings.
         # First load from Django settings.

+ 15 - 13
coderedcms/static/coderedcms/css/crx-admin.css

@@ -16,39 +16,41 @@ textarea.monospace,
 }
 }
 
 
 .input input[type='color']{
 .input input[type='color']{
-    height: 40px;
-    padding: 5px;
+  height: 40px;
+  padding: 5px;
 }
 }
 
 
 
 
 /* Show the site's custom logo in the wagtail admin */
 /* Show the site's custom logo in the wagtail admin */
 
 
 .crx-logo-custom {
 .crx-logo-custom {
-    width:auto;
-    height:auto;
-    max-height:80px;
-    max-width:100%;
-    display: block;
+  width: auto;
+  height: auto;
+  max-height: 80px;
+  max-width: 100%;
+  display: block;
 }
 }
 .crx-logo-container {
 .crx-logo-container {
   box-sizing: border-box;
   box-sizing: border-box;
   margin: 0 15px;
   margin: 0 15px;
 }
 }
 .crx-logo-container.navbar-light {
 .crx-logo-container.navbar-light {
-    background-color: #fff;
-    border-radius: 6px;
-    padding: 0.25em;
+  background-color: #fff;
+  border-radius: 6px;
+  padding: 0.25em;
 }
 }
 .crx-logo-container.navbar-dark {
 .crx-logo-container.navbar-dark {
-    background-color: transparent;
+  background-color: transparent;
 }
 }
 
 
 
 
 /* Display the optional banner above main content */
 /* Display the optional banner above main content */
 
 
 .crx-banner {
 .crx-banner {
-    position: absolute;
-    z-index: 1;
+  position: absolute;
+  left: 0;
+  right: 0;
+  z-index: 1;
 }
 }
 .crx-banner ~ .content-wrapper {
 .crx-banner ~ .content-wrapper {
     padding-top: calc(1.5em + 8px);
     padding-top: calc(1.5em + 8px);

+ 1 - 1
coderedcms/templates/coderedcms/includes/codered_banner.html → coderedcms/templates/coderedcms/includes/crx_banner.html

@@ -1,6 +1,6 @@
 {% load coderedcms_tags %}
 {% load coderedcms_tags %}
 {% if "CRX_BANNER"|crx_settings %}
 {% if "CRX_BANNER"|crx_settings %}
-<div class="crx-banner" style="background-color:{{ 'CRX_BANNER_BACKGROUND'|crx_settings }}; color:{{ 'CRX_BANNER_TEXT_COLOR'|crx_settings }}; width:100%; padding:4px;">
+<div class="crx-banner" style="background-color:{{ 'CRX_BANNER_BACKGROUND'|crx_settings }}; color:{{ 'CRX_BANNER_TEXT_COLOR'|crx_settings }}; text-align:center; padding:4px;">
   {{ "CRX_BANNER"|crx_settings|safe }}
   {{ "CRX_BANNER"|crx_settings|safe }}
 </div>
 </div>
 {% endif %}
 {% endif %}

+ 1 - 1
coderedcms/templates/coderedcms/pages/base.html

@@ -94,7 +94,7 @@
 </head>
 </head>
 
 
 <body class="crx-{{page.content_type.model}} {% if page.get_parent %}parent-page-{{page.get_parent.id}}{% endif %} {% block body_class %}{% endblock %}" id="page-{{page.id}}">
 <body class="crx-{{page.content_type.model}} {% if page.get_parent %}parent-page-{{page.get_parent.id}}{% endif %} {% block body_class %}{% endblock %}" id="page-{{page.id}}">
-  {% include "coderedcms/includes/codered_banner.html" %}
+  {% include "coderedcms/includes/crx_banner.html" %}
 
 
   {% block ada_skip %}
   {% block ada_skip %}
   <a class="visually-hidden-focusable" href="#content">Skip navigation</a>
   <a class="visually-hidden-focusable" href="#content">Skip navigation</a>

+ 1 - 1
coderedcms/templates/coderedcms/pages/search.html

@@ -22,7 +22,7 @@
 <div class="container">
 <div class="container">
   {% block search_form %}
   {% block search_form %}
   {% if not settings.coderedcms.LayoutSettings.navbar_search %}
   {% if not settings.coderedcms.LayoutSettings.navbar_search %}
-  <form class="mt-5" action="{% url 'codered_search' %}" method="GET">
+  <form class="mt-5" action="{% url 'crx_search' %}" method="GET">
     <div class="row">
     <div class="row">
       <div class="col-8 col-sm-9">
       <div class="col-8 col-sm-9">
         {% bootstrap_form form size="lg" layout="inline" server_side_validation=False %}
         {% bootstrap_form form size="lg" layout="inline" server_side_validation=False %}

+ 1 - 1
coderedcms/templates/coderedcms/snippets/navbar.html

@@ -26,7 +26,7 @@
       {% endfor %}
       {% endfor %}
       {% endif %}
       {% endif %}
       {% if settings.coderedcms.LayoutSettings.navbar_search %}
       {% if settings.coderedcms.LayoutSettings.navbar_search %}
-      <form class="d-flex ms-auto" role="search" action="{% url 'codered_search' %}" method="GET">
+      <form class="d-flex ms-auto" role="search" action="{% url 'crx_search' %}" method="GET">
         {% load django_bootstrap5 %}
         {% load django_bootstrap5 %}
         {% get_searchform request as form %}
         {% get_searchform request as form %}
         {% for field in form %}
         {% for field in form %}

+ 1 - 1
coderedcms/templates/wagtailadmin/base.html

@@ -2,7 +2,7 @@
 {% load wagtailimages_tags wagtailsettings_tags %}
 {% load wagtailimages_tags wagtailsettings_tags %}
 
 
 {% block furniture %}
 {% block furniture %}
-    {% include "coderedcms/includes/codered_banner.html" %}
+    {% include "coderedcms/includes/crx_banner.html" %}
     {{ block.super }}
     {{ block.super }}
 {% endblock %}
 {% endblock %}
 
 

+ 1 - 1
coderedcms/templatetags/coderedcms_tags.py

@@ -176,7 +176,7 @@ def render_iframe_from_embed(embed):
 @register.filter
 @register.filter
 def map_to_bootstrap_alert(message_tag):
 def map_to_bootstrap_alert(message_tag):
     """
     """
-    Converts a message level to a bootstrap 4 alert class
+    Converts a message level to a Bootstrap 5 alert class
     """
     """
     message_to_alert_dict = {
     message_to_alert_dict = {
         "debug": "primary",
         "debug": "primary",

+ 1 - 1
coderedcms/tests/test_templates.py

@@ -4,7 +4,7 @@ from django.test import override_settings, TestCase
 
 
 
 
 EXPECTED_BANNER_HTML = """
 EXPECTED_BANNER_HTML = """
-<div class="crx-banner" style="background-color:#f00; color:#fff; width:100%; padding:4px;">
+<div class="crx-banner" style="background-color:#ff0; color:#000; text-align:center; padding:4px;">
   Test
   Test
 </div>
 </div>
 """
 """

+ 2 - 2
coderedcms/tests/test_urls.py

@@ -45,14 +45,14 @@ class TestSiteURLs(unittest.TestCase):
 
 
     def test_search(self):
     def test_search(self):
         response = self.client.get(
         response = self.client.get(
-            reverse("codered_search"), {"s": "Test Search Query"}, follow=True
+            reverse("crx_search"), {"s": "Test Search Query"}, follow=True
         )
         )
 
 
         self.assertEqual(response.status_code, 200)
         self.assertEqual(response.status_code, 200)
         self.assertNotEqual(response.context["results"], None)
         self.assertNotEqual(response.context["results"], None)
 
 
         response = self.client.get(
         response = self.client.get(
-            reverse("codered_search"),
+            reverse("crx_search"),
             {
             {
                 "s": "keyword",
                 "s": "keyword",
                 "t": "t",
                 "t": "t",

+ 6 - 15
coderedcms/tests/urls.py

@@ -1,23 +1,14 @@
 from django.urls import include, path, re_path
 from django.urls import include, path, re_path
 from django.contrib import admin
 from django.contrib import admin
 from wagtail.documents import urls as wagtaildocs_urls
 from wagtail.documents import urls as wagtaildocs_urls
-from coderedcms import admin_urls as coderedadmin_urls
-from coderedcms import search_urls as coderedsearch_urls
-from coderedcms import urls as codered_urls
+from coderedcms import admin_urls as crx_admin_urls
+from coderedcms import search_urls as crx_search_urls
+from coderedcms import urls as crx_urls
 
 
 urlpatterns = [
 urlpatterns = [
-    # Admin
     path("django-admin/", admin.site.urls),
     path("django-admin/", admin.site.urls),
-    path("admin/", include(coderedadmin_urls)),
-    # Documents
+    path("admin/", include(crx_admin_urls)),
     path("docs/", include(wagtaildocs_urls)),
     path("docs/", include(wagtaildocs_urls)),
-    # Search
-    path("search/", include(coderedsearch_urls)),
-    # For anything not caught by a more specific rule above, hand over to
-    # the page serving mechanism. This should be the last pattern in
-    # the list:
-    re_path(r"", include(codered_urls)),
-    # Alternatively, if you want CMS pages to be served from a subpath
-    # of your site, rather than the site root:
-    #    re_path(r'^pages/', include(codered_urls)),
+    path("search/", include(crx_search_urls)),
+    re_path(r"", include(crx_urls)),
 ]
 ]

+ 3 - 3
coderedcms/urls.py

@@ -15,9 +15,9 @@ from coderedcms.views import (
 
 
 urlpatterns = [
 urlpatterns = [
     # CodeRed custom URLs
     # CodeRed custom URLs
-    path(r"favicon.ico", favicon, name="codered_favicon"),
-    path(r"robots.txt", robots, name="codered_robots"),
-    path(r"sitemap.xml", sitemap, name="codered_sitemap"),
+    path(r"favicon.ico", favicon, name="crx_favicon"),
+    path(r"robots.txt", robots, name="crx_robots"),
+    path(r"sitemap.xml", sitemap, name="crx_sitemap"),
     re_path(
     re_path(
         r"^{0}(?P<path>.*)$".format(
         r"^{0}(?P<path>.*)$".format(
             crx_settings.CRX_PROTECTED_MEDIA_URL.lstrip("/")
             crx_settings.CRX_PROTECTED_MEDIA_URL.lstrip("/")

+ 1 - 1
coderedcms/wagtail_hooks.py

@@ -89,7 +89,7 @@ hooks.register("after_delete_snippet", clear_wagtailcache)
 
 
 
 
 @hooks.register("filter_form_submissions_for_user")
 @hooks.register("filter_form_submissions_for_user")
-def codered_forms(user, editable_forms):
+def crx_forms(user, editable_forms):
     """
     """
     Add our own CoderedFormPage to editable_forms, since wagtail is unaware
     Add our own CoderedFormPage to editable_forms, since wagtail is unaware
     of its existence. Essentially this is a fork of wagtail.contrib.forms.get_forms_for_user()
     of its existence. Essentially this is a fork of wagtail.contrib.forms.get_forms_for_user()

+ 1 - 1
docs/advanced/advanced01.rst

@@ -154,7 +154,7 @@ the ``snippets`` folder and create a ``navbar.html`` file inside of that folder.
          </ul>
          </ul>
          {% endfor %}
          {% endfor %}
          {% if settings.coderedcms.LayoutSettings.navbar_search %}
          {% if settings.coderedcms.LayoutSettings.navbar_search %}
-         <form class="ml-auto form-inline" action="{% url 'codered_search' %}" method="GET">
+         <form class="ml-auto form-inline" action="{% url 'crx_search' %}" method="GET">
                {% load django_bootstrap5 %}
                {% load django_bootstrap5 %}
                {% get_searchform request as form %}
                {% get_searchform request as form %}
                {% bootstrap_form form layout='inline' %}
                {% bootstrap_form form layout='inline' %}

+ 2 - 2
docs/features/blocks/contentblocks/button.rst

@@ -16,9 +16,9 @@ Fields and purposes:
   here as well, such as ``Learn <b>More</b>``.
   here as well, such as ``Learn <b>More</b>``.
 
 
 * **Button Style** - The appearance of the button. This is a choice loaded from
 * **Button Style** - The appearance of the button. This is a choice loaded from
-  ``CODERED_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
+  ``CRX_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
   CSS class in the HTML.
   CSS class in the HTML.
 
 
 * **Button Size** - The size of button. This is a choice loaded from
 * **Button Size** - The size of button. This is a choice loaded from
-  ``CODERED_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
+  ``CRX_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
   class in the HTML.
   class in the HTML.

+ 6 - 6
docs/features/blocks/contentblocks/download.rst

@@ -1,7 +1,7 @@
 Download Block
 Download Block
 ==============
 ==============
 
 
-The download block enables users to add documents to the CMS which website 
+The download block enables users to add documents to the CMS which website
 visitors can download from the site.
 visitors can download from the site.
 
 
 Field Reference
 Field Reference
@@ -11,18 +11,18 @@ Field Reference
   here as well, such as ``Learn <b>More</b>``.
   here as well, such as ``Learn <b>More</b>``.
 
 
 * **Button Style** - The appearance of the button. This is a choice loaded from
 * **Button Style** - The appearance of the button. This is a choice loaded from
-  ``CODERED_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
+  ``CRX_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
   CSS class in the HTML.
   CSS class in the HTML.
 
 
 * **Button Size** - The size of button. This is a choice loaded from
 * **Button Size** - The size of button. This is a choice loaded from
-  ``CODERED_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
+  ``CRX_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
   class in the HTML.
   class in the HTML.
 
 
 * **Auto Download** - Enables automatic download upon click of the button
 * **Auto Download** - Enables automatic download upon click of the button
 
 
 * **Document Link** - Link to the document, which you will need to upload into the CMS
 * **Document Link** - Link to the document, which you will need to upload into the CMS
 
 
-* **Advanced Settings** - Add custom CSS classes or a CSS ID to style the block with your custom CSS 
+* **Advanced Settings** - Add custom CSS classes or a CSS ID to style the block with your custom CSS
 
 
 .. figure:: img/blocks_download.png
 .. figure:: img/blocks_download.png
     :alt: A download block and its settings.
     :alt: A download block and its settings.
@@ -30,8 +30,8 @@ Field Reference
     A download block and its settings.
     A download block and its settings.
 
 
 .. figure:: img/blocks_choose_doc.png
 .. figure:: img/blocks_choose_doc.png
-    :alt: Choosing the document 
+    :alt: Choosing the document
 
 
     The popup for choosing which document you want to upload to the block for download by users
     The popup for choosing which document you want to upload to the block for download by users
 
 
-When a website visitor clicks the button, the document is available for download in a new window. 
+When a website visitor clicks the button, the document is available for download in a new window.

+ 5 - 5
docs/features/blocks/contentblocks/modal.rst

@@ -1,7 +1,7 @@
 Modal Block
 Modal Block
 ===========
 ===========
 
 
-Creates a popup box with a header, footer, and the ability to display the body as a block. 
+Creates a popup box with a header, footer, and the ability to display the body as a block.
 
 
 Field Reference
 Field Reference
 ---------------
 ---------------
@@ -12,11 +12,11 @@ Fields and purposes:
   here as well, such as ``Learn <b>More</b>``.
   here as well, such as ``Learn <b>More</b>``.
 
 
 * **Button Style** - The appearance of the button. This is a choice loaded from
 * **Button Style** - The appearance of the button. This is a choice loaded from
-  ``CODERED_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
+  ``CRX_FRONTEND_BTN_STYLE_CHOICES`` Django setting and is inserted as a
   CSS class in the HTML.
   CSS class in the HTML.
 
 
 * **Button Size** - The size of button. This is a choice loaded from
 * **Button Size** - The size of button. This is a choice loaded from
-  ``CODERED_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
+  ``CRX_FRONTEND_BTN_SIZE_CHOICES`` Django setting and is inserted as a CSS
   class in the HTML.
   class in the HTML.
 
 
 * **Modal Heading** - The heading, or title, that will display on the modal
 * **Modal Heading** - The heading, or title, that will display on the modal
@@ -25,9 +25,9 @@ Fields and purposes:
 
 
 * **Modal Footer** - Choose a Simple Text footer or a button link
 * **Modal Footer** - Choose a Simple Text footer or a button link
 
 
-Once it is published, website visitors can click the button to see the popup message. 
+Once it is published, website visitors can click the button to see the popup message.
 
 
 .. figure:: img/cupcake_modal_sample.png
 .. figure:: img/cupcake_modal_sample.png
     :alt: Our cupcake modal
     :alt: Our cupcake modal
 
 
-    Our cupcake modal as it appears on the page
+    Our cupcake modal as it appears on the page

+ 1 - 1
docs/getting_started/customize_design.rst

@@ -51,7 +51,7 @@ Custom CSS
 A Django app called ``website`` has been created to hold your custom changes. In website/static/
 A Django app called ``website`` has been created to hold your custom changes. In website/static/
 there are custom.css and custom.js files that get loaded on every page by default. Adding
 there are custom.css and custom.js files that get loaded on every page by default. Adding
 anything to these files will automatically populate on the site and override any default styles.
 anything to these files will automatically populate on the site and override any default styles.
-By default, Bootstrap 4 and jQuery are already included on the site.
+By default, Bootstrap 5 is already included on the site.
 
 
 .. note::
 .. note::
     You can also use Bootstrap color and utility classes in the **Custom CSS** fields on your pages in CMS.
     You can also use Bootstrap color and utility classes in the **Custom CSS** fields on your pages in CMS.

+ 29 - 32
docs/how_to/add_tracking_scripts.rst

@@ -1,55 +1,52 @@
 Add Tracking Scripts
 Add Tracking Scripts
 ====================
 ====================
 
 
-Tracking scripts, such as like Google Analytics or Facebook Pixels, can be added
-to the ``<head>`` and ``<body>`` of all of your web pages.
+Tracking scripts, such as Google Analytics or Facebook Pixels, can be added to
+the ``<head>`` and ``<body>`` of all of your web pages.
 
 
 Tracking settings are located in the Wagtail Admin dashboard under
 Tracking settings are located in the Wagtail Admin dashboard under
 **Settings > Tracking**.
 **Settings > Tracking**.
 
 
 .. warning::
 .. warning::
 
 
-   While it may be tempting to add dozens of tracking scripts to your website,
-   keep in mind that **each script you add will slow your site down**
-   and will invade your visitors' privacy. Therefore we recommend to carefully
-   evaluate and choose one tracking solution that best fits your needs.
+   Keep in mind that **each script you add will slow your site down** and may
+   affect your data privacy compliance such as GDPR. Therefore we recommend to
+   carefully evaluate and choose one tracking solution that best fits your
+   needs.
 
 
 
 
 Google Analytics
 Google Analytics
 ----------------
 ----------------
 
 
-There are two types of Google Analytics accounts --- "Universal Analytics"
-(generally for accounts created before 2021) and "Google Analytics 4":
-
-* **Universal Analytics** account IDs begin with **UA-**
+There are two types of Google Analytics accounts --- "Google Analytics 4" (GA4)
+and "Universal Analytics" (for old accounts created before 2021):
 
 
 * **Google Analytics 4 (GA4)** account IDs begin with **G-**
 * **Google Analytics 4 (GA4)** account IDs begin with **G-**
 
 
-* If you are using both account types, you can enter both IDs and the data will
-  populate both accounts. However, neither is "better" and using both does not
-  provide any benefit compared to using just one.
-
-.. note::
+* **Universal Analytics** account IDs begin with **UA-**. Google is shutting
+  down UA accounts in July 2023, so it is recommended to use GA4 accounts
+  instead.
 
 
-   A common misconception is that Google Analytics helps boost SEO. This is not
-   true! Google Analytics tracks people who use your site so you can see
-   metrics such as: how many people viewed which pages, for how long, from what
-   location, etc. It does not provide any benefit other than giving you this
-   information.
+* If you are using both account types, you can enter both IDs and the data will
+  populate both accounts.
 
 
 
 
 Google Tag Manager (GTM)
 Google Tag Manager (GTM)
 ------------------------
 ------------------------
 
 
-Google Tag Manager (GTM) is a separate product from Google Analytics. GTM lets
-you add **one** script to your site. Then, from the GTM Console, you can add
-multiple other tracking scripts (Such as Google Analytics, Google Adwords,
-Google Remarketing, Facebook Pixels, Salesforce, Pardot, StatCounter, Adobe,
-etc.). GTM makes it convenient for your marketing staff to continually add and
-change the tracking tools without having to make any changes to the website.
+Google Tag Manager (GTM) lets you add **one** script to your site. Then, from
+the `Google Tag Manager Console <https://tagmanager.google.com/>`_, you can add
+multiple other tracking scripts (Such as Google Analytics, Adwords, Facebook
+Pixels, HubSpot, Salesforce, Pardot, StatCounter, Adobe, etc.). GTM makes it
+convenient for your marketing staff to continually add and change the tracking
+tools without having to make any changes to the website.
+
+.. important::
 
 
-If you are using Google Tag Manager, we recommend that you remove any other
-tracking scripts from your site, and add them instead through the GTM Console.
+   If you are using Google Tag Manager, you should remove any other tracking
+   scripts from your site (including the **G-** and **UA-** IDs above), and add
+   them through the `Google Tag Manager Console
+   <https://tagmanager.google.com/>`_ instead.
 
 
 
 
 Other Scripts
 Other Scripts
@@ -78,13 +75,13 @@ If you have other tracking codes to add, follow these steps:
 
 
 .. note::
 .. note::
 
 
-    You can verify that the scripts on the web page by going to the site and
-    inspecting the Source Code. Then search for the ``<script>`` tags, either
+    You can verify that the scripts are on the web page by going to the site and
+    inspecting the source sode. Then search for the ``<script>`` tags, either
     visually or by hitting ``CTRL + F`` on your keyboard and searching for the
     visually or by hitting ``CTRL + F`` on your keyboard and searching for the
-    code. Here's how to get the Source Code if you are not sure:
+    code. Here's how to view the source code if you are not sure:
 
 
     * Firefox: https://developer.mozilla.org/en-US/docs/Tools/View_source
     * Firefox: https://developer.mozilla.org/en-US/docs/Tools/View_source
 
 
     * Chrome: https://support.google.com/surveys/answer/6172725?hl=en
     * Chrome: https://support.google.com/surveys/answer/6172725?hl=en
 
 
-    * IE/Edge: https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/resources/
+    * Edge: https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/resources/

+ 10 - 12
docs/index.rst

@@ -1,26 +1,24 @@
-Wagtail CRX Documentation
-=========================
+Wagtail CRX (CodeRed Extensions)
+================================
 
 
 `Official website <https://www.coderedcorp.com/cms/>`_ | `Source code on GitHub <https://github.com/coderedcorp/coderedcms>`_
 `Official website <https://www.coderedcorp.com/cms/>`_ | `Source code on GitHub <https://github.com/coderedcorp/coderedcms>`_
 
 
-Formerly known as CodeRed CMS, Wagtail CRX (short for Wagtail + CodeRed
-Extensions), provides a large set of enhancements and pre-built components for
-Wagtail which are ready to use out-of-the box. This saves development time and
-avoids "re-inventing the wheel" by providing features commonly needed by
-websites:
+CRX, formerly known as CodeRed CMS, provides a large set of enhancements and
+pre-built components for Wagtail which are ready to use out-of-the box! This
+saves development time and avoids "re-inventing the wheel" by providing features
+commonly needed by websites:
 
 
-* Streamfield blocks and templates for Bootstrap 4: rows, columns, hero units,
-  carousels, buttons, modals, cards, and more!
+* Streamfield blocks and page templates for Bootstrap 5: rows, columns, hero
+  units, carousels, buttons, modals, cards, and more!
 
 
 * Settings for adding logo, navigation, footer, and other common elements.
 * Settings for adding logo, navigation, footer, and other common elements.
 
 
 * Rich set of SEO tagging attributes on each page.
 * Rich set of SEO tagging attributes on each page.
 
 
-* Configurable Google Analytics tracking.
+* Configurable Google Analytics and other tracking.
 
 
 * Robust form builder including the ability for multi-step forms, conditional
 * Robust form builder including the ability for multi-step forms, conditional
-  logic, customized confirmation emails, MailChimp integration, and more (all
-  from within the streamfield!)
+  logic, customized confirmation emails, MailChimp integration, and more.
 
 
 * Article pages for building blogs, news, etc.
 * Article pages for building blogs, news, etc.
 
 

+ 6 - 3
docs/reference/django_settings.rst

@@ -16,12 +16,15 @@ flagging non-production environments like staging. For example::
 
 
 You can include basic HTML code, such as a link, in the banner.
 You can include basic HTML code, such as a link, in the banner.
 
 
-The banner defaults to a background color of red and a text color of white. If
-you want to customize this for a particular environment, you can; for example::
+The banner defaults to yellow background and black text. If you want to
+customize the color, you can specify any HTML color name or code. For example::
 
 
     CRX_BANNER_BACKGROUND = '#FFFFE0'	# light yellow background
     CRX_BANNER_BACKGROUND = '#FFFFE0'	# light yellow background
     CRX_BANNER_TEXT_COLOR = '#000'		# black text color
     CRX_BANNER_TEXT_COLOR = '#000'		# black text color
 
 
+For greater customization, you can fully override the banner's HTML template:
+``coderedcms/includes/crx_banner.html``.
+
 
 
 CRX_BANNER_BACKGROUND
 CRX_BANNER_BACKGROUND
 ---------------------
 ---------------------
@@ -40,7 +43,7 @@ CRX_FRONTEND_*
 
 
 Various frontend settings to specify defaults and choices used in the wagtail
 Various frontend settings to specify defaults and choices used in the wagtail
 admin related to rendering blocks, pages, and templates. By default, all
 admin related to rendering blocks, pages, and templates. By default, all
-CRX_FRONTEND_* settings are designed to work with Bootstrap 4 CSS framework, but
+CRX_FRONTEND_* settings are designed to work with Bootstrap 5 CSS framework, but
 these can be customized if using a different CSS framework or theme variant.
 these can be customized if using a different CSS framework or theme variant.
 
 
 `Available settings are defined here <https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/settings.py>`.
 `Available settings are defined here <https://github.com/coderedcorp/coderedcms/blob/dev/coderedcms/settings.py>`.

+ 17 - 4
docs/releases/v1.0.0.rst

@@ -23,7 +23,10 @@ New features
 * Added hidden "skip navigation" link for accessibility.
 * Added hidden "skip navigation" link for accessibility.
 
 
 * Most settings have been consolidated in the Wagtail admin under
 * Most settings have been consolidated in the Wagtail admin under
-  **Settings > CRX Settings**
+  **Settings > CRX Settings**.
+
+* Banner color has been changed from red to yellow, and appearance is slightly
+  improved in the Wagtail admin.
 
 
 * Codebase has been formatted with ``black`` to improve readability and
 * Codebase has been formatted with ``black`` to improve readability and
   maintainability.
   maintainability.
@@ -40,8 +43,8 @@ Upgrade instructions
    It is highly recommended to first upgrade and deploy your site in production
    It is highly recommended to first upgrade and deploy your site in production
    with version 0.25 before performing the upgrade to 1.0.
    with version 0.25 before performing the upgrade to 1.0.
 
 
-Updating Python code
-''''''''''''''''''''
+Updating Python code & Django templates
+'''''''''''''''''''''''''''''''''''''''
 
 
 #. Run ``pip install coderedcms==1.0.*`` and update your ``requirements.txt``
 #. Run ``pip install coderedcms==1.0.*`` and update your ``requirements.txt``
    with ``coderedcms==1.0.*``.
    with ``coderedcms==1.0.*``.
@@ -75,7 +78,7 @@ Updating Python code
 #. Find and delete any references to ``ADASettings`` in your Python and HTML
 #. Find and delete any references to ``ADASettings`` in your Python and HTML
    code.
    code.
 
 
-#. Find and replace the following references in both Python and HTML code:
+#. Find and replace the following references in your Python and HTML code:
 
 
    * ``GeneralSettings``
    * ``GeneralSettings``
    * ``GoogleApiSettings``
    * ``GoogleApiSettings``
@@ -85,6 +88,16 @@ Updating Python code
 
 
    * ``LayoutSettings``
    * ``LayoutSettings``
 
 
+#. Find and replace ``codered_banner.html`` with ``crx_banner.html`` in your
+   Python and HTML code.
+
+#. Find and replace the following URL names in your Python and HTML code:
+
+   * ``codered_favicon`` with ``crx_favicon``
+   * ``codered_robots`` with ``crx_robots``
+   * ``codered_search`` with ``crx_search``
+   * ``codered_sitemap`` with ``crx_sitemap``
+
 #. Make and run migrations:
 #. Make and run migrations:
 
 
    .. code-block:: text
    .. code-block:: text

+ 8 - 8
tutorial/mysite/mysite/urls.py

@@ -2,25 +2,25 @@ from django.conf import settings
 from django.urls import include, path, re_path
 from django.urls import include, path, re_path
 from django.contrib import admin
 from django.contrib import admin
 from wagtail.documents import urls as wagtaildocs_urls
 from wagtail.documents import urls as wagtaildocs_urls
-from coderedcms import admin_urls as coderedadmin_urls
-from coderedcms import search_urls as coderedsearch_urls
-from coderedcms import urls as codered_urls
+from coderedcms import admin_urls as crx_admin_urls
+from coderedcms import search_urls as crx_search_urls
+from coderedcms import urls as crx_urls
 
 
 urlpatterns = [
 urlpatterns = [
     # Admin
     # Admin
     path("django-admin/", admin.site.urls),
     path("django-admin/", admin.site.urls),
-    path("admin/", include(coderedadmin_urls)),
+    path("admin/", include(crx_admin_urls)),
     # Documents
     # Documents
     path("docs/", include(wagtaildocs_urls)),
     path("docs/", include(wagtaildocs_urls)),
     # Search
     # Search
-    path("search/", include(coderedsearch_urls)),
+    path("search/", include(crx_search_urls)),
     # For anything not caught by a more specific rule above, hand over to
     # For anything not caught by a more specific rule above, hand over to
     # the page serving mechanism. This should be the last pattern in
     # the page serving mechanism. This should be the last pattern in
     # the list:
     # the list:
-    re_path(r"", include(codered_urls)),
-    # Alternatively, if you want CMS pages to be served from a subpath
+    re_path(r"", include(crx_urls)),
+    # Alternatively, if you want pages to be served from a subpath
     # of your site, rather than the site root:
     # of your site, rather than the site root:
-    #    re_path(r"^pages/", include(codered_urls)),
+    #    re_path(r"^pages/", include(crx_urls)),
 ]
 ]
 
 
 
 

+ 1 - 1
tutorial/mysite/website/templates/coderedcms/snippets/navbar.html

@@ -47,7 +47,7 @@
       </ul>
       </ul>
       {% endfor %}
       {% endfor %}
       {% if settings.coderedcms.LayoutSettings.navbar_search %}
       {% if settings.coderedcms.LayoutSettings.navbar_search %}
-      <form class="d-flex ms-auto" action="{% url 'codered_search' %}" method="GET">
+      <form class="d-flex ms-auto" action="{% url 'crx_search' %}" method="GET">
           {% load django_bootstrap5 %}
           {% load django_bootstrap5 %}
           {% get_searchform request as form %}
           {% get_searchform request as form %}
           {% bootstrap_form form layout='inline' %}
           {% bootstrap_form form layout='inline' %}