Skip to content

Commit a3bf4a5

Browse files
authored
Merge pull request #346 from usnistgov/ux/core-seal-logo
Footer: add CoreTrustSeal logo
2 parents 0dcfe3c + b4ca193 commit a3bf4a5

5 files changed

Lines changed: 138 additions & 26 deletions

File tree

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

Lines changed: 111 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
background: #000;
44
color: white;
55
position: relative;
6+
--footer-right-offset: 1em;
67
}
78

89
.footer__inner {
@@ -120,7 +121,52 @@ ul, menu, dir {
120121

121122
#footer .social-links {
122123
float: right;
123-
margin-right: 1em;
124+
margin-right: var(--footer-right-offset);
125+
}
126+
127+
.footer-links-and-seal {
128+
clear: both;
129+
display: flex;
130+
align-items: center;
131+
justify-content: space-between;
132+
flex-wrap: nowrap;
133+
gap: 1rem;
134+
}
135+
136+
.footer-links {
137+
flex: 1 1 auto;
138+
min-width: 0;
139+
}
140+
141+
.footer-links .menu--footer-menu {
142+
clear: none;
143+
}
144+
145+
.footer-links .menu--footer-menu ul.menu {
146+
text-align: left;
147+
}
148+
149+
.core-trust-seal {
150+
flex: 0 0 auto;
151+
text-align: right;
152+
margin-right: var(--footer-right-offset);
153+
}
154+
155+
.core-trust-seal a {
156+
display: inline-block;
157+
}
158+
159+
.core-trust-seal img {
160+
height: clamp(72px, 6vw, 108px);
161+
width: auto;
162+
max-width: 100%;
163+
display: block;
164+
}
165+
166+
@media (max-width: 900px) {
167+
.footer-links-and-seal {
168+
align-items: center;
169+
}
124170
}
125171

126172
.social-btn--large {
@@ -357,3 +403,67 @@ display: block;
357403
.x-icon:hover {
358404
background-color: lightgray;
359405
}
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+
width: 100%;
424+
margin: 0 auto;
425+
text-align: center;
426+
line-height: 1.8;
427+
428+
display: flex;
429+
flex-wrap: wrap;
430+
justify-content: center;
431+
432+
/* critical: prevent overlap with logo */
433+
padding-right: 20px;
434+
}
435+
436+
/* Links */
437+
.footerlinks a {
438+
text-decoration: none;
439+
/* color: #333; */
440+
margin: 0 6px;
441+
white-space: nowrap;
442+
}
443+
444+
.separator {
445+
margin: 0 4px;
446+
color: #999;
447+
}
448+
449+
/* LOGO */
450+
.ctslogo {
451+
grid-column: 3;
452+
justify-self: end;
453+
}
454+
455+
/* Dynamic logo sizing */
456+
.ctslogo img {
457+
max-width: 108px;
458+
max-height: 108px;
459+
width: auto;
460+
height: auto;
461+
}
462+
463+
.spaceholder {
464+
grid-column: 1;
465+
max-width: 108px;
466+
max-height: 108px;
467+
width: 108px;
468+
height: 108px;
469+
}

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

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

33-
<!-- Footer links line #1 -->
34-
<div id="block-menu-menu-footer-menu" *ngIf="footerLinks01"
35-
class="block menu--footer-menu first even block--menu block--menu-menu-footer-menu" role="navigation">
36-
<ul class="menu">
37-
<li *ngFor="let link of footerLinks01; let i = index" [ngClass]="getLinkClass(i, footerLinks01)">
38-
<a [href]="link.url" target="_blank" rel="noopener" class="menu__link">{{link.title}} </a>
39-
</li>
40-
</ul>
41-
</div>
34+
<div class="footerlinks">
35+
<div class="footerlinks-content">
36+
<div class="spaceholder">
37+
</div>
38+
39+
<div class="footerlinks">
40+
<span *ngFor="let link of footerLinks01; let i = index">
41+
<a [href]="link.url">{{ link.title }}</a>
42+
<span *ngIf="i < footerLinks01.length - 1" class="separator">|</span>
43+
</span>
44+
</div>
4245

43-
<!-- Footer links line #2 -->
44-
<div id="block-menu-menu-footer-menu-3" *ngIf="footerLinks02"
45-
class="block menu--footer-menu last even block--menu block--menu-menu-footer-menu-3" role="navigation">
46-
<ul class="menu">
47-
<li *ngFor="let link of footerLinks02; let i = index" [ngClass]="getLinkClass(i, footerLinks02)">
48-
<a [href]="link.url" target="_blank" rel="noopener" class="menu__link">{{link.title}} </a>
49-
</li>
50-
</ul>
46+
47+
<div class="ctslogo">
48+
<a
49+
href="https://www.coretrustseal.org/"
50+
target="_blank"
51+
rel="noopener noreferrer"
52+
title="CoreTrustSeal">
53+
54+
<img
55+
src="assets/images/core-trust-seal-logo.png"
56+
alt="CoreTrustSeal logo">
57+
</a>
58+
</div>
5159
</div>
5260
</div>
5361
</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() {
15.8 KB
Loading

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)