Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal not working #202

Open
thiagoalencar opened this issue Mar 17, 2020 · 0 comments
Open

Modal not working #202

thiagoalencar opened this issue Mar 17, 2020 · 0 comments

Comments

@thiagoalencar
Copy link

I was trying to use a Bootstrap modal in my project, but it would show in the screen.
Searching for a solution I found that bootstrap import libraries need to be in the same order as in the site because of jquery dependecie. Then I verified that the bootstrap base.html respect this other and still nothing worked.
So I moved the scripts tags from the bottom of the template to the head block. Now the modal works fine.
`{% block doc -%}

<html{% block html_attribs %}{% endblock html_attribs %}>
{%- block html %}

{%- block metas %} {%- endblock metas %}
{%- block head %}
<title>{% block title %}{{title|default}}{% endblock title %}</title>

{%- block styles %}
<!-- Bootstrap -->
<link href="{{bootstrap_find_resource('css/bootstrap.css', cdn='bootstrap')}}" rel="stylesheet">
<link href="{{bootstrap_find_resource('css/fontawesome-all.css', cdn='bootstrap')}}" rel="stylesheet">
<script src="{{bootstrap_find_resource('jquery.js', cdn='jquery')}}"></script>
<script src="{{bootstrap_find_resource('umd/popper.js', cdn='popper')}}"></script>
<script src="{{bootstrap_find_resource('js/bootstrap.js', cdn='bootstrap')}}"></script>
{%- endblock styles %}
{%- endblock head %}
{% block body -%} {% block navbar %} {%- endblock navbar %} {% block content -%} {%- endblock content %}
{% block scripts %}

{%- endblock scripts %}
{%- endblock body %}
{%- endblock html %} {% endblock doc -%} `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant