mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: add problem_edit tab active color (#314)
This commit is contained in:
1 parent
ad3a0c48aa
commit
5d81ce82c5
3 files changed
+16
-1
No files matched your search
@@ -257,6 +257,8 @@ export default new NamedPage(['problem_create', 'problem_edit'], (pagename) => {
|
||||
}
|
||||
const editor = Editor.getOrConstruct($main, { upload, onChange });
|
||||
$('[data-lang]').on('click', (ev) => {
|
||||
$('[data-lang]').removeClass('tab--active');
|
||||
$(ev.currentTarget).addClass('tab--active');
|
||||
const lang = $(ev.currentTarget).attr('data-lang');
|
||||
activeTab = lang;
|
||||
const val = getContent(lang);
|
||||
|
||||
@@ -71,3 +71,16 @@
|
||||
margin-left: 0
|
||||
margin-right: 0
|
||||
margin-top: rem(floor($menu-drop-triangle-size * -1.414))
|
||||
|
||||
.section__tab-header-item
|
||||
border-top: 3px solid transparent;
|
||||
transition: border-color 0.2s, background 0.2s, color 0.2s;
|
||||
transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
margin-right: 0
|
||||
|
||||
&:hover
|
||||
border-color: #5f9fd6;
|
||||
background: #f8f8f8;
|
||||
|
||||
&.tab--active
|
||||
border-color: #ed5f82;
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="section__tab-container nojs--hide">
|
||||
<div class="section__tab-header-wrapper">
|
||||
<ul class="section__tab-header">
|
||||
<li class="section__tab-header-item" data-lang="{{ _('__id') }}">{{ _('__langname') }}</li>
|
||||
<li class="section__tab-header-item tab--active" data-lang="{{ _('__id') }}">{{ _('__langname') }}</li>
|
||||
{% for k, v in model.setting.SETTINGS_BY_KEY['viewLang'].range %}
|
||||
{% if k != handler.user.viewLang %}
|
||||
<li class="section__tab-header-item" data-lang="{{ k }}">{{ v }}</li>
|
||||
|
||||
Reference in new issue
Block a user