Skip to content

Commit

Permalink
Development: Move rotate icon css to global style (#8646)
Browse files Browse the repository at this point in the history
  • Loading branch information
rstief authored May 22, 2024
1 parent ee5274e commit d29a52b
Show file tree
Hide file tree
Showing 15 changed files with 21 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h2 jhiTranslate="artemisApp.standardizedCompetency.manage.import.title"></h2>
<div class="card mt-3">
<div class="card-header d-flex align-items-center mw-100 clickable" (click)="toggleCollapse()">
<div class="icon-container me-2">
<div class="me-2">
<fa-icon [icon]="faChevronRight" class="rotate-icon chevron-position" [class.rotated]="!isCollapsed" />
</div>
<h5 class="mb-0" jhiTranslate="artemisApp.standardizedCompetency.manage.import.format.title"></h5>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ interface ImportCount {
@Component({
selector: 'jhi-admin-import-standardized-competencies',
templateUrl: './admin-import-standardized-competencies.component.html',
styleUrls: ['admin-import-standardized-competencies.component.scss'],
})
export class AdminImportStandardizedCompetenciesComponent {
protected isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="card form-group" [formGroup]="form">
<div class="card-header">
<div class="d-flex align-items-center mw-100 clickable" (click)="toggle()">
<div class="icon-container me-3">
<div class="me-3">
<fa-icon [icon]="faChevronRight" class="rotate-icon chevron-position" [class.rotated]="!isCollapsed" />
</div>
<h6 class="mb-0 text-nowrap text-truncate overflow-hidden">{{ titleControl.value ?? '' }}</h6>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
.chevron-position {
display: inline-block;
vertical-align: middle;
}

.rotate-icon {
transition: transform 0.3s ease;
}

.rotate-icon.rotated {
transform: rotate(90deg);
}

.card {
background-color: var(--overview-light-background-color);
margin-bottom: 0.5rem;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ import { faAngleRight } from '@fortawesome/free-solid-svg-icons';
@Component({
selector: 'jhi-collapsible-card',
templateUrl: './collapsible-card.component.html',
styleUrls: [
'../../../course/manage/course-exercise-card.component.scss',
'../../../exercises/quiz/shared/quiz.scss',
'exam-result-summary.component.scss',
'collapsible-card.component.scss',
],
styleUrls: ['../../../course/manage/course-exercise-card.component.scss', '../../../exercises/quiz/shared/quiz.scss', 'exam-result-summary.component.scss'],
})
export class CollapsibleCardComponent {
@Input() isCardContentCollapsed: boolean;
Expand Down
13 changes: 0 additions & 13 deletions src/main/webapp/app/overview/course-overview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,6 @@ Course Info Bar
}
}

.chevron-position {
display: inline-block;
vertical-align: middle;
}

.rotate-icon {
transition: transform 0.3s ease;
}

.rotated {
transform: rotate(90deg);
}

.icon-container {
display: inline-block;
vertical-align: middle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ $discussion-section-card-min-width: 360px;
align-items: center;
background-color: var(--artemis-dark);
cursor: pointer;
border-radius: 1em 1em 0 0;

.card-title {
display: flex;
Expand Down
4 changes: 0 additions & 4 deletions src/main/webapp/app/overview/header-course.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
}
}

.rotate-icon {
transition: transform 0.3s ease;
}

.rotate180 {
transform: rotate(180deg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ 'artemisApp.courseOverview.sidebar.' + groupKey | artemisTranslate | titlecase }}
({{ (groupedData[groupKey].entityData | searchFilter: ['title', 'type'] : searchValue)?.length }})
</div>
<div class="icon-container pe-3">
<div class="pe-3">
<fa-icon [icon]="faChevronRight" class="rotate-icon chevron-position" [class.rotated]="!collapseState[groupKey]" />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
.rotate-icon {
display: inline-block;
transition: transform 0.3s ease;
}

.rotate-icon.rotated {
transform: rotate(90deg);
}

.bg-module {
background-color: var(--module-bg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<mat-nested-tree-node *matTreeNodeDef="let knowledgeArea" [class.d-none]="!knowledgeArea.isVisible">
<div class="card tree-card">
<div class="d-flex align-items-center clickable me-2" matTreeNodeToggle>
<div class="icon-container me-2">
<div class="me-2">
<fa-icon [icon]="faChevronRight" class="rotate-icon chevron-position" [class.rotated]="treeControl.isExpanded(knowledgeArea)" />
</div>
<h5 class="mb-0">{{ knowledgeArea.title }}</h5>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
.chevron-position {
display: inline-block;
vertical-align: middle;
}

.rotate-icon {
transition: transform 0.3s ease;
}

.rotate-icon.rotated {
transform: rotate(90deg);
}

.tree-indent {
padding-left: 3rem;
}
Expand Down
15 changes: 15 additions & 0 deletions src/main/webapp/content/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,21 @@ a:hover {
cursor: pointer;
}

/* Styles for rotating chevron icons */

.rotate-icon {
transition: transform 0.3s ease;
}

.rotated {
transform: rotate(90deg);
}

.chevron-position {
display: inline-block;
vertical-align: middle;
}

/* ==========================================================================
entity tables helpers
========================================================================== */
Expand Down

0 comments on commit d29a52b

Please sign in to comment.