~cedric/newspipe

f5ac15cec41c09b9041ca4244c95293b14796a6f — C├ędric Bonhomme 17 days ago 50718a5
Alert messages are now placed in the navbar.
2 files changed, 25 insertions(+), 20 deletions(-)

M newspipe/static/css/custom.css
M newspipe/templates/layout.html
M newspipe/static/css/custom.css => newspipe/static/css/custom.css +8 -0
@@ 87,12 87,20 @@ a {
    display: inline;
}

.alert {
  margin-bottom: 1px;
  height: 30px;
  line-height: 30px;
  padding: 0px 15px;
}

.alert-message {
    position: relative;
    display: block;
    z-index: 1001;
}


/*customization for Flask-Paginate*/
.pagination-page-info {
    display: inline;

M newspipe/templates/layout.html => newspipe/templates/layout.html +17 -20
@@ 28,6 28,23 @@
        {% block menu_links %}
        <div class="collapse navbar-collapse" id="navbarSupportedContent">

            <ul class="navbar-nav mr-auto w-100 justify-content-center">
                <li class="nav-item">
                {% block messages %}
                    {% with messages = get_flashed_messages(with_categories=true) %}
                        {% if messages %}
                            {% for category, message in messages %}
                                <div class="alert alert-{{category}}" role="alert">
                                    {{ message }}
                                    <button type="button" class="close" data-dismiss="alert">&times;</button>
                                </div>
                            {% endfor %}
                        {% endif %}
                    {% endwith %}
                {% endblock %}
                </li>
            </ul>

            <ul class="navbar-nav mr-auto w-100 justify-content-end">
                {% if current_user.is_authenticated %}
                    {% if current_user.is_admin %}


@@ 129,26 146,6 @@
      </div>
    </nav>
    {% endblock %}
    <br />

    <div class="container alert-message not-at-home">
    {% block messages %}
        {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
                <div class="row justify-content-center">
                    <div class="col-md-6">
                        {% for category, message in messages %}
                            <div class="alert alert-{{category}}">
                                <button type="button" class="close" data-dismiss="alert">&times;</button>
                                {{ message }}
                            </div>
                        {% endfor %}
                    </div>
                </div>
            {% endif %}
        {% endwith %}
    {% endblock %}
    </div>

    {% block content %}{% endblock %}