Skip to content

Commit 5ad98d8

Browse files
authored
Merge pull request #34 from UW-Macrostrat/updates
Movement toward production
2 parents ac59326 + 9a4ab15 commit 5ad98d8

File tree

23 files changed

+683
-705
lines changed

23 files changed

+683
-705
lines changed

pages/+Page.mdx

Lines changed: 132 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,137 @@
1-
export { ContentPage as default } from "~/layouts";
2-
import { macrostratInstance } from "@macrostrat-web/settings";
31
import { PageHeader } from "~/components";
4-
import { LinkCard } from "~/components/cards";
2+
import { Image, Footer } from "./index";
3+
import "./main.styl";
4+
import "./main-page.styl";
5+
import "@macrostrat/style-system";
56

6-
<PageHeader>
7-
<span className="subtitle">
8-
<span className="tertiary">{macrostratInstance}</span>
9-
</span>
10-
</PageHeader>
7+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"></link>
118

9+
<div class="new_container field">
10+
<div class="mask">
11+
<Image src="main-page/field.jpg" className="start-img back-img"></Image>
12+
<div class="main-content row row-eq-height">
13+
<div class="side">
14+
<div class="center-me">
15+
<div class="center">
16+
<Image src="main-page/rockd_transparent.png" className="not-huge"></Image>
17+
<p>Learn, explore, and document your geologic world</p>
18+
<a href="https://itunes.apple.com/us/app/id1153056624"><Image src="main-page/appstore.png" className="download-badge ios"></Image></a>
19+
<a href="https://play.google.com/store/apps/details?id=org.macrostrat.rockd"><Image src="main-page/google-play-badge.png" className="download-badge android"></Image></a>
20+
<p><a class="explore-link" href="/explore">Explore the data</a></p>
21+
</div>
22+
</div>
23+
<Image src="main-page/main.png" className="main-img"></Image>
24+
</div>
25+
</div>
26+
</div>
27+
</div>
1228

13-
### Development pages
29+
<div class="new_container map-container">
30+
<div class="side">
31+
<div class="map-imgs">
32+
<Image src="main-page/grand_canyon.jpg" className="map-shot grand_canyon"></Image>
33+
<Image src="main-page/new_zealand.jpg" className="map-shot new_zealand"></Image>
34+
<Image src="main-page/world.jpg" className="map-shot world"></Image>
35+
<Image src="main-page/appalachia.jpg" className="map-shot appalachia"></Image>
36+
</div>
1437

15-
<LinkCard href="/dev" title="Developer apps"></LinkCard>
38+
<div class="center map-info">
39+
<h1>Instant access to more than 290 <a href="https://macrostrat.org/map/sources">geologic maps</a> globally</h1>
40+
<p>Includes direct links to <a href="https://macrostrat.org">Macrostrat</a> and <a href="https://xdd.wisc.edu">xDD</a> (where available)</p>
41+
</div>
42+
</div>
43+
</div>
44+
45+
<div class="new_container white-container">
46+
<div class="row">
47+
<div class="col-sm-6 col-sm-offset-3">
48+
<div class="headline-alligner">
49+
<div class="center curious">
50+
<h1>Curious what you're standing on?</h1>
51+
<p>The Dashboard distills key facts about your location into a single, easy-to-read interface</p>
52+
</div>
53+
</div>
54+
</div>
55+
<div class="col-xs-12 dashboard-img-container">
56+
<Image src="main-page/pilbara-australia.png"></Image>
57+
<Image src="main-page/huronian-supergroup.png"></Image>
58+
<Image src="main-page/copper-harbor.png"></Image>
59+
60+
<Image src="main-page/appalachian-foreland.png"></Image>
61+
<Image src="main-page/gotthard-pass.png"></Image>
62+
<Image src="main-page/ozark-plateau.png"></Image>
63+
<Image src="main-page/eastern-australia.png"></Image>
64+
65+
</div>
66+
</div>
67+
</div>
68+
69+
<div class="new_container red_rock">
70+
<Image src="main-page/red_rock.jpg" className="back-img red-rock-img"></Image>
71+
<div class="img-container row row-eq-height">
72+
<div class="col-sm-6 stats-container">
73+
<Image src="main-page/profile.png" className="profile-img"></Image>
74+
</div>
75+
76+
<div class="col-sm-6 center-me">
77+
<div class="headline-alligner">
78+
<div class="center">
79+
<h1>"The best geologist is the one who has seen the most rocks"</h1>
80+
<p>Track your progress through the geologic rock record with summary statistics about your checkins</p>
81+
</div>
82+
</div>
83+
</div>
84+
</div>
85+
</div>
86+
87+
88+
<div class="record-block">
89+
<div class="row">
90+
<div class="col-sm-6 col-sm-offset-3">
91+
<div class="headline-alligner">
92+
<div class="center">
93+
<h1>Record your observations</h1>
94+
<p>Rockd allows you to easily record your geological observations, using your location to provide spatially informed suggestions for nearby geologic units, time intervals, and fossils</p>
95+
</div>
96+
</div>
97+
</div>
98+
99+
<div class="col-sm-6">
100+
<div class="headline-alligner">
101+
<div class="center">
102+
<Image src="main-page/checkin.png" className="record-block-img"></Image>
103+
<p class="record-img-caption"><span>Take pictures of and rate features</span></p>
104+
</div>
105+
</div>
106+
</div>
107+
108+
<div class="col-sm-6">
109+
<div class="headline-alligner">
110+
<div class="center">
111+
<Image src="main-page/strat-names.png" className="record-block-img"></Image>
112+
<p class="record-img-caption"><span>Tag stratigraphic names, even offline</span></p>
113+
</div>
114+
</div>
115+
</div>
116+
117+
<div class="col-sm-6">
118+
<div class="headline-alligner">
119+
<div class="center">
120+
<Image src="main-page/strike-dip.png" className="record-block-img"></Image>
121+
<p class="record-img-caption"><span>Use your phone's compass to record strike and dip</span></p>
122+
</div>
123+
</div>
124+
</div>
125+
126+
<div class="col-sm-6">
127+
<div class="headline-alligner">
128+
<div class="center">
129+
<Image src="main-page/taxa.png" className="record-block-img"></Image>
130+
<p class="record-img-caption"><span>Search for and tag <a href="https://paleobiodb.org">Paleobiology Database</a> taxa.</span></p>
131+
</div>
132+
</div>
133+
</div>
134+
</div>
135+
</div>
136+
137+
<Footer></Footer>

pages/_error/+Page.client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function pageDoesntExist() {
1313
h('h2', "The rock you are looking for doesn't exist. Keep digging."),
1414
h('div.buttons', [
1515
h('button', { className: "btn", onClick: () => history.back() }, "Go back"),
16-
h('a', { className: "btn", href: "/dev/test-site/" }, "Go home")
16+
h('a', { className: "btn", href: "/" }, "Go home")
1717
]),
1818
])
1919
])

pages/dev/test-site/checkin/+Page.client.ts renamed to pages/checkin/+Page.client.ts

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -147,43 +147,38 @@ export function Page() {
147147
zoom: 10
148148
};
149149

150-
// LngLatCoords(LngLatProps);
151-
152-
153150
// if photo exists
154-
if (imageExists("https://rockd.org/api/v1/protected/image/" + checkin.person_id + "/thumb_large/" + observation.photo)) {
155-
observations.push(
156-
h('div', {className: 'observation'}, [
157-
h(BlankImage, { className: 'observation-img', src: "https://rockd.org/api/v1/protected/image/" + checkin.person_id + "/thumb_large/" + observation.photo}),
158-
h('h4', {className: 'observation-header'}, observation.rocks.strat_name?.strat_name_long),
159-
h('div', {className: 'observation-details'}, [
160-
h('p', {className: 'observation-detail'}, observation.rocks.strat_name?.strat_name_long),
161-
h('p', {className: 'observation-detail'}, observation.rocks.map_unit?.unit_name),
162-
h('p', {className: 'observation-detail'}, observation.age_est.name + " (" + observation.age_est.b_age + " - " + observation.age_est.t_age + ")"),
163-
h('p', {className: 'observation-detail'}, liths),
164-
h('p', {className: 'observation-detail'}, observation.orientation.feature?.name),
165-
h('p', {className: 'observation-detail'}, "Coords: " + observation.lat + ", " + observation.lng),
166-
]),
167-
])
168-
);
169-
} else {
170-
observations.push(
171-
h('div', {className: 'observation'}, [
172-
h(BlankImage, { className: 'observation-img', src: "https://storage.macrostrat.org/assets/rockd/rockd.jpg"}),
173-
h('h4', {className: 'observation-header'}, observation.rocks.strat_name?.strat_name_long),
174-
h('div', {className: 'observation-details'}, [
175-
h('p', {className: 'observation-detail'}, observation.rocks.strat_name?.strat_name_long),
176-
h('p', {className: 'observation-detail'}, observation.rocks.map_unit?.unit_name),
177-
h('p', {className: 'observation-detail'}, observation.age_est.name + " (" + observation.age_est.b_age + " - " + observation.age_est.t_age + ")"),
178-
h('p', {className: 'observation-detail'}, liths),
179-
h('p', {className: 'observation-detail'}, observation.orientation.feature?.name),
180-
]),
181-
])
182-
);
183-
}
151+
let imageSrc;
152+
imageSrc = imageExists("https://rockd.org/api/v1/protected/image/" + checkin.person_id + "/thumb_large/" + observation.photo) ? "https://rockd.org/api/v1/protected/image/" + checkin.person_id + "/thumb_large/" + observation.photo : "https://storage.macrostrat.org/assets/rockd/rockd.jpg";
153+
let obsAge = observation.age_est ? observation.age_est.name + " (" + observation.age_est.b_age + " - " + observation?.age_est?.t_age + ")" : null;
154+
155+
console.log("PRINTING" , observation.age_est);
156+
observations.push(
157+
h('div', {className: 'observation'}, [
158+
h(BlankImage, { className: 'observation-img', src: imageSrc}),
159+
h('h4', {className: 'observation-header'}, observation.rocks.strat_name?.strat_name_long),
160+
h('div', {className: 'observation-details'}, [
161+
h('p', {className: 'observation-detail'}, observation.rocks.strat_name?.strat_name_long),
162+
h('p', {className: 'observation-detail'}, observation.rocks.map_unit?.unit_name),
163+
h('p', {className: 'observation-detail'}, obsAge),
164+
h('p', {className: 'observation-detail'}, liths),
165+
h('p', {className: 'observation-detail'}, observation.orientation.feature?.name),
166+
LngLatCoords(LngLatProps)
167+
]),
168+
])
169+
);
184170
}
185171
}
186172

173+
let LngLatProps = {
174+
position: {
175+
lat: checkin.lat,
176+
lng: checkin.lng
177+
},
178+
precision: 3,
179+
zoom: 10
180+
};
181+
187182
return h('div', [
188183
h('div', { className: 'main'}, [
189184
h('h1', { className: "checkin-header" }, checkin.description),
@@ -196,6 +191,7 @@ export function Page() {
196191
h('p', {className: 'location'}, [
197192
h('p', "Near " + checkin.near),
198193
]),
194+
LngLatCoords(LngLatProps),
199195
h('h3', {className: 'rating'}, ratingArr),
200196
]),
201197
]),

pages/dev/+Page.mdx

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

pages/dev/+config.ts

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

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

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

0 commit comments

Comments
 (0)