Skip to content

Commit

Permalink
Fix display menu on mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Sep 25, 2023
1 parent ddfe4e3 commit 876980d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions public/packeton/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ strong {
.navbar .nav > .nav-user > .nav-user-signin:hover > .signin-box {
display: none;
}
.navbar .nav > .nav-user > section:hover > .nav-user-menu.nav-admin-menu {
display: block;
width: 100%;
}
}

.navbar .nav > .nav-user > section a {
Expand Down Expand Up @@ -1880,3 +1884,16 @@ label.required em {
.removeRow {
text-decoration: none !important;
}

@media (max-width: 576px) {
.table-mb {
display: block;
overflow-x: auto;
}
.role-name {
white-space: normal;
}
.user-edit-btn {
display: none;
}
}
2 changes: 1 addition & 1 deletion templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<li class="nav-user">
<section>
Settings
<section class="nav-user-menu">
<section class="nav-user-menu nav-admin-menu">
{{ knp_menu_render('admin_menu', {'allow_safe_labels': true}) }}
</section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion templates/user/attempts.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{% block list %}
<b style="font-size: 1.3em">All Login attempts</b>
<table class="table table-bordered">
<table class="table table-mb table-bordered">
<thead style="background: #dddddd">
<tr class="table-token-tr">
<th>SOURCE</th>
Expand Down
2 changes: 1 addition & 1 deletion templates/user/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{% endif %}
</a>

<div style="width: 90%; margin-top: 10px">
<div style="width: 90%; margin-top: 10px" class="user-edit-btn">
<a href="{{ path('users_update', {name: user.userIdentifier}) }}" style="float: right; padding: 5px 14px;" class="btn btn-primary">Edit</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/user/token_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div style="float:right; margin: 20px">
<a class="btn btn-primary" href="{{ path('profile_add_tokens') }}">Add Token</a>
</div>
<table class="table table-bordered">
<table class="table table-mb table-bordered">
<thead style="background: #dddddd">
<tr class="table-token-tr">
<th>Name</th>
Expand Down

0 comments on commit 876980d

Please sign in to comment.