Bezier-rs: Add hash URLs for individual API examples (#968)

* Handle displaying single demos

* Address comments

* Update eslintrc

* Add hash links

* Use hash instead of pathname

* Address small nits

* Change url format

* CSS improvements

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Hannah Li
2023-02-08 23:32:28 -05:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent 875f2a5cd1
commit ff51098c11
10 changed files with 209 additions and 87 deletions
+23 -1
View File
@@ -1,11 +1,17 @@
html,
body {
height: 100%;
font-family: Arial, sans-serif;
text-align: center;
}
body > h1 {
margin: 40px 0;
}
body > h1 ~ :last-child {
margin-bottom: 40px;
}
body > h1 + p {
max-width: 768px;
line-height: 1.4;
@@ -29,8 +35,24 @@ body > h2 {
}
.demo-pane-header {
display: inline-block;
position: relative;
margin-top: 2em;
margin-bottom: 0;
padding: 0 1em;
}
.demo-pane-header a {
display: none;
position: absolute;
left: 0;
text-decoration: none;
color: inherit;
opacity: 0.5;
}
.demo-pane-header:hover a {
display: inline-block;
}
.demo-pane-container {