Skip to content

Commit bc07ca5

Browse files
committed
Fixed footer link layout.
1 parent 32ffb8c commit bc07ca5

4 files changed

Lines changed: 79 additions & 38 deletions

File tree

angular/src/app/frame/footbar/footbar.component.css

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,3 +403,60 @@ display: block;
403403
.x-icon:hover {
404404
background-color: lightgray;
405405
}
406+
407+
.footerlinks {
408+
width: 100%;
409+
padding: 16px 20px;
410+
color: white;
411+
background: #000;
412+
box-sizing: border-box;
413+
}
414+
415+
.footerlinks-content {
416+
display: grid;
417+
grid-template-columns: 1fr auto 1fr;
418+
align-items: center;
419+
}
420+
421+
/* LINKS */
422+
.footerlinks {
423+
grid-column: 2;
424+
max-width: calc(100% - 108px);
425+
margin: 0 auto;
426+
text-align: center;
427+
line-height: 1.8;
428+
429+
display: flex;
430+
flex-wrap: wrap;
431+
justify-content: center;
432+
433+
/* critical: prevent overlap with logo */
434+
padding-right: 20px;
435+
}
436+
437+
/* Links */
438+
.footerlinks a {
439+
text-decoration: none;
440+
/* color: #333; */
441+
margin: 0 6px;
442+
white-space: nowrap;
443+
}
444+
445+
.separator {
446+
margin: 0 4px;
447+
color: #999;
448+
}
449+
450+
/* LOGO */
451+
.ctslogo {
452+
grid-column: 3;
453+
justify-self: end;
454+
}
455+
456+
/* Dynamic logo sizing */
457+
.ctslogo img {
458+
max-width: 108px;
459+
max-height: 108px;
460+
width: auto;
461+
height: auto;
462+
}

angular/src/app/frame/footbar/footbar.component.html

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,28 @@
2929
title="National Institute of Standards and Technology">
3030
</a>
3131
</div>
32+
</div>
3233

33-
<div class="footer-links-and-seal">
34-
<div class="footer-links">
35-
<!-- Footer links line #1 -->
36-
<div id="block-menu-menu-footer-menu" *ngIf="footerLinks01"
37-
class="block menu--footer-menu first even block--menu block--menu-menu-footer-menu" role="navigation">
38-
<ul class="menu">
39-
<li *ngFor="let link of footerLinks01; let i = index" [ngClass]="getLinkClass(i, footerLinks01)">
40-
<a [href]="link.url" target="_blank" rel="noopener" class="menu__link">{{link.title}} </a>
41-
</li>
42-
</ul>
43-
</div>
44-
45-
<!-- Footer links line #2 -->
46-
<div id="block-menu-menu-footer-menu-3" *ngIf="footerLinks02"
47-
class="block menu--footer-menu last even block--menu block--menu-menu-footer-menu-3" role="navigation">
48-
<ul class="menu">
49-
<li *ngFor="let link of footerLinks02; let i = index" [ngClass]="getLinkClass(i, footerLinks02)">
50-
<a [href]="link.url" target="_blank" rel="noopener" class="menu__link">{{link.title}} </a>
51-
</li>
52-
</ul>
53-
</div>
34+
<div class="footerlinks">
35+
<div class="footerlinks-content">
36+
<div class="footerlinks">
37+
<span *ngFor="let link of footerLinks01; let i = index">
38+
<a [href]="link.url">{{ link.title }}</a>
39+
<span *ngIf="i < footerLinks01.length - 1" class="separator">|</span>
40+
</span>
5441
</div>
55-
<div class="core-trust-seal">
56-
<a
57-
href="https://www.coretrustseal.org/"
58-
target="_blank"
59-
rel="noopener noreferrer"
60-
title="CoreTrustSeal">
61-
<img
62-
src="assets/images/core-trust-seal-logo.png"
63-
alt="CoreTrustSeal logo">
42+
43+
44+
<div class="ctslogo">
45+
<a
46+
href="https://www.coretrustseal.org/"
47+
target="_blank"
48+
rel="noopener noreferrer"
49+
title="CoreTrustSeal">
50+
51+
<img
52+
src="assets/images/core-trust-seal-logo.png"
53+
alt="CoreTrustSeal logo">
6454
</a>
6555
</div>
6656
</div>

angular/src/app/frame/footbar/footbar.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ export class FootbarComponent implements OnInit {
1616
// Footer link line #1
1717
footerLinks01: any[];
1818

19-
// Footer link line #2
20-
footerLinks02: any[];
21-
2219
constructor(public gaService: GoogleAnalyticsService) {
2320
// For some reason, footerlinks does not have "default" field in unit test
2421
// So we have to use following condition to make both production and unit test work.
@@ -30,7 +27,6 @@ export class FootbarComponent implements OnInit {
3027
// Add footerLinks to the condition to avoid unit test error
3128
this.socialMediaList = this.footerLinks.socialMediaList;
3229
this.footerLinks01 = this.footerLinks.footerLinks01;
33-
this.footerLinks02 = this.footerLinks.footerLinks02;
3430
}
3531

3632
ngOnInit() {

angular/src/assets/site-constants/footer-links.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@
7676
{
7777
"title": "Information Quality Standards",
7878
"url": "https://www.nist.gov/nist-information-quality-standards"
79-
}
80-
],
81-
"footerLinks02": [
79+
},
8280
{
8381
"title": "Commerce.gov",
8482
"url": "https://www.commerce.gov/"
@@ -90,6 +88,6 @@
9088
{
9189
"title": "USA.gov",
9290
"url": "http://www.usa.gov/"
93-
}
91+
}
9492
]
9593
}

0 commit comments

Comments
 (0)