mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-07-09 05:33:11 +02:00
Highlight the default language in the lang switcher
This commit is contained in:
@@ -907,6 +907,8 @@ tr {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
background-color: #349886; }
|
||||
.button-group .dropdown-menu.language-switcher a.active {
|
||||
background-color: #349886; }
|
||||
|
||||
.open > .dropdown-menu {
|
||||
display: block; }
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -100,6 +100,12 @@
|
||||
background-color: $secondary-accent-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&.language-switcher {
|
||||
a.active {
|
||||
background-color: #349886
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,4 +120,4 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 990;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
{% set warn = config.plugins.admin.warnings.delete_page %}
|
||||
|
||||
{% set admin_lang = admin.session.admin_lang ?: 'en' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{% if mode == 'edit' %}
|
||||
{% do assets.addCss(theme_url~'/css/codemirror/codemirror.css') %}
|
||||
@@ -84,15 +86,14 @@
|
||||
<button type="button" class="button dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-language"></i> {{ "PLUGIN_ADMIN.SWITCH_LANGUAGE"|tu }} <i class="fa fa-caret-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<ul class="dropdown-menu language-switcher">
|
||||
{% for language in admin.languages_enabled %}
|
||||
<li><a class="button" href="{{ base_url_relative }}{{ theme.slug }}/pages/task{{ config.system.param_sep }}switchlanguage/lang{{ config.system.param_sep }}{{language}}"><i class="fa fa-fw fa-plus"></i> {{language}}</a></li>
|
||||
<li><a class="button {% if admin_lang == language %}active{% endif %}" href="{{ base_url_relative }}{{ theme.slug }}/pages/task{{ config.system.param_sep }}switchlanguage/lang{{ config.system.param_sep }}{{language}}"><i class="fa fa-fw fa-plus"></i> {{language}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% elseif mode == 'edit' %}
|
||||
<a class="button" href="{{ base_url }}/pages"><i class="fa fa-reply"></i> {{ "PLUGIN_ADMIN.BACK"|tu }}</a>
|
||||
{% if exists %}
|
||||
|
||||
Reference in New Issue
Block a user