Skip to content

Commit

Permalink
refactor: add footer component
Browse files Browse the repository at this point in the history
  • Loading branch information
edbzn committed May 3, 2024
1 parent 9141f32 commit fc55654
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 45 deletions.
7 changes: 1 addition & 6 deletions rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module.exports = composePlugins(withNx(), withWeb(), (baseConfig, ctx) => {
},
// Component styles
{
test: /\.?(scss)$/,
test: /\.(sa|sc|c)ss$/,
resourceQuery: /\?ngResource/,
use: [
{
Expand All @@ -102,11 +102,6 @@ module.exports = composePlugins(withNx(), withWeb(), (baseConfig, ctx) => {
},
],
},
{
test: /\.?(css)$/,
resourceQuery: /\?ngResource/,
use: [],
},
{
// Mark files inside `rxjs/add` as containing side effects.
// If this is fixed upstream and the fixed version becomes the minimum
Expand Down
4 changes: 1 addition & 3 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ <h1>{{ title }}</h1>

</main>

<footer>
🧪 Experiment by <a href="https://twitter.com/edbzn">Edouard Bozon</a>
</footer>
<app-footer />
8 changes: 0 additions & 8 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ img {
margin: 0 8px;
}

footer {
margin-top: 2rem
}

a {
text-decoration: none;
}

section {
display: flex;
justify-content: center;
Expand Down
27 changes: 0 additions & 27 deletions src/app/app.component.spec.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Component } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FooterComponent } from './footer.component';

@Component({
standalone: true,
imports: [RouterModule],
imports: [RouterModule, FooterComponent],
selector: 'app-root',
templateUrl: './app.component.html',
styleUrl: './app.component.scss',
Expand Down
8 changes: 8 additions & 0 deletions src/app/footer.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:host {
display: block;
margin-top: 2rem
}

a {
text-decoration: none;
}
13 changes: 13 additions & 0 deletions src/app/footer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Component } from '@angular/core';

@Component({
selector: 'app-footer',
standalone: true,
template: `
<footer>
🧪 Experiment by <a href="https://twitter.com/edbzn">Edouard Bozon</a>
</footer>
`,
styleUrl: './footer.component.scss',
})
export class FooterComponent {}

0 comments on commit fc55654

Please sign in to comment.