Forked from
Stud.IP / Stud.IP
2020 commits behind the upstream repository.
-
Closes #1474 Merge request studip/studip!2044
Closes #1474 Merge request studip/studip!2044
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
sidebar.scss 8.16 KiB
#sidebar {
background: $white;
border-left: 0;
display: inline-block;
height: max-content;
margin-bottom: $page-margin + 35px;
margin-top: 15px;
padding: 0 5px 7px 15px;
position: sticky;
text-align: left;
top: 50px;
width: $sidebar-width;
z-index: 2;
.sidebar-image {
width: calc($sidebar-width - 2px);
height: 60px;
max-height: 60px;
background-image: url("#{$image-path}/sidebar/noicon-sidebar.png");
background-size: cover;
position: relative;
&-with-context {
margin-bottom: 0px;
}
display: flex;
align-items: flex-end;
}
.sidebar-context {
flex: 0;
background-color: rgba(255, 255, 255, 1);
border: 0px solid $base-color-20;
padding: 0px;
max-height: 60px;
}
.sidebar-title {
flex: 1;
box-sizing: border-box;
max-height: 60px;
padding: 12px 15px 0;
border-bottom: 12px solid transparent;
color: $white;
font-size: 1.2em;
overflow: hidden;
word-break: break-word;
position: relative;
line-height: 1.1;
text-align: left;
text-overflow: ellipsis;
/* it may happen that some browser does not support the following, then (...) won't appear */
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.sidebar-widget.sidebar-widget-has-extra {
display: grid;
grid-template-areas: "swh swx" "swc swc";
grid-template-rows: auto;
grid-template-columns: 1fr min-content;
.sidebar-widget-header {
grid-area: swh;
}
.sidebar-widget-extra {
grid-area: swx;
}
.sidebar-widget-content {
grid-area: swc;
}
}
.course-avatar-medium,
.stream-avatar-medium,
.avatar-medium {
max-width: 60px;
height: 60px;
}
.sidebar-widget,
.sidebar-widget-placeholder {
background: $white;
border: 1px solid $content-color-40;
margin: 15px 0 0;
width: $sidebar-width - 5px;
}
.sidebar-widget-header,
.sidebar-widget-extra {
background: $content-color-20;
color: $base-color;
font-weight: bold;
padding: 4px;
}
// Links inside the sidebar
a.link-intern {
@include icon(before, link-intern, clickable, 16px, 2px);
}
a.link-extern {
@include icon(before, link-extern, clickable, 16px, 2px);
}
// Prevent selects from growing too large
select {
max-width: 100%;
}
}
ul.widget-list {
list-style: none;
margin: 0;
padding: 0;
> li {
background-repeat: no-repeat;
background-position: 0 1px;
background-size: 16px 16px;
padding-left: 20px;
word-wrap: break-word;
}
button {
text-align: left;
width: 100%;
}
}
div#sidebar-navigation {
div.sidebar-widget-header {
display: none;
}
div.sidebar-widget-content {
border-top: 0px;
}
}
.widget-links {
margin: 5px;
> li img {
vertical-align: text-top;
}
a {
display: block;
}
.widget-content a:only-child {
box-sizing: border-box;
line-height: 16px;
}
span[disabled],
a[disabled] {
color: $dark-gray-color-80;
cursor: not-allowed;
font-weight: lighter;
}
&.sidebar-navigation > li.active {
background-color: $base-color;
margin-left: -4px;
//#arrow > .right-border(14px, $content-color-20, 1px, $content-color-40, -5px);
@include arrow-right-border(14px, $base-color, 1px, $base-color, -5px);
a {
color: $white;
padding-left: 4px;
}
}
&.sidebar-views > li.active {
background: $activity-color-40;
margin-left: -5px;
box-shadow: inset 0 0 0 1px $activity-color;
@include arrow-right-border(14px, $activity-color-40, 1px, $activity-color, -5px);
a, button {
color: $base-color;
padding-left: 5px;
}
}
&.sidebar-navigation > li,
&.sidebar-views > li {
padding-left: 5px;
&.active {
line-height: 2em;
&:before, &:after {
margin-left: -1px;
}
display: block;
// Obtuse angle looks kinda ugly with borders
&:before {
border-left-width: floor(calc(14px * 2 / 3));
}
&:after {
border-left-width: floor(calc(14px * 2 / 3 - 1px));
}
}
}
}
.sidebar-widget-cloud {
margin: 0px;
padding: 0px;
max-width: 100%;
overflow: hidden;
> li { display: inline-block; }
a.weigh-1 { font-size: 0.7em; }
a.weigh-2 { font-size: 0.8em; }
a.weigh-3 { font-size: 0.9em; }
a.weigh-4 { font-size: 1.0em; }
a.weigh-5 { font-size: 1.1em; }
a.weigh-6 { font-size: 1.3em; }
a.weigh-7 { font-size: 1.5em; }
a.weigh-8 { font-size: 1.7em; }
a.weigh-9 { font-size: 1.9em; }
a.weigh-10 { font-size: 2.1em; }
}
.sidebar-widget {
background: $white;
.widget-options {
list-style: none;
margin: 0;
padding: 0;
> li {
line-height: 1.5em;
margin-left: 0;
padding-left: 0;
}
.options-checkbox {
background-repeat: no-repeat;
background-position: left 2px;
display: block;
padding-left: 20px;
&.options-checked {
@include background-icon(checkbox-checked);
}
&.options-unchecked {
@include background-icon(checkbox-unchecked);
}
}
.options-radio {
background-repeat: no-repeat;
background-position: left 2px;
display: block;
padding-left: 20px;
&.options-checked {
@include background-icon(radiobutton-checked);
}
&.options-unchecked {
@include background-icon(radiobutton-unchecked);
}
}
}
}
.sidebar-widget-content {
border-top: 1px solid $content-color-40;
overflow-wrap: break-word;
padding: 4px;
transition: all 0.5s;
}
// TODO: These two should be combined into one widget
select.sidebar-selectlist {
overflow-y: auto;
width: 100%;
}
.selector-widget select {
cursor: pointer;
padding: 0;
option {
padding: 0 0.5em;
}
}
.sidebar-search {
.needles {
list-style: none;
margin: 0;
padding: 0;
li {
display: flex;
margin-bottom: 0.5em;
&:last-child {
margin-bottom: 0;
}
.input-group {
margin-bottom: 0;
margin-top: 0;
input[type=text] {
box-sizing: border-box;
border: 1px solid $dark-gray-color-30;
border-right: none;
flex: 1;
padding: .25em .5em;
width: 100%;
}
.submit-search {
background-color: $content-color-20;
border: 1px solid $dark-gray-color-30;
border-left-color: $light-gray-color-40;
border-radius: 0;
color: transparent;
cursor: pointer;
font: 0/0 a;
text-shadow: none;
}
.reset-search {
background-color: transparent;
border: 1px solid var(--dark-gray-color-30);
border-left: 0;
border-right: 0;
display: inline-block;
padding-right: 5px;
padding-top: 4px;
cursor: pointer;
}
}
}
}
ul.filters {
list-style: none;
margin: 0;
padding: 0;
li {
display: inline-block;
}
}
}