-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.qmd
73 lines (61 loc) · 2.13 KB
/
example.qmd
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
title: Elevator.js Quarto Extension
format: html
---
This extension allows you to use [Elevator.js](https://github.com/tholman/elevator.js) in your Quarto HTML documents.
It provides an `{{{< elevator >}}}` shortcode:
- Mandatory:
``` markdown
{{{< elevator >}}}
```
- Optional `<text-button>`, `<anchor-target>`, and `<audio=audio.mp3>`:
``` markdown
{{{< elevator <text-button> <anchor-target> <audio=audio.mp3> >}}}
```
:::{style='text-align: center;'}
```{=html}
<style>
.down-arrow {
font-size: 120px;
margin-top: 120px;
margin-bottom: 120px;
text-shadow: 0px -20px #0C1F31, 0px 0px #C33329;
color: rgba(0,0,0,0);
-webkit-transform: scaleY(0.8);
-moz-transform: scaleY(0.8);
transform: scaleY(0.8);
}
</style>
```
Elevator.js fixes those awkward "scroll to top" moments the old fashioned way.
<div class="down-arrow">▼</div>
First we need to get to the bottom of the page.
<div class="down-arrow">▼</div>
Because you're already at the top.
<div class="down-arrow">▼</div>
So a "back to top" button wouldn't make sense.
<div class="down-arrow">▼</div>
Down down down.
<div class="down-arrow">▼</div>
## Wow, all this scrolling
<div class="down-arrow">▼</div>
This had better be worth it.
<div class="down-arrow">▼</div>
It's going to take ages to get back to the top.
<div class="down-arrow">▼</div>
If only we had an easy way to get back...
<div class="down-arrow">▼</div>
...that is both functional and fun.
<div class="down-arrow">▼</div>
I call "back to top" buttons elevators...
<div class="down-arrow">▼</div>
...they should really behave more like them.
<div class="down-arrow">▼</div>
Ok, here we are... click that elevator!
{{< elevator audio=BossaBossa.mp3 >}}
Or `{{{< elevator "Return to 'Wow, all this scrolling.'" wow-all-this-scrolling audio=BossaBossa.mp3 >}}}` to scroll up to `## Wow, all this scrolling`.
:::
---
BossaBossa by Kevin MacLeod | <https://incompetech.com/>.
Music promoted by <https://www.chosic.com/free-music/all/>.
Creative Commons Creative Commons: By Attribution 3.0 License (<http://creativecommons.org/licenses/by/3.0/>).