Skip to content

Commit 5cb5fdc

Browse files
committed
better footnote styles
1 parent de04a53 commit 5cb5fdc

File tree

4 files changed

+49
-26
lines changed

4 files changed

+49
-26
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.footer {
2+
position: fixed;
3+
left: 0;
4+
bottom: 0;
5+
width: 100%;
6+
height: 25px;
7+
margin: 0px;
8+
font-size: 11px;
9+
background-color: white;
10+
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<div class="ms-3">
2-
<small style="font-size: 10px;">
3-
Build-version: {{version}}&nbsp;&nbsp;&nbsp;Build-timestamp: {{timestamp}}&nbsp;&nbsp;&nbsp;Customer: {{customer}}
4-
</small>
5-
</div>
1+
<div class="ps-3 footer">
2+
&copy; {{currentYear}} &sdot; {{companyName}} &sdot; Build-version: {{version}} &sdot; Build-timestamp: {{timestamp}} &sdot; Customer: {{customer}}
3+
</div>
Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1-
import {Component} from '@angular/core';
1+
import {Component, OnInit} from '@angular/core';
22
import {Meta} from '@angular/platform-browser';
33

44
@Component({
55
selector: 'footnote',
66
standalone: true,
77
providers: [],
88
imports: [],
9-
templateUrl: './footnote.component.html'
9+
templateUrl: './footnote.component.html',
10+
styleUrl: './footnote.component.css'
1011
})
11-
export class FootnoteComponent {
12-
13-
version: string | undefined;
14-
timestamp: string | undefined;
15-
customer: string | undefined;
16-
17-
constructor(private meta: Meta) {
18-
this.version = this.meta.getTag('name=version')?.content;
19-
this.version = this.version === '@project.version@' ? 'DEV-SERVER' : this.version;
20-
this.timestamp = this.meta.getTag('name=timestamp')?.content;
21-
this.timestamp = this.timestamp === '@timestamp@' ? '-' : this.timestamp;
22-
this.customer = this.meta.getTag('name=customer')?.content;
23-
this.customer = this.customer === '@customer@' ? '-' : this.customer;
12+
export class FootnoteComponent implements OnInit {
13+
private static hasLogged = false;
14+
15+
version: string | undefined;
16+
timestamp: string | undefined;
17+
customer: string | undefined;
18+
currentYear = new Date().getFullYear();
19+
companyName = 'hofi.org'
20+
21+
constructor(private meta: Meta) {
22+
}
23+
24+
ngOnInit(): void {
25+
this.version = this.meta.getTag('name=version')?.content;
26+
this.version = this.version === '@project.version@' ? 'DEV-SERVER' : this.version;
27+
this.timestamp = this.meta.getTag('name=timestamp')?.content;
28+
this.timestamp = this.timestamp === '@timestamp@' ? 'DEV-SERVER' : this.timestamp;
29+
this.customer = this.meta.getTag('name=customer')?.content;
30+
this.customer = this.customer === '@customer@' ? 'DEV-SERVER' : this.customer;
31+
32+
if (!FootnoteComponent.hasLogged && this.version !== undefined) {
33+
console.info(
34+
${this.currentYear}${this.companyName} ⋅ Build-version: ${this.version} ⋅ Build-timestamp: ${this.timestamp} ⋅ Customer: ${this.customer}`
35+
);
36+
FootnoteComponent.hasLogged = true; // Set the flag to true after logging
2437
}
38+
}
2539
}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<div class="view">
22
<div class="header"></div>
3-
<div class="container-fluid">
4-
<h1 class="title">Demo Details</h1>
5-
<div class="title-underline mb-2"></div>
3+
<div class="container-fluid">
4+
<h1 class="title">Demo Details</h1>
5+
<div class="title-underline mb-2"></div>
66

7-
<div class="col-2 mt-5">
8-
<button mat-flat-button (click)="back()">Zurück</button>
9-
</div>
7+
<div class="col-2 mt-5">
8+
<button mat-flat-button (click)="back()">Zurück</button>
109
</div>
10+
</div>
11+
<footnote></footnote>
1112
</div>

0 commit comments

Comments
 (0)