mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix nav-dropdown (#326)
This commit is contained in:
1 parent
f9918128a9
commit
adce12e212
3 files changed
+5
-4
No files matched your search
@@ -26,7 +26,7 @@ export default class Dropdown extends DOMAttachedObject {
|
|||||||
};
|
};
|
||||||
this.dropInstance = new Drop({
|
this.dropInstance = new Drop({
|
||||||
target: $dom[0],
|
target: $dom[0],
|
||||||
classes: 'dropdown',
|
classes: `dropdown ${$dom.attr('data-dropdown-custom-class') || ''}`,
|
||||||
content: this.options.target || $.find($dom.attr('data-dropdown-target'))[0],
|
content: this.options.target || $.find($dom.attr('data-dropdown-target'))[0],
|
||||||
position: this.options.position,
|
position: this.options.position,
|
||||||
openOn: 'hover',
|
openOn: 'hover',
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
.drop .dropdown-target
|
.drop .dropdown-target
|
||||||
display: block
|
display: block
|
||||||
|
|
||||||
.dropdown
|
.drop.nav__dropdown
|
||||||
max-height: calc(100% - 60px)
|
max-height: calc(100% - 60px)
|
||||||
overflow-y: auto
|
overflow-y: auto
|
||||||
|
box-shadow: 0rem 0.125rem 0.4375rem rgba(0 0 0 , 30%);
|
||||||
|
|
||||||
.dropdown
|
.dropdown
|
||||||
.menu
|
.menu
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
{% if not handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
|
||||||
<li class="nav__list-item"><a href="{{ url('user_login') }}" class="nav__item" name="nav_login">{{ _('Login') }}</a></li>
|
<li class="nav__list-item"><a href="{{ url('user_login') }}" class="nav__item" name="nav_login">{{ _('Login') }}</a></li>
|
||||||
<li class="nav__list-item"><a href="{{ url('user_register') }}" class="nav__item--round">{{ _('Sign Up') }}</a></li>
|
<li class="nav__list-item"><a href="{{ url('user_register') }}" class="nav__item--round">{{ _('Sign Up') }}</a></li>
|
||||||
<li class="nav__list-item" data-dropdown-pos="bottom right" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
|
<li class="nav__list-item" data-dropdown-pos="bottom right" data-dropdown-custom-class="nav__dropdown" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
|
||||||
<a href="javascript:;" class="nav__item">
|
<a href="javascript:;" class="nav__item">
|
||||||
<span class="icon icon-global"></span>Language <span class="icon icon-expand_more"></span>
|
<span class="icon icon-global"></span>Language <span class="icon icon-expand_more"></span>
|
||||||
</a>
|
</a>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
{% else %}
|
{% else %}
|
||||||
<li class="nav__list-item" data-dropdown-pos="bottom right" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
|
<li class="nav__list-item" data-dropdown-pos="bottom right" data-dropdown-custom-class="nav__dropdown" data-dropdown-target="#menu-nav-user" data-dropdown-disabledconstrainToWindow data-dropdown-trigger-desktop-only>
|
||||||
<a href="{{ url('user_detail', uid=handler.user._id) }}" class="nav__item">{{ handler.user.uname }} <span class="icon icon-expand_more nojs--hide"></span></a>
|
<a href="{{ url('user_detail', uid=handler.user._id) }}" class="nav__item">{{ handler.user.uname }} <span class="icon icon-expand_more nojs--hide"></span></a>
|
||||||
<ol class="dropdown-target menu" id="menu-nav-user">
|
<ol class="dropdown-target menu" id="menu-nav-user">
|
||||||
<li class="menu__item">
|
<li class="menu__item">
|
||||||
|
|||||||
Reference in new issue
Block a user