Skip to content

Commit a9aa451

Browse files
committed
feat: Added gpg keys page
1 parent dd903e8 commit a9aa451

2 files changed

Lines changed: 161 additions & 0 deletions

File tree

pages/gpg.tsx

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import React from 'react';
2+
import Header from '../components/Header';
3+
import Footer from '../components/Footer';
4+
import Wrapper from '../components/Wrapper';
5+
import style from '../styles/gpg.module.scss';
6+
import { Calendar, Clock, Key, Mail } from 'lucide-react';
7+
8+
const gpgKeys = [
9+
{
10+
name: 'Private',
11+
email: 'handymathis@gmail.com',
12+
fingerprint: '1A7C B156 9C23 250D ED19 47B9 AFE7 60E2 AA90 75D3',
13+
created: '2023-11-28',
14+
expires: null,
15+
},
16+
{
17+
name: 'Work',
18+
email: 'mburger@die-netzwerkstatt.de',
19+
fingerprint: 'EBBD 616F 8904 EE13 C458 DCDA B491 59DB 4F79 868D',
20+
created: '2023-03-29',
21+
expires: null,
22+
},
23+
];
24+
25+
const GpgPage = () => {
26+
return (
27+
<Wrapper>
28+
<Header active="gpg" />
29+
<div className={style.container}>
30+
<h1>GPG Keys</h1>
31+
<div className={style.box}>
32+
{gpgKeys.map((key) => (
33+
<div key={key.fingerprint} className={style.elementBox}>
34+
<h2>{key.name}</h2>
35+
36+
<div className={style.field}>
37+
<Mail className={style.icon} />
38+
<span className={style.label}>Email:</span>
39+
<span className={style.value}>{key.email}</span>
40+
</div>
41+
42+
<div className={style.field}>
43+
<Key className={style.icon} />
44+
<span className={style.label}>Fingerprint:</span>
45+
<span className={style.value}>{key.fingerprint}</span>
46+
</div>
47+
48+
<div className={style.field}>
49+
<Calendar className={style.icon} />
50+
<span className={style.label}>Created:</span>
51+
<span className={style.value}>{key.created}</span>
52+
</div>
53+
54+
<div className={style.field}>
55+
<Clock className={style.icon} />
56+
<span className={style.label}>Expires:</span>
57+
<span className={style.value}>
58+
{key.expires ?? 'not specified'}
59+
</span>
60+
</div>
61+
</div>
62+
))}
63+
</div>
64+
</div>
65+
<Footer />
66+
</Wrapper>
67+
);
68+
};
69+
70+
export default GpgPage;

styles/gpg.module.scss

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
.container {
2+
width: 100%;
3+
background: #0f1019;
4+
display: flex;
5+
flex-direction: column;
6+
align-items: center;
7+
padding: 2em 0 10em;
8+
}
9+
10+
.container h1 {
11+
padding-top: 1.5em;
12+
text-align: center;
13+
font-size: 4em;
14+
margin-bottom: 2em;
15+
}
16+
17+
.box {
18+
display: flex;
19+
flex-wrap: wrap;
20+
gap: 1em;
21+
justify-content: center;
22+
}
23+
24+
.elementBox {
25+
width: 30vw;
26+
min-height: 250px;
27+
border-radius: 5px;
28+
border: 1px solid #49519a;
29+
box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
30+
display: flex;
31+
flex-direction: column;
32+
align-items: center;
33+
padding: 1.5em;
34+
background-color: #1a1b2b;
35+
transition: 0.3s;
36+
}
37+
38+
@media only screen and (max-width: 880px) {
39+
.box {
40+
flex-direction: column;
41+
}
42+
.elementBox {
43+
width: 80vw;
44+
}
45+
}
46+
47+
.elementBox:hover {
48+
box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.6);
49+
transform: scale(1.05);
50+
}
51+
52+
.elementBox h2 {
53+
font-size: 1.4em;
54+
margin-bottom: 1em;
55+
text-align: center;
56+
}
57+
58+
.field {
59+
display: flex;
60+
flex-direction: row;
61+
align-items: center;
62+
gap: 1em;
63+
margin-bottom: 0.8em;
64+
text-align: left;
65+
width: 100%;
66+
}
67+
68+
.fieldValue {
69+
display: flex;
70+
flex-direction: column;
71+
align-items: flex-start;
72+
margin-bottom: 0.8em;
73+
text-align: left;
74+
}
75+
76+
.icon {
77+
font-size: 1.2em;
78+
margin-bottom: 0.2em;
79+
color: #6b57a1;
80+
}
81+
82+
.label {
83+
font-weight: bold;
84+
margin-bottom: 0.2em;
85+
font-size: 0.9em;
86+
}
87+
88+
.value {
89+
font-size: 0.9em;
90+
word-break: break-all; // to handle long fingerprints
91+
}

0 commit comments

Comments
 (0)