Skip to content

Commit 09c6a4f

Browse files
authored
Merge pull request #4513 from crazyserver/MOBILE-4842
MOBILE-4842 module: Improve course module border on last child
2 parents 2a385f3 + 2e53adb commit 09c6a4f

File tree

5 files changed

+11
-16
lines changed

5 files changed

+11
-16
lines changed

src/addons/block/sitemainmenu/components/sitemainmenu/addon-block-sitemainmenu.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ <h2>{{ 'addon.block_sitemainmenu.pluginname' | translate }}</h2>
1515
</ion-item>
1616
}
1717

18-
<ng-container *ngFor="let modOrSubsection of mainMenuBlock.contents">
18+
@for (modOrSubsection of mainMenuBlock.contents; track modOrSubsection.id) {
1919
@if (isModule(modOrSubsection)) {
2020
<core-course-module [module]="modOrSubsection" [section]="mainMenuBlock" />
2121
}
22-
</ng-container>
22+
}
2323
</ion-list>
2424
}
2525
</core-loading>

src/core/features/course/components/course-section/course-section.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
--card-padding-bottom: 0px;
3737
}
3838

39-
core-course-module:last-child {
40-
--activity-border: 0px;
41-
--card-padding-bottom: 0px;
42-
}
43-
4439
core-course-module:first-child ::ng-deep ion-card {
4540
margin-top: 0px;
4641
}

src/core/features/course/components/module/module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
--activity-border: 1px solid var(--stroke);
1111
--card-padding-bottom: var(--vertical-spacing);
1212

13+
&:last-child {
14+
--activity-border: 0px;
15+
--card-padding-bottom: 0px;
16+
}
17+
1318
ion-card {
1419
margin: var(--vertical-spacing) var(--horizontal-spacing);
1520
padding: 0px;

src/core/features/course/pages/list-mod-type/list-mod-type.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ import { CoreCourseModuleHelper } from '@features/course/services/course-module-
3333
@Component({
3434
selector: 'page-core-course-list-mod-type',
3535
templateUrl: 'list-mod-type.html',
36-
styles: `core-course-module:last-child {
37-
--activity-border: 0px;
38-
--card-padding-bottom: 0px;
39-
}`,
4036
imports: [
4137
CoreSharedModule,
4238
CoreCourseModuleComponent,

src/core/features/sitehome/pages/index/index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ <h2 class="big" [id]="'core-section-name-' + section.id">
5959
</ion-item>
6060
}
6161

62-
<ng-container *ngFor="let modOrSubsection of section.contents">
62+
@for (modOrSubsection of section.contents; track modOrSubsection.id) {
6363
@if (isModule(modOrSubsection)) {
6464
<core-course-module [module]="modOrSubsection" [section]="section" />
6565
}
66-
</ng-container>
66+
}
6767
</section>
6868
}
6969

7070
<!-- Site home items: news, categories, courses, etc. -->
7171
@if (items.length > 0) {
7272

73-
<ng-container *ngFor="let item of items">
73+
@for (item of items; track item) {
7474
@switch (item) {
7575
@case ('LIST_OF_COURSE') {
7676
<ng-template *ngTemplateOutlet="allCourseList" />
@@ -88,8 +88,7 @@ <h2 class="big" [id]="'core-section-name-' + section.id">
8888
<ng-template *ngTemplateOutlet="news" />
8989
}
9090
}
91-
</ng-container>
92-
91+
}
9392
}
9493
</ion-list>
9594
@if (hasBlocks) {

0 commit comments

Comments
 (0)