Skip to content

Commit

Permalink
Setup layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Niclas Timle authored and Niclas Timle committed Sep 23, 2024
1 parent ed703e6 commit 129521b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 22 deletions.
5 changes: 5 additions & 0 deletions src/Components/BasicComponent/basic.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.flex-fill{
border:5px solid white;
height: 300px;
background-color: lightgray;
}
10 changes: 10 additions & 0 deletions src/Components/BasicComponent/basic.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div class="d-flex text-center">
<div class="p-2 flex-fill">Flex item 1</div>
<div class="p-2 flex-fill">Flex item 2</div>
<div class="p-2 flex-fill">Flex item 3</div>
</div>
<div class="d-flex text-center">
<div class="p-2 flex-fill">Flex item 1</div>
<div class="p-2 flex-fill">Flex item 2</div>
<div class="p-2 flex-fill">Flex item 3</div>
</div>
11 changes: 11 additions & 0 deletions src/Components/BasicComponent/basic.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Component } from '@angular/core';

@Component({
selector: 'basic-component',
standalone: true,
templateUrl: './basic.component.html',
styleUrl: './basic.component.css',
})
export class BasicComponent{

}
14 changes: 3 additions & 11 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
<div class="container">
<div class="row">
<div class="col-2"><h1>hellow</h1></div>
<div class="col-8" style="border:2px solid red;">
<h1>Hello World</h1>
<i class="bi bi-tsunami"></i>
</div>
<div class="col-2"></div>
</div>
</div>
<router-outlet />
<div class="container-fluid p-2">
<basic-component></basic-component>
</div>
6 changes: 3 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { BasicComponent } from '../Components/BasicComponent/basic.component';

@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
styleUrl: './app.component.css',
imports: [BasicComponent],
})
export class AppComponent {
title = 'Gridly';
Expand Down
6 changes: 1 addition & 5 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';

import { routes } from './app.routes';
import { provideClientHydration } from '@angular/platform-browser';

export const appConfig: ApplicationConfig = {
providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideClientHydration()]
providers: [provideZoneChangeDetection({ eventCoalescing: true })]
};
3 changes: 0 additions & 3 deletions src/app/app.routes.ts

This file was deleted.

0 comments on commit 129521b

Please sign in to comment.