diff --git a/corehq/apps/styleguide/context.py b/corehq/apps/styleguide/context.py index 88cf8d55b659..c0df34eb0354 100644 --- a/corehq/apps/styleguide/context.py +++ b/corehq/apps/styleguide/context.py @@ -20,6 +20,7 @@ def get_navigation_context(current_page): Page("Introduction", 'styleguide_home_b5'), Page("Code Guidelines", 'styleguide_code_guidelines_b5'), Page("Bootstrap Migration Guide", 'styleguide_migration_guide_b5'), + Page("Javascript Guide", 'styleguide_javascript_guide_b5'), ], ), NavigationGroup( diff --git a/corehq/apps/styleguide/templates/styleguide/bootstrap5/javascript_guide.html b/corehq/apps/styleguide/templates/styleguide/bootstrap5/javascript_guide.html new file mode 100644 index 000000000000..85474484ba91 --- /dev/null +++ b/corehq/apps/styleguide/templates/styleguide/bootstrap5/javascript_guide.html @@ -0,0 +1,31 @@ +{% extends 'styleguide/bootstrap5/base.html' %} + +{% block intro %} +
+ How to use javascript on HQ. +
+{% endblock intro %} + +{% block toc %} ++ This Style Guide aims to be a good review of the visual components of our front-end, which includes CSS and javascript + from various libraries. For a more in-depth review of our JavaScript structure, organization, and processes, + please refer to the + Dimagi JavaScript Guide. +
+{% endblock content %} diff --git a/corehq/apps/styleguide/urls.py b/corehq/apps/styleguide/urls.py index d7c752b02873..18ff354590ae 100644 --- a/corehq/apps/styleguide/urls.py +++ b/corehq/apps/styleguide/urls.py @@ -48,6 +48,8 @@ name="styleguide_code_guidelines_b5"), url(r'^b5/migration/$', bootstrap5.styleguide_migration_guide, name="styleguide_migration_guide_b5"), + url(r'^b5/javascript/$', bootstrap5.styleguide_javascript_guide, + name="styleguide_javascript_guide_b5"), url(r'^b5/atoms/accessibility/$', bootstrap5.styleguide_atoms_accessibility, name="styleguide_atoms_accessibility_b5"), url(r'^b5/atoms/typography/$', bootstrap5.styleguide_atoms_typography, diff --git a/corehq/apps/styleguide/views/bootstrap5.py b/corehq/apps/styleguide/views/bootstrap5.py index 7efb7d04d531..5a671630b246 100644 --- a/corehq/apps/styleguide/views/bootstrap5.py +++ b/corehq/apps/styleguide/views/bootstrap5.py @@ -50,6 +50,12 @@ def styleguide_migration_guide(request): get_navigation_context("styleguide_migration_guide_b5")) +@use_bootstrap5 +def styleguide_javascript_guide(request): + return render(request, 'styleguide/bootstrap5/javascript_guide.html', + get_navigation_context("styleguide_javascript_guide_b5")) + + @use_bootstrap5 def styleguide_atoms_accessibility(request): return render(request, 'styleguide/bootstrap5/atoms/accessibility.html',