Skip to content

Commit 1bde5cf

Browse files
committed
dynamic page
1 parent 6b5150b commit 1bde5cf

File tree

3 files changed

+146
-178
lines changed

3 files changed

+146
-178
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
import { PageHeader } from "~/components";
2+
import { PageBreadcrumbs } from "~/components";
3+
import { Image, Navbar, Footer } from "../index";
4+
import "./main.styl";
5+
import "../main.styl";
6+
import { MacrostratIcon } from "~/components";
7+
import { h } from "@macrostrat/map-interface";
8+
9+
export function Page() {
10+
const res = [
11+
{
12+
"name": "Shanan Peters",
13+
"role": "Professor, Database Developer",
14+
"email": "[email protected]",
15+
"link": "http://strata.geology.wisc.edu",
16+
"image": "shanan.jpg"
17+
},
18+
{
19+
"name": "Daven Quinn",
20+
"role": "Research Scientist, Developer",
21+
"email": "[email protected]",
22+
"link": "https://davenquinn.com",
23+
"image": "daven.jpg"
24+
},
25+
{
26+
"name": "Evgeny Mazko",
27+
"role": "Graduate Student",
28+
"email": "[email protected]",
29+
"link": null,
30+
"image": "evgeny.jpg"
31+
},
32+
{
33+
"name": "Michael McClennen",
34+
"role": "Senior Programmer Analyst",
35+
"email": "[email protected]",
36+
"link": "https://geoscience.wisc.edu/geoscience/people/staff/name/michael-mcclennen/",
37+
"image": "michael.jpg"
38+
},
39+
{
40+
"name": "Casey Idzikowski",
41+
"role": "Research Specialist, Developer (former)",
42+
"email": null,
43+
"link": "https://idzikowski-casey.github.io/personal-site/",
44+
"image": "casey.jpg"
45+
},
46+
{
47+
"name": "David Sklar",
48+
"role": "Undergraduate Research Assistant",
49+
"email": "[email protected]",
50+
"link": null,
51+
"image": "david.jpg"
52+
},
53+
{
54+
"name": "Amy Fromandi",
55+
"role": null,
56+
"email": "[email protected]",
57+
"link": null,
58+
"image": "amy.jpg"
59+
},
60+
{
61+
"name": "Daniel Segessenmen",
62+
"role": "Graduate Student (former)",
63+
"email": null,
64+
"link": "http://strata.geology.wisc.edu",
65+
"image": "daniel.jpg"
66+
},
67+
{
68+
"name": "Shan Ye",
69+
"role": "Graduate Student (former)",
70+
"email": null,
71+
"link": "https://www.wisc.edu/directories/person.php?name=Victoria+Khoo&email=vkhoo%40wisc.edu&query=victoria%20khoo",
72+
"image": "shan.jpg"
73+
},
74+
{
75+
"name": "Ben Linzmeier",
76+
"role": "Postdoctoral Scholar (former)",
77+
"email": null,
78+
"link": "http://strata.geology.wisc.edu",
79+
"image": "ben.jpg"
80+
},
81+
{
82+
"name": "Afiqah Rafi",
83+
"role": "Undergrad Student (former)",
84+
"email": null,
85+
"link": "https://www.wisc.edu/directories/person.php?name=Victoria+Khoo&email=vkhoo%40wisc.edu&query=victoria%20khoo",
86+
"image": "afiqah.jpg"
87+
},
88+
{
89+
"name": "Sharon McMullen",
90+
"role": "Researcher (former)",
91+
"email": null,
92+
"link": "http://geoscience.wisc.edu/geoscience/people/student/?id=1007",
93+
"image": "sharon.jpg"
94+
},
95+
{
96+
"name": "Andrew Zaffos",
97+
"role": "Data Mobilization and Research Scientist",
98+
"email": "[email protected]",
99+
"link": "http://www.azstrata.org",
100+
"image": "andrew.jpg"
101+
},
102+
{
103+
"name": "Jon Husson",
104+
"role": "Postdoctoral Researcher (former)",
105+
"email": "[email protected]",
106+
"link": "http://www.jonhusson.com",
107+
"image": "jon.jpg"
108+
}
109+
]
110+
111+
112+
113+
return h('div.main', [
114+
h(Navbar),
115+
h('h1.big', "People"),
116+
h('p.subtitle', "major contributors to the project"),
117+
h('div.line'),
118+
h('div.people', [
119+
res.map(person => {
120+
return h(PersonCard, person);
121+
})
122+
]),
123+
h(Footer)
124+
])
125+
}
126+
127+
function PersonCard({ name, role, email, link, image }) {
128+
return h('div.person-info', [
129+
h(Image, { src: image, className: "back-img" }),
130+
h('div.description', [
131+
h('a.name', { href: link }, name),
132+
role ? h('p.role', role) : null,
133+
email ? h('a.email', { href: "mailto: " + email}, email) : null,
134+
]),
135+
]);
136+
}

pages/dev/test-site/people/+Page.mdx

Lines changed: 0 additions & 174 deletions
This file was deleted.

pages/dev/test-site/people/main.styl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ a:hover
3838

3939
a
4040
color: white !important
41-
p
41+
.description
42+
display: flex
43+
flex-direction: column;
44+
gap: .25em
4245
text-align: right
4346
position:absolute
4447
padding: 5px 20px
@@ -50,6 +53,9 @@ a:hover
5053
white-space: nowrap
5154
margin: 5px
5255

56+
p
57+
margin: 0 !important
58+
5359
a
5460
color: white
5561

@@ -62,14 +68,14 @@ a:hover
6268
object-fit: cover
6369
width: 100%
6470

65-
n
71+
.name
6672
font-size: 25px
6773
font-weight: 200px
6874

69-
t
75+
.role
7076
font-weight: 400px
7177

72-
e
78+
.email
7379
font-size: 14px
7480
font-weight: 200px
7581

0 commit comments

Comments
 (0)