-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathpage-footer-legacy.js
More file actions
181 lines (159 loc) · 4.1 KB
/
Copy pathpage-footer-legacy.js
File metadata and controls
181 lines (159 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
import React from 'react';
import T from 'prop-types';
import styled from 'styled-components';
import format from 'date-fns/format';
import {
glsp,
themeVal,
visuallyHidden,
media
} from '@devseed-ui/theme-provider';
import { reveal } from '@devseed-ui/animation';
import { Button } from '@devseed-ui/button';
import {
CollecticonBrandGithub,
CollecticonEnvelope
} from '@devseed-ui/collecticons';
import { createSubtitleStyles } from '@devseed-ui/typography';
import { variableGlsp } from '../../styles/variable-utils';
import { Tip } from '$components/common/tip';
import { ComponentOverride } from '$components/common/page-overrides';
import SmartLink from '$components/common/smart-link';
const PageFooterSelf = styled.footer`
padding: ${variableGlsp(0.75, 1)};
background: ${themeVal('color.base-50')};
animation: ${reveal} 0.32s ease 0s 1;
display: flex;
flex-flow: column nowrap;
${({ isHidden }) => isHidden && visuallyHidden()}
${media.smallUp`
flex-flow: row nowrap;
`}
a {
&,
&:visited {
color: inherit;
}
}
`;
const FooterCredits = styled.address`
font-size: 0.875rem;
line-height: 1.5rem;
font-style: normal;
display: flex;
flex-flow: column nowrap;
justify-content: flex-end;
a span {
${visuallyHidden()}
}
h3 {
${visuallyHidden()}
}
small {
font-size: inherit;
display: block;
opacity: 0.64;
}
`;
const InfoList = styled.dl`
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-auto-flow: column;
gap: ${glsp(0, 1)};
align-items: start;
margin-bottom: ${variableGlsp()};
${media.smallUp`
gap: ${glsp(0, 2)};
margin: 0 0 0 auto;
order: 2;
`}
${media.mediumUp`
grid-template-columns: repeat(4, auto);
grid-auto-flow: auto;
grid-gap: ${variableGlsp(0, 0.5)};
align-items: center;
`}
dt {
${createSubtitleStyles()}
text-transform: uppercase;
font-size: 0.75rem;
line-height: 1rem;
grid-row: 1;
${media.mediumUp`
margin-left: ${variableGlsp()};
`}
}
dd {
grid-row: 2;
${media.mediumUp`
grid-row: 1;
`}
}
`;
function PageFooterLegacy(props) {
const nowDate = new Date();
return (
<PageFooterSelf isHidden={props.isHidden}>
<ComponentOverride
with='pageFooter'
appVersion={process.env.APP_VERSION}
appUiVersion={process.env.APP_UI_VERSION}
appBuildTime={process.env.APP_BUILD_TIME}
>
<InfoList>
<dt>NASA official</dt>
<dd>
<Button
forwardedAs='a'
href='mailto:manil.maskey@nasa.gov'
variation='base-text'
size='small'
fitting='skinny'
>
<CollecticonEnvelope title='Get in touch' meaningful />
Manil Maskey
</Button>
</dd>
<dt>Open source code</dt>
<dd>
<Button
forwardedAs='a'
href='https://github.com/NASA-IMPACT/veda-config'
variation='base-text'
size='small'
fitting='skinny'
target='_blank'
rel='noopener noreferrer'
>
<CollecticonBrandGithub title='Explore the code' meaningful />
GitHub
</Button>
</dd>
</InfoList>
<FooterCredits>
<p>
<SmartLink to='https://earthdata.nasa.gov/'>
<span>By</span> NASA <strong>Earthdata</strong> <span>on</span>{' '}
<time dateTime={nowDate.getFullYear()}>
{nowDate.getFullYear()}
</time>
</SmartLink>
{' • '}
<Tip
content={`Released on ${format(
new Date(+process.env.APP_BUILD_TIME),
'PPPP'
)} (veda-ui v${process.env.APP_VERSION}))`}
>
<span>v{process.env.APP_VERSION}</span>
</Tip>
</p>
</FooterCredits>
</ComponentOverride>
</PageFooterSelf>
);
}
export default PageFooterLegacy;
PageFooterLegacy.propTypes = {
isHidden: T.bool
};