bt5, main layout, responsive header

This commit is contained in:
2021-07-03 13:37:00 +02:00
parent 8e8cdfce0a
commit 4ca1618480
5 changed files with 122 additions and 136 deletions

View File

@@ -17,17 +17,16 @@
#}
<li class="nav-item dropdown btn btn-primary">
<a id="dropdownMenu1Button"
<a id="menu-section"
class="nav-link dropdown-toggle"
type="button"
data-toggle="dropdown"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ 'Sections'|trans }}
</a>
<div
class="dropdown-menu"
aria-labelledby="dropdownMenu1Button">
<div class="dropdown-menu dropdown-menu-end dropdown-menu-dark" aria-labelledby="menu-section">
{% for menu in menus %}
<a class="dropdown-item list-group-item bg-dark text-white"
href="{{ menu.uri }}">
@@ -35,7 +34,7 @@
{% apply spaceless %}
{% if menu.extras.icons is defined %}
{% for icon in menu.extras.icons %}
<i class="fa fa-{{ icon }}"></i>
<i class="fa fa-{{ icon }} fa-lg"></i>
{% endfor %}
{% endif %}
{% endapply %}</a>

View File

@@ -16,79 +16,42 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
<style>
</style>
{#
<li class="nav-link2 user-menu">
<div class="li-content">
<a href="javascript:void(0)" style="font-size: 0.8em; font-family: 'Open Sans'; font-weight:300;">
{{ 'Welcome' | trans }}<br/>
<b>{{ app.user.username }}{{ render(controller('ChillMainBundle:UI:showNotificationUserCounter')) }}</b>
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<i class="fa fa-wrench fa-lg" title="Impersonate mode"></i>
{% endif %}
</a>
</div>
<ul class="submenu width-11-em user-menu-list" style="padding-left: 0; padding-right: 0; background-color:transparent;">
{% for menu in menus %}
<li style="display:block; background-color: #333333; padding-left:1.5em; border-bottom:1px; border-bottom: 1px solid #FFF;padding-top:0; padding-bottom:0;">
<div style="margin-bottom:2px;">
<div style="font-family: 'Open Sans'; font-weight:300; font-size: 0.75em; text-align:left; height: 46px; display:inline-block; width: calc(100% - 5em - 1px); vertical-align:top;">
{% if is_granted('ROLE_PREVIOUS_ADMIN') and menu.name == 'Logout' %}
<a href="{{ path('admin_user', {'_switch_user': '_exit'}) }}">
{{ 'Exit impersonation'|trans }}
</a>
{% else %}
<a href="{{ menu.uri }}">{{ menu.label|trans }}</a>
{% endif %}
</div>
<div style="background-color: #333333; text-align:center;width: 2em; margin-left:-0.15em; font-size:1.5em; color:#FFF; height: 46px; display:inline-block; vertical-align:top;float:right">{% apply spaceless %}
{% if menu.extras.icon is defined %}
<i class="fa fa-{{ menu.extras.icon }}"></i>
{% endif %}
{% endapply %}</div>
</div>
</li>
{% endfor %}
</ul>
</li>
#}
<li class="nav-item dropdown btn btn-primary">
<a class="nav-link dropdown-toggle" type="button" id="dropdownMenu2Button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a id="menu-user"
class="nav-link dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ 'Welcome' | trans }}<br/>
<b>{{ app.user.username }}{{ render(controller('ChillMainBundle:UI:showNotificationUserCounter')) }}</b>
<b>
{{ app.user.username }}
{{ render(controller('ChillMainBundle:UI:showNotificationUserCounter')) }}
</b>
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<i class="fa fa-wrench fa-lg" title="Impersonate mode"></i>
{% endif %}
</a>
<div class="dropdown-menu dropdown-menu-right py-0 rounded-0" aria-labelledby="dropdownMenu2Button">
<div class="dropdown-menu dropdown-menu-end dropdown-menu-dark" aria-labelledby="menu-user">
{% for menu in menus %}
{% if is_granted('ROLE_PREVIOUS_ADMIN') and menu.name == 'Logout' %}
<a class="dropdown-item list-group-item bg-dark text-white border-left-0 border-right-0 border-top-0 border-white" href="{{ path('admin_user', {'_switch_user': '_exit'}) }}">
{{ 'Exit impersonation'|trans }}
<a class="dropdown-item list-group-item bg-dark text-white"
href="{{ path('admin_user', {'_switch_user': '_exit'}) }}">
{{ 'Exit impersonation'|trans }}
{% else %}
<a class="dropdown-item list-group-item bg-dark text-white border-left-0 border-right-0 border-top-0 border-white" href="{{ menu.uri }}">{{ menu.label|trans }}
<a class="dropdown-item list-group-item bg-dark text-white"
href="{{ menu.uri }}">{{ menu.label|trans }}
{% endif %}
{% if menu.extras.icon is defined %}
<i class="fa fa-{{ menu.extras.icon }}"></i>
{% endif %}
</a>
{% if menu.extras.icon is defined %}
<i class="fa fa-{{ menu.extras.icon }} fa-lg"></i>
{% endif %}
</a>
{% endfor %}
</div>
</li>
</li>