Skip to content

Commit 84d80ce

Browse files
committed
Add a help message footer with configurable contactEmail
1 parent 4ebdd78 commit 84d80ce

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

src/app/app-config.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export class AppConfig {
77
production = true;
88
statusMessage = "";
99
statusCode: "INFO" | "WARN" | "NONE" = "NONE";
10+
contactEmail = "";
1011
}
1112

1213
export const APP_DI_CONFIG: AppConfig = {
@@ -15,6 +16,7 @@ export const APP_DI_CONFIG: AppConfig = {
1516
statusCode: (["INFO", "WARN", "NONE"].includes(environment["statusCode"])
1617
? environment["statusCode"]
1718
: "NONE") as "INFO" | "WARN" | "NONE",
19+
contactEmail: environment["contactEmail"] || "",
1820
};
1921

2022
@NgModule({

src/app/app.component.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212

1313
<router-outlet></router-outlet>
1414

15-
<mat-toolbar class="footer" *ngIf="config.showLogoBanner">
16-
<img src="../assets/{{ config.logoBanner }}" width="{{ config.logoWidth }}" alt="logo_banner" />
17-
</mat-toolbar>
15+
<footer class="footer" *ngIf="appConfig.contactEmail">
16+
<mat-toolbar class="logo-banner" *ngIf="config.showLogoBanner">
17+
<img src="../assets/{{ config.logoBanner }}" width="{{ config.logoWidth }}" alt="logo_banner" />
18+
</mat-toolbar>
19+
20+
<address>
21+
If you have any questions or need help, please contact <a href="mailto:{{ appConfig.contactEmail }}">{{
22+
appConfig.contactEmail }}</a>.
23+
</address>
24+
</footer>

src/app/app.component.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/* AppComponent's private CSS styles */
2+
:host {
3+
display: flex;
4+
flex-direction: column;
5+
min-height: 100vh;
6+
}
27

38
.header {
49
position: sticky;
@@ -7,11 +12,21 @@
712
}
813

914
.footer {
15+
margin-top: auto;
16+
}
17+
18+
.logo-banner {
1019
height: 77px;
1120
justify-content: center;
1221
background-color: var(--theme-primary-default-contrast);
1322
}
1423

24+
address {
25+
font-size: 16px;
26+
padding: 0.5em;
27+
background-color: whitesmoke;
28+
}
29+
1530
.spacer {
1631
flex: 1 1 auto;
1732
text-align: left;

0 commit comments

Comments
 (0)