-
Notifications
You must be signed in to change notification settings - Fork 161
/
footnotes.js
51 lines (47 loc) · 876 Bytes
/
footnotes.js
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
import P from "./paragraph";
export const FootNotes = ({ children }) => (
<div>
{children}
<style jsx>{`
div {
font-size: 16px;
}
div::before {
width: 200px;
content: " ";
margin: auto;
border-top: 1px solid #ccc;
padding-top: 20px;
display: block;
margin-top: 40px;
}
`}</style>
</div>
);
export const Ref = ({ id }) => (
<a href={`#f${id}`} id={`s${id}`}>
[{id}]
<style jsx>{`
a {
top: -5px;
font-size: 10px;
position: relative;
text-decoration: none;
}
`}</style>
</a>
);
export const Note = ({ id, children }) => (
<P>
{id}.{" "}
<a href={`#s${id}`} id={`f${id}`}>
^
</a>{" "}
{children}
<style jsx>{`
a {
text-decoration: none;
}
`}</style>
</P>
);