Skip to content
Snippets Groups Projects
Commit 4a9fe00d authored by jojohoch's avatar jojohoch
Browse files

[player] Rework the appearance of `sections`

* Use all style attributes of the unit definition to display
sections
* Remove unnecessary div tag from `SectionComponent`
parent 16fd1970
No related branches found
No related tags found
No related merge requests found
...@@ -7,10 +7,11 @@ import { UnitPage } from '../../../common/unit'; ...@@ -7,10 +7,11 @@ import { UnitPage } from '../../../common/unit';
<app-section *ngFor="let section of page.sections; let i = index" <app-section *ngFor="let section of page.sections; let i = index"
[section]="section" [section]="section"
[ngStyle]="{ [ngStyle]="{
width: '100%',
position: 'relative', position: 'relative',
display: 'inline-block', display: 'inline-block',
'height.px': section.height }"> 'background-color': section.backgroundColor,
'height.px': section.height,
'width.px': section.width }">
{{section.height}} {{section.height}}
</app-section> </app-section>
` `
......
...@@ -7,13 +7,8 @@ import * as ComponentUtils from '../../../common/component-utils'; ...@@ -7,13 +7,8 @@ import * as ComponentUtils from '../../../common/component-utils';
@Component({ @Component({
selector: 'app-section', selector: 'app-section',
template: ` template: `
<div fxLayout="column"> <ng-template #elementContainer></ng-template>
<ng-template #elementContainer></ng-template> `
</div>
`,
styles: [
'div {position: absolute}'
]
}) })
export class SectionComponent implements OnInit { export class SectionComponent implements OnInit {
@Input() section!: UnitPageSection; @Input() section!: UnitPageSection;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment