Update user navigation menu to display the number of new PM on narrow screens

This commit is contained in:
Visman 2021-04-04 15:39:06 +07:00
parent bb1f76ce51
commit bdffcdbb3b
5 changed files with 11 additions and 4 deletions

View file

@ -216,6 +216,8 @@ abstract class Page extends Model
$r->link('PM'),
$this->user->u_pm_num_new > 0 ? ['PM %s', $this->user->u_pm_num_new] : 'PM',
'Private messages',
null,
$this->user->u_pm_num_new > 0 ? 'newpm' : null,
];
}

View file

@ -321,7 +321,7 @@ msgid "PM"
msgstr "PM"
msgid "PM %s"
msgstr "PM <b>(%s)</b>"
msgstr "<span class="f-spantxtpm">PM </span><b>(%s)</b>"
msgid "Private messages"
msgstr "Private messages"

View file

@ -323,7 +323,7 @@ msgid "PM"
msgstr "ЛС"
msgid "PM %s"
msgstr "ЛС <b>(%s)</b>"
msgstr "<span class="f-spantxtpm">ЛС </span><b>(%s)</b>"
msgid "Private messages"
msgstr "Личные сообщения"

View file

@ -52,7 +52,7 @@
@if ($p->fNavigationUser)
<ul class="f-menu-user-items">
@foreach ($p->fNavigationUser as $key => $val)
<li id="fork-nav-{{ $key }}" class="f-menu-item"><!-- inline -->
<li id="fork-nav-{{ $key }}" class="f-menu-item @if ($val[4]) f-mi-{{ $val[4] }} @endif"><!-- inline -->
<a class="f-menu-a @if ($key == $p->fIndex) active @endif" href="{{ $val[0] }}" @if ($val[2]) title="{{ __($val[2]) }}" @endif>
<span class="f-menu-span">{!! __($val[1]) !!}</span>
</a>

View file

@ -487,9 +487,14 @@ html[lang="ru"] #fork details[open] > summary::after {
}
@media screen and (max-width: 34rem) {
#fork-nav-profile ~ .f-menu-item .f-menu-span {
#fork .f-spantxtpm,
#fork-nav-profile ~ .f-menu-item:not(.f-mi-newpm) .f-menu-span {
display: none;
}
#fork-nav-profile ~ .f-menu-item:not(.f-mi-newpm) .f-menu-a:before {
padding: 0;
}
}
@media screen and (min-width: 50rem) {