Skip to content
Snippets Groups Projects
Commit b57422a8 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

recolor icons via css, fixes #2629

Closes #2629

Merge request studip/studip!1780
parent 14bba287
No related branches found
No related tags found
No related merge requests found
......@@ -230,14 +230,12 @@ class ResponsiveHelper
}
$avatar = $avatarClass::getAvatar($course->id);
if ($avatar->is_customized()) {
$icon = $avatar->getURL(Avatar::SMALL);
} else {
$icon = $standardIcon;
}
$hasAvatar = $avatar->is_customized();
$icon = $hasAvatar ? $avatar->getURL(Avatar::SMALL) : $standardIcon;
$cnav = [
'icon' => $icon,
'avatar' => $hasAvatar,
'title' => $course->getFullname(),
'url' => URLHelper::getURL($url, ['cid' => $course->id]),
'parent' => 'browse/my_courses',
......
......@@ -242,8 +242,11 @@ $sidebarOut: -330px;
img,
svg {
vertical-align: text-bottom;
&:not(.avatar) {
filter: contrast(0) brightness(2);
}
margin-right: 10px;
vertical-align: text-bottom;
}
}
......
......@@ -10,7 +10,7 @@
>
<span class="navigation-icon">
<studip-icon v-if="isCourse" shape="seminar" role="info_alt" :size="24" alt=""></studip-icon>
<img v-if="item.icon" :src="iconUrl" width="24" alt="" />
<img v-if="item.icon" :src="iconUrl" width="24" alt="" :class="{avatar: item.avatar}"/>
</span>
<span class="navigation-text">
{{ item.title }}
......@@ -36,7 +36,7 @@
:aria-label="navigateToText(item.title)"
>
<studip-icon v-if="isCourse" shape="seminar" role="info_alt" :size="24" alt=""></studip-icon>
<img v-if="item.icon" :src="iconUrl" width="24" alt="" />
<img v-if="item.icon" :src="iconUrl" width="24" alt="" :class="{avatar: item.avatar}"/>
{{ item.title }}
</a>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment