feat: add simplet layout for pages
This commit is contained in:
4
src/app/components/simple-layout/simple-layout.html
Normal file
4
src/app/components/simple-layout/simple-layout.html
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<div class="content">
|
||||||
|
<h1>{{title()|translate|titlecase}}</h1>
|
||||||
|
<ng-content></ng-content>
|
||||||
|
</div>
|
||||||
3
src/app/components/simple-layout/simple-layout.scss
Normal file
3
src/app/components/simple-layout/simple-layout.scss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.content {
|
||||||
|
padding: 0px 16px;
|
||||||
|
}
|
||||||
25
src/app/components/simple-layout/simple-layout.spec.ts
Normal file
25
src/app/components/simple-layout/simple-layout.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { SimpleLayout } from './simple-layout';
|
||||||
|
import { provideTranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
describe('SimpleLayout', () => {
|
||||||
|
let component: SimpleLayout;
|
||||||
|
let fixture: ComponentFixture<SimpleLayout>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [SimpleLayout],
|
||||||
|
providers: [provideTranslateService({})],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(SimpleLayout);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
await fixture.whenStable();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
13
src/app/components/simple-layout/simple-layout.ts
Normal file
13
src/app/components/simple-layout/simple-layout.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import { TitleCasePipe } from '@angular/common';
|
||||||
|
import { Component, input } from '@angular/core';
|
||||||
|
import { TranslatePipe } from '@ngx-translate/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-simple-layout',
|
||||||
|
imports: [TranslatePipe, TitleCasePipe],
|
||||||
|
templateUrl: './simple-layout.html',
|
||||||
|
styleUrl: './simple-layout.scss',
|
||||||
|
})
|
||||||
|
export class SimpleLayout {
|
||||||
|
readonly title = input('');
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user