-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: removed Nav Container plugin and fixed Navigation Link plugin (#192
- Loading branch information
Showing
37 changed files
with
637 additions
and
547 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
djangocms_frontend/contrib/navigation/templates/djangocms_frontend/admin/nav_container.html
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
.../contrib/navigation/templates/djangocms_frontend/bootstrap5/navigation/default/brand.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{% load cms_tags sekizai_tags %}{% spaceless %}{% with link=instance.get_link %}{% if link %}<a {{ instance.get_attributes }} href="{{ link }}"{% if instance.target %} target="{{ instance.target }}"{% endif %}>{% else %} <{{ instance.tag_type }}{{ instance.get_attributes }}>{% endif %} | ||
{% load cms_tags sekizai_tags %}{% spaceless %}{% with link=instance.get_link %}{% if link %}<a {{ instance.get_attributes }} href="{{ link }}"{% if instance.target %} target="{{ instance.target }}"{% endif %}>{% else %} <span {{ instance.get_attributes }}>{% endif %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% with parentloop=forloop parent=instance %}{% render_plugin plugin %}{% endwith %} | ||
{% empty %}{{ instance.simple_content }}{% endfor %} | ||
{% if link %}</a>{% else %}</{{ instance.tag_type }}>{% endif %}{% endwith %} | ||
{% if link %}</a>{% else %}</span>{% endif %}{% endwith %} | ||
{% endspaceless %} |
2 changes: 2 additions & 0 deletions
2
...d/contrib/navigation/templates/djangocms_frontend/bootstrap5/navigation/default/icon.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% if "iconClass" in icon_class %}{% load icon_tags %}{% add_css_for_icon icon_class %}<i class="{{ icon_class.iconClass }} {{ attribute_class }}">{{ icon_class.iconText }}</i> | ||
{% else %}<i class="{{ icon_class }} {{ attribute_class }}" aria-hidden="true"></i>{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
.../navigation/templates/djangocms_frontend/bootstrap5/navigation/default/nav_container.html
This file was deleted.
Oops, something went wrong.
37 changes: 21 additions & 16 deletions
37
...rib/navigation/templates/djangocms_frontend/bootstrap5/navigation/default/navigation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
{% load cms_tags frontend %}{% spaceless %} | ||
<nav{{ instance.get_attributes }}> | ||
{% if instance.navbar_container %}<div class="container">{% endif %} | ||
{% load cms_tags frontend %} | ||
<nav{{ instance.get_attributes }}> | ||
{% if instance.navbar_container %}<div class="container">{% endif %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type == "NavBrandPlugin" %} | ||
{% render_plugin plugin %} | ||
{% endif %} | ||
{% endfor %} | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#nav{{ instance.id|safe }}" aria-controls="nav{{ instance.id|safe }}" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="nav{{ instance.id|safe }}"> | ||
<ul class="navbar-nav"> | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type == "BrandPlugin" %} | ||
{% render_plugin plugin %} | ||
{% endif %} | ||
{% endfor %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type != "BrandPlugin" %} | ||
{% with forloop=parentloop parent=instance %}{% render_plugin plugin %}{% endwith %} | ||
{% endif %} | ||
{% endfor %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type != "NavBrandPlugin" %} | ||
{% with forloop=parentloop parent=instance %}{% render_plugin plugin %}{% endwith %} | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% if instance.navbar_container %}</div>{% endif %} | ||
</nav> | ||
{% endspaceless %} | ||
</div> | ||
{% if instance.navbar_container %}</div>{% endif %} | ||
</nav> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...contrib/navigation/templates/djangocms_frontend/bootstrap5/navigation/offcanvas/menu.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
...avigation/templates/djangocms_frontend/bootstrap5/navigation/offcanvas/nav_container.html
This file was deleted.
Oops, something went wrong.
37 changes: 27 additions & 10 deletions
37
...b/navigation/templates/djangocms_frontend/bootstrap5/navigation/offcanvas/navigation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
{% load cms_tags frontend %}{% spaceless %} | ||
<nav{{ instance.get_attributes }}> | ||
{% if instance.navbar_container %}<div class="container">{% endif %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type == "BrandPlugin" %} | ||
{% render_plugin plugin %} | ||
{% endif %} | ||
{% endfor %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type != "BrandPlugin" %} | ||
{% with forloop=parentloop parent=instance %}{% render_plugin plugin %}{% endwith %} | ||
{% endif %} | ||
{% endfor %} | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type == "NavBrandPlugin" %} | ||
{% render_plugin plugin %} | ||
{% endif %} | ||
{% endfor %} | ||
<button class="btn" type="button" data-bs-toggle="offcanvas" data-bs-target="#nav{{ instance.id|safe }}" aria-controls="nav{{ instance.id|safe }}" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
{% if instance.navbar_container %}</div>{% endif %} | ||
</nav> | ||
<div class="offcanvas offcanvas-end" id="nav{{ instance.id|safe }}"> | ||
<div class="offcanvas-header"> | ||
<button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button> | ||
</div> | ||
<div class="offcanvas-body"> | ||
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3"> | ||
{% for plugin in instance.child_plugin_instances %} | ||
{% if plugin.plugin_type != "NavBrandPlugin" %} | ||
{% with forloop=parentloop parent=instance %}{% render_plugin plugin %}{% endwith %} | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endspaceless %} | ||
<style> | ||
html.cms-toolbar-expanded .offcanvas-header { | ||
margin-top: 3rem; | ||
} | ||
</style> |
Oops, something went wrong.