Skip to content

Commit 460b330

Browse files
committed
Add Docs links
1 parent a2c2415 commit 460b330

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

docs.html

+21-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,34 @@
33
<head>
44
<meta charset="utf-8"/>
55
<title>Python bot workshop docs</title>
6+
<style>
7+
* {
8+
padding: 0;
9+
margin: 0;
10+
}
11+
#docs-container {
12+
display: flex;
13+
justify-content: center;
14+
background-color: #eaedef;
15+
}
16+
#docs-container > * {
17+
width: 50%;
18+
margin: 20px;
19+
padding: 10px;
20+
background-color: white;
21+
}
22+
</style>
623
</head>
724
<body>
825
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-loader.min.js"></script>
926
<script type="module" src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@1/src/zero-md.min.js"></script>
27+
28+
<div id="docs-container">
29+
</div>
1030
<script>
1131
const md = document.createElement('zero-md')
1232
md.src=document.location.hash.slice(1)
13-
document.body.appendChild(md)
33+
document.querySelector('#docs-container').appendChild(md)
1434
</script>
1535
</body>
1636
</html>

index.html

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
</div>
4646
<div class="console-panel">
4747
<textarea class="console" id="console" readonly autocomplete="off" cols="60"></textarea>
48+
<div class="docs-links">
49+
<a href="docs.html#cheatsheet.md">Cheat Sheet</a>
50+
<a href="docs.html#examples.md">Examples</a>
51+
</div>
4852
</div>
4953
<div class="messenger-panel">
5054
<div class="messenger-panel-inner">

styles/console.scss

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
$border-width: 2px;
2+
13
.console-panel {
24
font-family: Consolas, monaco, monospace;
35
overflow: hidden;
6+
position: relative;
47
.console {
58
padding: 6px;
69
background-color: #2f3129;
@@ -12,7 +15,25 @@
1215
color: #8ae234;
1316
overflow: auto;
1417
border: none;
15-
border-top: 2px solid;
18+
border-top: $border-width solid;
1619
resize: none;
1720
}
21+
.docs-links {
22+
position: absolute;
23+
right: 0;
24+
top: $border-width;
25+
background-color: #435f7a;
26+
padding: 4px;
27+
display: flex;
28+
flex-direction: column;
29+
> a {
30+
&:not(:last-child) {
31+
padding-bottom: 5px;
32+
}
33+
color: white;
34+
&:hover {
35+
color: black;
36+
}
37+
}
38+
}
1839
}

0 commit comments

Comments
 (0)