Skip to content

Commit 7f7d62e

Browse files
committed
docs: add link to lite lab
1 parent fa9a7c1 commit 7f7d62e

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
lines changed

_templates/lite-demo.html

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
<aside class="navbar-demo-box" title="try RobotKernel in your browser right now.">
2+
<h2>DEMO</h2>
3+
<div class="demo-label">
4+
Try <code>RobotKernel</code> right now with <input
5+
id="room-name"
6+
type="text"
7+
placeholder="nobody else"
8+
title="give a room name to enable shared editing"
9+
/> in...</em>
10+
</div>
11+
<form
12+
action="{{ pathto('_/lab/index.html?path=example.ipynb', 1) }}"
13+
target="_blank"
14+
class="demo"
15+
>
16+
<input
17+
type="submit"
18+
title="JupyterLab UI"
19+
value="lab"
20+
class="launch-demo"
21+
/>
22+
<input name="path" type="hidden" value="example.ipynb" />
23+
<input name="room" type="hidden" value="" />
24+
</form>
25+
<div class="demo-label">
26+
... with <a href="https://github.com/jupyterlite/jupyterlite">JupyterLite</a>
27+
</div>
28+
</aside>
29+
30+
<script>
31+
$(function () {
32+
const roomName = $("#room-name");
33+
roomName.on("input", () =>
34+
$("input[name='room']").prop("value", roomName.prop("value"))
35+
);
36+
});
37+
</script>
38+
39+
<style>
40+
:root {
41+
--pg-brand-color0: #000;
42+
--pg-layout-color0: #fff;
43+
--pg-box-shadow0: 0.25em 0.25em #ccc;
44+
--pst-color-link: 252, 4, 4;
45+
--pst-color-inline-code: 67, 67, 200;
46+
}
47+
.navbar-demo-box h2 {
48+
margin: 0;
49+
padding: 0;
50+
color: var(--pg-layout-color0);
51+
text-align: center;
52+
width: 100%;
53+
font-style: italic;
54+
}
55+
/* card style */
56+
.right-next,
57+
.left-prev,
58+
.navbar-demo-box {
59+
background-color: var(--pg-brand-color0);
60+
color: var(--pg-layout-color0);
61+
box-shadow: var(--pg-box-shadow0);
62+
margin-bottom: 1em;
63+
}
64+
.prev-next-subtitle {
65+
font-style: italic;
66+
}
67+
.navbar-demo-box {
68+
display: flex;
69+
flex-direction: row;
70+
flex-wrap: wrap;
71+
border-left: 0;
72+
border-right: 0;
73+
padding: 1em 0 0 0;
74+
margin-bottom: 1em;
75+
padding: 0.5em;
76+
text-align: center;
77+
}
78+
.prev-next-area a p.prev-next-title,
79+
.right-next p, .left-prev p {
80+
color: var(--pg-layout-color0);
81+
}
82+
.navbar-demo-box code,
83+
.right-next code,
84+
.left-prev code {
85+
color: var(--pg-brand-color0);
86+
background-color: var(--pg-layout-color0);
87+
padding: 0.25em;
88+
font-weight: bold;
89+
}
90+
main.bd-content #main-content .right-next,
91+
main.bd-content #main-content .left-prev,
92+
.navbar-demo-box a {
93+
color: var(--pg-layout-color0);
94+
font-weight: bold;
95+
}
96+
97+
98+
.navbar-demo-box > .demo-label {
99+
flex: 1;
100+
width: 100%;
101+
min-width: 100%;
102+
}
103+
#room-name {
104+
margin-left: 0.5em;
105+
display: inline-box;
106+
max-width: 6em;
107+
border: 0;
108+
border-bottom: dotted 2px var(--pg-layout-color0);
109+
background-color: transparent;
110+
color: var(--pg-layout-color0);
111+
text-align: center;
112+
font-weight: bold;
113+
}
114+
#room-name::placeholder{
115+
font-style: italic;
116+
color: var(--pg-layout-color0);
117+
font-weight: 400;
118+
}
119+
.demo {
120+
flex: 1;
121+
display: flex;
122+
}
123+
.launch-demo {
124+
color: var(--pg-brand-color0);
125+
background-color: var(--pg-layout-color0);
126+
padding: 0.5em;
127+
width: 100%;
128+
margin: 0.5em 0;
129+
display: block;
130+
font-size: 150%;
131+
font-weight: bold;
132+
font-style: italic;
133+
text-align: center;
134+
border: 0;
135+
}
136+
.launch-demo:hover,
137+
.launch-demo:active,
138+
.launch-demo:focus {
139+
background-color: var(--pg-brand-color0);
140+
color: var(--pg-layout-color0);
141+
text-decoration: none;
142+
}
143+
</style>

0 commit comments

Comments
 (0)