Compare commits

..

2 Commits

Author SHA1 Message Date
a2b40910c2 Merge pull request 'angualar base' (#4) from doc/angular-base into main
All checks were successful
Build, Test & Publish / Build (push) Successful in 19s
Build, Test & Publish / Build and Publish Container Image (push) Successful in 45s
Build, Test & Publish / Deploy to Infrastructure (push) Successful in 58s
Reviewed-on: #4
2024-11-19 16:39:27 +11:00
19381030cb angualar base
All checks were successful
Build, Test & Publish / Build (pull_request) Successful in 22s
Build, Test & Publish / Build and Publish Container Image (pull_request) Has been skipped
Build, Test & Publish / Deploy to Infrastructure (pull_request) Has been skipped
2024-11-19 16:39:20 +11:00
4 changed files with 79 additions and 0 deletions

View File

@ -38,6 +38,14 @@ export default defineConfig({
{ text: 'Controller Testing', link: '/dotnet/controller-testing' },
]
},
{
text: 'Angular',
link: '/angular/',
collapsed: true,
items: [
{ text: 'Base Components', link: '/angular/base-components' },
]
},
{
text: 'Ansible',
link: '/ansible/',

View File

@ -0,0 +1,64 @@
# Base Components
This is a small collection of handy base angular components.
## Layout
::: code-group
```ts:line-numbers [vstack.component.ts]
import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
@Component({
selector: 'app-vstack',
standalone: true,
imports: [CommonModule],
template: `
<div class="vstack" [ngStyle]="{ gap: gap }">
<ng-content />
</div>
`,
styles: `
.vstack {
display: flex;
flex-direction: column;
}
`
})
export class VStackComponent {
@Input() gap: string = '5px';
}
```
:::
::: code-group
```ts:line-numbers [hstack.component.ts]
import { CommonModule } from '@angular/common';
import { Component, Input } from '@angular/core';
@Component({
selector: 'app-hstack',
standalone: true,
imports: [CommonModule],
template: `
<div class="hstack" [ngStyle]="{ gap: gap }">
<ng-content />
</div>
`,
styles: `
.hstack {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
`
})
export class HStackComponent {
@Input() gap: string = '5px';
}
```
:::

3
docs/angular/index.md Normal file
View File

@ -0,0 +1,3 @@
# Angular Snippets and Musings
#### [Base Components](./base-components.md)

View File

@ -10,6 +10,10 @@ hero:
text: .NET
link: /dotnet/
- theme: alt
text: Angular
link: /angular/
- theme: alt
text: Ansible
link: /ansible/