Platform
Resources
Pricing
Sign in
Get started
Yao Liu
Workspace
Fork
Published
By
Yao Liu
Edited
Feb 14, 2020
Fork of
Sidenotes
Importers
3 stars
Insert cell
Insert cell
Insert cell
sn
=
(
...
args
)
=>
{
mutable
counter
=
1
;
return
html
`
<div class="wrapper">
${
viewof
style
.
parentNode
?
[
]
:
style
}
${
md
(
...
args
)
}
</div>
`
;
}
Insert cell
note
=
(
...
args
)
=>
{
const
id
=
mutable
counter
;
mutable
counter
+=
1
;
const
trigger
=
html
`<button class="ref subtle">${
id
}</button>`
;
const
extract
=
md
(
...
args
)
;
tippy
.
default
(
trigger
,
{
content
:
extract
,
ignoreAttributes
:
true
,
interactive
:
true
,
trigger
:
'click'
,
theme
:
'light-border'
,
placement
:
'bottom'
,
animation
:
'shift-away'
,
maxWidth
:
354
}
)
;
return
isDesktop
?
html
`<div class="extract"><font size=2>${
extract
}</font>`
:
trigger
;
}
Insert cell
Insert cell
isDesktop
=
createVariable
(
{
get
:
(
)
=>
document
.
body
.
clientWidth
>
700
,
attach
:
cb
=>
addEventListener
(
"resize"
,
cb
)
,
detach
:
cb
=>
removeEventListener
(
"resize"
,
cb
)
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sn
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
note
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
counter
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
isDesktop
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
style
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tippyPrefix
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tippy
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML