Browse Source

update user menu style

main
ghost 1 year ago
parent
commit
e9375f9127
  1. 2
      public/asset/default/css/common.css
  2. 28
      public/asset/default/css/framework.css
  3. 227
      templates/default/user/module.html.twig

2
public/asset/default/css/common.css

@ -43,7 +43,7 @@ h1 {
h2 { h2 {
color: #ccc; color: #ccc;
font-size: 16px; font-size: 14px;
} }
input, input,

28
public/asset/default/css/framework.css

@ -81,7 +81,11 @@ a.text-color-white:hover {
color: #5785b7; color: #5785b7;
} }
.text-color-night { .text-color-night,
a.text-color-night,
a.text-color-night:active,
a.text-color-night:visited,
a.text-color-night:hover {
color: #838695; color: #838695;
} }
@ -228,15 +232,15 @@ a:visited.background-color-hover-night-light:hover {
font-weight: 200 font-weight: 200
} }
.font-size-10 { .font-size-10-px {
font-size: 10px; font-size: 10px;
} }
.font-size-12 { .font-size-12-px {
font-size: 12px; font-size: 12px;
} }
.font-size-22 { .font-size-22-px {
font-size: 22px; font-size: 22px;
} }
@ -342,10 +346,18 @@ a:visited.background-color-hover-night-light:hover {
margin-left: 4px; margin-left: 4px;
} }
.margin-8-px {
margin: 8px;
}
.margin-l-8-px { .margin-l-8-px {
margin-left: 8px; margin-left: 8px;
} }
.margin-16-px {
margin: 16px;
}
.margin-l-16-px { .margin-l-16-px {
margin-left: 16px; margin-left: 16px;
} }
@ -371,8 +383,8 @@ a:visited.background-color-hover-night-light:hover {
margin-left: 96px; margin-left: 96px;
} }
.margin-l--196-px { .margin-l--56-px {
margin-left: -196px; margin-left: -56px;
} }
.margin-y-8-px { .margin-y-8-px {
@ -461,10 +473,6 @@ a:visited.background-color-hover-night-light:hover {
width: 80px; width: 80px;
} }
.width-180-px {
width: 180px;
}
.min-width-120-px { .min-width-120-px {
min-width: 120px; min-width: 120px;
} }

227
templates/default/user/module.html.twig

@ -1,188 +1,41 @@
<div class="margin-y-8-px position-fixed width-180-px margin-l--196-px background-color-night border-radius-3-px"> <div class="margin-y-16-px position-fixed margin-l--56-px">
<div class="padding-y-8-px"> {% if route == 'user_dashboard' %}
{% if route == 'user_dashboard' %} <span class="padding-8-px display-block cursor-default" title="{{ 'Home' | trans }}">
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> <path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z"/>
<path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z"/> </svg>
</svg> </span>
<span class="margin-l-4-px"> {% else %}
{{ 'Home'|trans }} <a class="padding-8-px display-block text-color-night" href="{{ path('user_dashboard') }}" title="{{ 'Home' | trans }}">
</span> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
</span> <path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z"/>
{% else %} </svg>
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('user_dashboard') }}"> </a>
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> {% endif %}
<path d="M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z"/> {% if route == 'user_profile' %}
</svg> <span class="padding-8-px display-block cursor-default" title="{{ 'Profile' | trans }}">
<span class="margin-l-4-px"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
{{ 'Home'|trans }} <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/>
</span> </svg>
</a> </span>
{% endif %} {% else %}
{% if route == 'user_profile' %} <a class="padding-8-px display-block text-color-night" href="{{ path('user_profile') }}" title="{{ 'Profile' | trans }}">
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> <path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/>
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/> </svg>
</svg> </a>
<span class="margin-l-4-px"> {% endif %}
{{ 'Profile'|trans }} {% if route == 'page_submit' or route == 'torrent_submit' %}
</span> <span class="padding-8-px display-block cursor-default" title="{{ 'Submit' | trans }}">
</span> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
{% else %} <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('user_profile') }}"> </svg>
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> </span>
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"/> {% else %}
</svg> <a class="padding-8-px display-block text-color-night" href="{{ path('page_submit') }}" title="{{ 'Submit' | trans }}">
<span class="margin-l-4-px"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 16 16">
{{ 'Profile'|trans }} <path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>
</span> </svg>
</a> </a>
{% endif %} {% endif %}
{#
{% if route == 'page_stars' %}
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Stars'|trans }}
</span>
<span class="float-right">
{{ stars }}
</span>
</span>
{% else %}
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('page_stars') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Stars'|trans }}
</span>
<span class="float-right">
{{ stars }}
</span>
</a>
{% endif %}
{% if route == 'page_views' %}
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Views'|trans }}
</span>
<span class="float-right">
{{ views }}
</span>
</span>
{% else %}
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('page_views') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71V3.5z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Views'|trans }}
</span>
<span class="float-right">
{{ views }}
</span>
</a>
{% endif %}
{% if route == 'page_comments' %}
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M8 15c4.418 0 8-3.134 8-7s-3.582-7-8-7-8 3.134-8 7c0 1.76.743 3.37 1.97 4.6-.097 1.016-.417 2.13-.771 2.966-.079.186.074.394.273.362 2.256-.37 3.597-.938 4.18-1.234A9.06 9.06 0 0 0 8 15z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Comments'|trans }}
</span>
<span class="float-right">
{{ comments }}
</span>
</span>
{% else %}
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('page_comments') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M8 15c4.418 0 8-3.134 8-7s-3.582-7-8-7-8 3.134-8 7c0 1.76.743 3.37 1.97 4.6-.097 1.016-.417 2.13-.771 2.966-.079.186.074.394.273.362 2.256-.37 3.597-.938 4.18-1.234A9.06 9.06 0 0 0 8 15z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Comments'|trans }}
</span>
<span class="float-right">
{{ comments }}
</span>
</a>
{% endif %}
{% if route == 'page_downloads' %}
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Downloads'|trans }}
</span>
<span class="float-right">
{{ downloads }}
</span>
</span>
{% else %}
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('page_downloads') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Downloads'|trans }}
</span>
<span class="float-right">
{{ downloads }}
</span>
</a>
{% endif %}
{% if route == 'page_editions' %}
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM8.5 4.5V6H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V7H6a.5.5 0 0 1 0-1h1.5V4.5a.5.5 0 0 1 1 0zM6 10h4a.5.5 0 0 1 0 1H6a.5.5 0 0 1 0-1z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Editions'|trans }}
</span>
<span class="float-right">
{{ editions }}
</span>
</span>
{% else %}
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('page_editions') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM8.5 4.5V6H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V7H6a.5.5 0 0 1 0-1h1.5V4.5a.5.5 0 0 1 1 0zM6 10h4a.5.5 0 0 1 0 1H6a.5.5 0 0 1 0-1z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Editions'|trans }}
</span>
<span class="float-right">
{{ editions }}
</span>
</a>
{% endif %}
#}
{% if route == 'page_submit' or route == 'torrent_submit' %}
<span class="padding-x-16-px padding-y-8-px display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Submit'|trans }}
</span>
</span>
{% else %}
<a class="padding-x-16-px padding-y-8-px display-block background-color-hover-night-light text-color-default" href="{{ path('page_submit') }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/>
</svg>
<span class="margin-l-4-px">
{{ 'Submit'|trans }}
</span>
</a>
{% endif %}
</div>
</div> </div>
Loading…
Cancel
Save