Commit 2dd63791 authored by Sebastian Castro's avatar Sebastian Castro

Improve user menu

parent 0ce67323
parameters:
app.version: 1.7.0
\ No newline at end of file
app.version: 1.7.1
\ No newline at end of file
......@@ -44,8 +44,8 @@
}
&.with-sidebar {
@media only screen and (min-width : 900px) and (max-width : 1380px) {
padding-left: 200px;
@media only screen and (min-width : 900px) and (max-width : 1400px) {
padding-left: 220px;
}
}
}
......@@ -67,7 +67,7 @@
}
&.with-sidebar {
@media only screen and (min-width : 900px) and (max-width : 1380px) {
@media only screen and (min-width : 900px) and (max-width : 1400px) {
width: auto;
margin: 0 20px;
margin-top: 30px;
......
......@@ -2,55 +2,91 @@
* @Author: Sebastian Castro
* @Date: 2018-03-17 12:11:03
* @Last Modified by: Sebastian Castro
* @Last Modified time: 2018-03-17 12:59:54
* @Last Modified time: 2018-03-19 14:14:02
*/
.menu-user {
width: 170px;
#menu-overlay {
position: fixed;
top: 0; left: 0;right: 0; bottom: 0;
z-index: 10;
display: none;
background-color: rgba(0, 0, 0, 0.49);
}
.menu-user-button {
font-size: 2rem;
line-height: 4.3rem;
float: left;
padding: 1rem;
@media (min-width : 901px) {
display: none;
}
}
.menu-user {
width: 190px;
z-index: 20;
position: fixed;
left: 20px;
top: calc(3.5rem + 30px);
@media (min-width: 1380px) {
@media (min-width: 1400px) {
position: absolute;
left: -200px;
left: -220px;
top: 0;
}
@media (max-width : 900px) {
display: none;
height: 100%;
left: 0;
background-color: white;
top: 3rem;
}
@media (min-width : 901px) { display: block !important; }
ul {
margin: 0;
a {
color: inherit;
&:not(:last-child) { li { border-bottom: 1px solid #d0d0d0; } }
&:last-child { li { border-radius: 0 0 5px 5px; } }
@media (min-width : 901px) {
&:last-child { li { border-radius: 0 0 5px 5px; } }
}
}
li {
background-color: white;
line-height: 3rem;
height: 3rem;
padding: 0 20px 0 13px;
overflow: hidden;
&.title {
color: white;
font-size: 1.1rem;
font-weight: bold;
border-radius: 5px 5px 0 0;
@media (min-width : 901px) { border-radius: 5px 5px 0 0; }
padding-left: 16px;
}
&.active { text-decoration: underline; }
background-color: white;
line-height: 3rem;
padding: 0 20px;
&.active { text-decoration: underline; }
&:hover:not(.title) {
cursor: pointer;
background-color: #eee;
@include transition(all .3s);
}
}
i {
line-height: 3.2rem;
font-size: 1.2rem;
opacity: .8;
margin-right: .6rem;
float: left;
}
}
}
......
......@@ -67,11 +67,11 @@
<li class="name only-for-admin" {{ app.user and app.user.isAdmin ? '' : 'style="display:none"' }}>
<a class="about-title-item waves-effect waves-light" href="{{ path('sonata_admin_dashboard') }}">Interface admin</a></li>
<li class="item-divider"></li>
<li class="name">
{#<li class="name">
<a class="about-title-item waves-effect waves-light" href="{{ path('biopen_user_profile') }}">Préférences</a></li>
<li class="item-divider"></li>
<li class="item-divider"></li>#}
<li class="name only-for-user" {{ app.user ? '' : 'style="display:none"' }}>
<a class="about-title-item waves-effect waves-light" href="{{ path('biopen_user_contributions') }}">Mes contributions</a></li>
<a class="about-title-item waves-effect waves-light" href="{{ path('biopen_user_contributions') }}">Mon Espace</a></li>
<li class="item-divider"></li>
<li class="name">
<a class="about-title-item waves-effect waves-light" onclick="logout()">Se Déconnecter</a></li>
......
......@@ -3,13 +3,16 @@
{# BODY CONTENT #}
{% block body_content %}
<div class="menu-user">
<i class="gogo-icon-menu menu-user-button" onclick="showMenu()"></i>
<div id="menu-overlay" onclick="hideMenu()"></div>
<div id="menu-user" class="menu-user side-nav">
<ul>
<li class="title">Menu</li>
<a href="{{ path('biopen_user_profile') }}"><li>Préférences</li></a>
<a href="{{ path('biopen_user_contributions') }}"><li>Mes contributions</li></a>
<a href="{{ path('biopen_user_votes') }}"><li>Mes votes</li></a>
<a href="{{ path('biopen_user_reports') }}"><li>Mes signalements</li></a>
<a href="{{ path('biopen_user_profile') }}"> <li><i class="gogo-icon-filters-1"></i>Préférences</li></a>
<a href="{{ path('biopen_user_contributions') }}"><li><i class="gogo-icon-edit"></i>Mes contributions</li></a>
<a href="{{ path('biopen_user_votes') }}"> <li><i class="gogo-icon-vote"></i>Mes votes</li></a>
<a href="{{ path('biopen_user_reports') }}"> <li><i class="gogo-icon-exclamation-1"></i>Mes signalements</li></a>
</ul>
</div>
......@@ -18,4 +21,18 @@
{% endblock %}
</section>
{% endblock %}
\ No newline at end of file
{% endblock %}
{% block page_javascripts %}
<script>
function showMenu() {
$('#menu-user').show();
$('#menu-overlay').fadeIn();
}
function hideMenu() {
$('#menu-user').hide();
$('#menu-overlay').fadeOut();
}
</script>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment