Skip to content

Commit e023333

Browse files
authored
Merge pull request #2882 from WISE-Community/issue-2876-move-alert-status-corner-styles-to-component
Moved AlertStatusCorner styles to component
2 parents b609a95 + 2b934b9 commit e023333

11 files changed

Lines changed: 57 additions & 90 deletions

File tree

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<div *ngIf="hasAlert" class="status-corner-wrapper status-corner-top-right">
2-
<div class="status-corner"
3-
[ngClass]="{'status-corner--warn': hasNewAlert}"
4-
matTooltip="{{message}}"
5-
matTooltipPosition="above"></div>
1+
<div *ngIf="hasAlert" class="corner">
2+
<div class="corner-content" [ngClass]="{'corner-warn': hasNewAlert}" matTooltip="{{message}}"
3+
matTooltipPosition="above"></div>
64
</div>

src/main/webapp/site/src/app/classroom-monitor/alert-status-corner/alert-status-corner.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Component, Input } from '@angular/core';
22

33
@Component({
44
selector: 'alert-status-corner',
5-
templateUrl: 'alert-status-corner.component.html'
5+
templateUrl: 'alert-status-corner.component.html',
6+
styleUrls: ['alert-status-corner.scss']
67
})
78
export class AlertStatusCornerComponent {
89
@Input()
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@import '~style/abstracts/variables', '~style/themes/default';
2+
3+
$warn: map-get($default-colors, warn);
4+
$secondary-text: map-get($default-colors, secondary-text);
5+
6+
.corner {
7+
border-top-right-radius: $card-border-radius;
8+
overflow: hidden;
9+
}
10+
11+
.corner-content {
12+
width: 0;
13+
height: 0;
14+
border-top-color: $secondary-text;
15+
border-bottom-color: $secondary-text;
16+
color: $secondary-text;
17+
18+
border-top: 36px solid;
19+
border-left: 36px solid transparent;
20+
21+
&:after {
22+
content: '!';
23+
color: #ffffff;
24+
top: 2px;
25+
right: 10px;
26+
position: absolute;
27+
font-weight: 700;
28+
}
29+
}
30+
31+
.corner-warn {
32+
border-top-color: $warn;
33+
border-bottom-color: $warn;
34+
}

src/main/webapp/wise5/themes/default/style/author.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/wise5/themes/default/style/author.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/wise5/themes/default/style/modules/_alerts.scss

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -13,78 +13,6 @@
1313
padding: 0;
1414
}
1515

16-
.status-corner-wrapper {
17-
position: absolute;
18-
z-index: 1;
19-
overflow: hidden;
20-
}
21-
22-
.status-corner {
23-
width: 0;
24-
height: 0;
25-
border-top-color: color('text-disabled');
26-
border-bottom-color: color('text-disabled');
27-
color: color('text-disabled');
28-
29-
&:after {
30-
content: '!';
31-
color: #ffffff;
32-
top: 2px;
33-
right: 10px;
34-
position: absolute;
35-
font-weight: 700;
36-
}
37-
}
38-
39-
.status-corner--warn {
40-
border-top-color: color('warn') !important;
41-
border-bottom-color: color('warn') !important;
42-
}
43-
44-
.status-corner-top-right {
45-
top: 0;
46-
right: 0;
47-
border-top-right-radius: $card-border-radius;
48-
49-
.status-corner {
50-
border-top: 36px solid;
51-
border-left: 36px solid transparent;
52-
}
53-
}
54-
55-
.status-corner-top-left {
56-
top: 0;
57-
left: 0;
58-
border-top-left-radius: $card-border-radius;
59-
60-
.status-corner {
61-
border-top: 36px solid;
62-
border-right: 36px solid transparent;
63-
}
64-
}
65-
66-
.status-corner-bottom-right {
67-
bottom: 0;
68-
right: 0;
69-
border-bottom-right-radius: $card-border-radius;
70-
71-
.status-corner {
72-
border-bottom: 36px solid;
73-
border-left: 36px solid transparent;
74-
}
75-
}
76-
77-
.status-corner-bottom-left {
78-
bottom: 0;
79-
left: 0;
80-
border-bottom-left-radius: $card-border-radius;
81-
82-
.status-corner {
83-
border-bottom: 36px solid;
84-
border-right: 36px solid transparent;
85-
}
86-
}
87-
8816
.avatar--icon--alert {
8917
background-color: #ffffff;
9018
}
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
.student-select {
2-
padding-top: 0;
3-
padding-bottom: 0;
2+
padding-top: 0;
3+
padding-bottom: 0;
44
}
55

66
.workgroup-progress {
7-
margin-bottom: 8px;
7+
margin-bottom: 8px;
88

9-
@media (min-width: $layout-breakpoint-sm) {
10-
margin-bottom: 0;
11-
}
9+
@media (min-width: $layout-breakpoint-sm) {
10+
margin-bottom: 0;
11+
}
12+
}
13+
14+
alert-status-corner {
15+
position: absolute;
16+
top: 0;
17+
right: 0;
1218
}

src/main/webapp/wise5/themes/default/style/monitor.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/wise5/themes/default/style/monitor.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/wise5/themes/default/style/vle.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)