Skip to content

Commit 988d33c

Browse files
committed
added image to error page
1 parent 85954ba commit 988d33c

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

pages/_error/main.styl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.error404
2+
background black
3+
height 100vh
4+
text-align center
5+
color black
6+
7+
h1
8+
margin-top 0
9+
font-size 100px
10+
11+
.error-text
12+
position absolute
13+
z-index 2
14+
top 30%
15+
left 50%
16+
transform translate(-50%, -50%)
17+
color white
18+
19+
.error-image
20+
position absolute
21+
z-index 1
22+
top 0
23+
left 0
24+
opacity .5
25+

pages/index.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import h from "@macrostrat/hyper";
2+
import { MacrostratIcon } from "~/components";
3+
4+
export function Image({ src, className, width, height, onClick }) {
5+
const srcWithAddedPrefix = "https://storage.macrostrat.org/assets/rockd/" + src;
6+
return h("img", {src: srcWithAddedPrefix, className, width, height, onClick})
7+
}
8+
9+
export function BlankImage({ src, className, width, height }) {
10+
return h("img", {src: src, className, width, height})
11+
}
12+
13+
export function Navbar() {
14+
return h("div", {className: "nav"}, [
15+
h("ul", [
16+
h("li", h("a", {href: "/dev/test-site/main-page"}, h(MacrostratIcon))),
17+
h("li", h("a", {href: "/dev/test-site/about"}, "About")),
18+
h("li", h("a", {href: "/dev/test-site/publications"}, "Publications")),
19+
h("li", h("a", {href: "/dev/test-site/people"}, "People")),
20+
h("li", h("a", {href: "/dev/test-site/donate"}, "Donate"))
21+
])
22+
]);
23+
}
24+
25+
export function Footer() {
26+
return h("div", {className: "footer"}, [
27+
h("div", {className: "titles"}, [
28+
h("h3", {className: "footer-text"}, [
29+
"Produced by the ",
30+
h("a", {href: "https://macrostrat.org"} , "UW Macrostrat Lab")
31+
]),
32+
h("h3", {className: "footer-text"}, [
33+
"Funded by ",
34+
h("a", {href: "https://nsf.gov"}, "NSF"),
35+
" and ",
36+
h("a", {href: "http://geoscience.wisc.edu/geoscience/"}, "UW Geoscience")
37+
])
38+
]),
39+
h("ul", {className: "footer-links"},[
40+
h("li", h("a", {href: "/dev/test-site"}, "Home")),
41+
h("li", h("a", {href: "/dev/test-site/explore"}, "Explore")),
42+
h("li", h("a", {href: "/dev/test-site/privacy"}, "Privacy Policy")),
43+
h("li", h("a", {href: "/dev/test-site/terms"}, "Terms and Conditions")),
44+
h("li", h("a", {href: "/dev/test-site/trip?trip=1"}, "Trips")),
45+
h("li", h("a", {href: "/dev/test-site/metrics"}, "Metrics")),
46+
])
47+
]);
48+
}

0 commit comments

Comments
 (0)