Skip to content
Snippets Groups Projects
Commit d0dbd88c authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Changed account dropdown according bootstrap 5

parent b37704a8
Branches
Tags
1 merge request!50Upgraded to CKAN 2.10
......@@ -62,7 +62,7 @@
/* dirty fix to make it the same height as schleswig-holstein.de */
}
.language-switch.sign-language {
.navbar-right {
margin-left: auto !important;
}
......@@ -280,6 +280,10 @@
background-color: #003064 !important;
}
.nav-pills li:hover .user-icon, .nav-pills li:active .user-icon {
fill: white;
}
@media (min-width: 768px) {
.navbar.masthead .navigation .nav-pills li:not(:nth-child(2)) {
margin-left: 22px;
......@@ -386,10 +390,6 @@
vertical-align: middle;
}
.navbar.masthead .navigation .nav-pills li.dropdown {
float: right;
}
.navbar.masthead .navigation .nav-pills li.dropdown>.dropdown-toggle {
padding-bottom: 13px;
padding-top: 15px;
......
......@@ -51,28 +51,40 @@
{% link_for _('Upload'), named_route='dataset.new', class_='text' %}
</li>
{% endif %}
{% block header_account_container_content %}
{% if c.userobj %}
<li class="dropdown navbar-right {{clazz}}">
{% set name = c.userobj.fullname if c.userobj.fullname else c.userobj.email%}
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<a href="#" class="dropdown-toggle" data-bs-toggle="dropdown" id="accountMenuButton" aria-expanded="false">
<svg class='user-icon' viewBox="0 0 54 54">
<circle class='user-icon' cx="27" cy="17" r="7.5" />
<path class='user-icon'
d="M42.5,44.5h-31v-6.4c0-4.7,3.9-8.6,8.6-8.6h13.9c4.7,0,8.6,3.9,8.6,8.6V44.5z" />
</svg>
{{name}}</a>
<ul class="dropdown-menu" role="menu">
<ul class="dropdown-menu" role="menu" aria-labelledby="accountMenuButton">
{% block header_account_logged %} {% if c.userobj.sysadmin %}
<li>
<a href="{{ h.url_for('admin.index') }}" title="{{ _('Sysadmin settings') }}">
<i class="fa fa-gavel" aria-hidden="true"></i>
<span class="text">{{ _('Admin') }}</span>
</a>
</li>
{% endif %}
{% block header_account_profile %}
<li>
<svg class='user-icon-small' viewBox="0 0 54 54">
<circle cx="27" cy="17" r="7.5" />
<path d="M42.5,44.5h-31v-6.4c0-4.7,3.9-8.6,8.6-8.6h13.9c4.7,0,8.6,3.9,8.6,8.6V44.5z" />
</svg>
<a href="{{ h.url_for('user.read', id=c.userobj.name) }}" aria-label="{{ _('View profile') }}" title="{{ _('View profile') }}" role="menuitem">
<a href="{{ h.url_for('user.read', id=c.userobj.display_name) }}" aria-label="{{ _('View profile') }}" title="{{ _('View profile') }}" role="menuitem">
<span class="text">
{{ _('View profile') }}
</span>
</a>
</li>
{% endblock %}
{% block header_account_settings_link %}
<li>
<a href="{{ h.url_for('user.edit', id=c.userobj.name) }}" aria-label="{{ _('Edit profile') }}" title="{{ _('Edit profile') }}" role="menuitem">
<i class='fa fa-edit'></i>
......@@ -81,12 +93,15 @@
</span>
</a>
</li>
{% endblock %}
{% block header_account_log_out_link %}
<li>
<a href="{{ h.url_for('user.logout') }}" aria-label="{{ _('Logout') }}" title="{{ _('Logout') }}" role="menuitem">
<i class='fa fa-sign-out'></i>
<span class="text">{{ _('Logout') }}</span>
</a>
</li>
{% endblock %} {% endblock %}
</ul>
</a>
</li>
......@@ -96,7 +111,7 @@
<span class="text">{{ _('Login') }}</span>
</a>
</li>
{% endif %}
{% endif %} {% endblock %}
<li class="language-switch sign-language">
<a href="/gebaerdensprache" aria-label="{{ _('Sign language') }}" title="{{ _('Sign language') }}" class="navGebaerdensprache"></a>
</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment