docs: move assets to correct path
This commit is contained in:
parent
694d636322
commit
dda45cfbb6
11 changed files with 8 additions and 208 deletions
|
|
@ -52,7 +52,7 @@ fn main() {
|
|||
|
||||
fn web_playground_files_present() -> bool {
|
||||
let paths = [
|
||||
"../docs/assets/js/playground.js",
|
||||
"../docs/src/assets/js/playground.js",
|
||||
"../lib/binding_web/tree-sitter.js",
|
||||
"../lib/binding_web/tree-sitter.wasm",
|
||||
];
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ macro_rules! optional_resource {
|
|||
};
|
||||
}
|
||||
|
||||
optional_resource!(get_playground_js, "docs/assets/js/playground.js");
|
||||
optional_resource!(get_playground_js, "docs/src/assets/js/playground.js");
|
||||
optional_resource!(get_lib_js, "lib/binding_web/tree-sitter.js");
|
||||
optional_resource!(get_lib_wasm, "lib/binding_web/tree-sitter.wasm");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,203 +0,0 @@
|
|||
---
|
||||
---
|
||||
|
||||
@import 'jekyll-theme-cayman';
|
||||
|
||||
$padding: 20px;
|
||||
$sidebar-width: 300px;
|
||||
$sidebar-transition: left 0.25s;
|
||||
$container-width: 1024px;
|
||||
|
||||
body {
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
a[href^="http"]:after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
transform: translate(0px, 2px);
|
||||
width: .9em;
|
||||
height: .9em;
|
||||
margin-left: 3px;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23777'%3E%3Cpath d='M20 3h-5a1 1 0 1 0 0 2h3L8 14a1 1 0 1 0 2 2l9-10v3a1 1 0 1 0 2 0V4a1 1 0 0 0-1-1zM5 3L3 5v14l2 2h14l2-2v-6a1 1 0 1 0-2 0v6H5V5h6a1 1 0 1 0 0-2H5z'/%3E%3C/svg%3E");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
#container {
|
||||
position: relative;
|
||||
max-width: $container-width;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#main-content, #sidebar {
|
||||
padding: $padding 0;
|
||||
}
|
||||
|
||||
#main-content code:not(pre code, a code) {
|
||||
color: #c7254e;
|
||||
font-size: 0.9em;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #eaeaea;
|
||||
border-radius: 3px;
|
||||
margin: 0 2px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
position: fixed;
|
||||
background: white;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: $sidebar-width;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid #ccc;
|
||||
z-index: 1;
|
||||
|
||||
.github-repo {
|
||||
display: inline-block;
|
||||
padding-left: 3.75em;
|
||||
font-size: .85em;
|
||||
}
|
||||
}
|
||||
|
||||
#sidebar-toggle-link {
|
||||
font-size: 24px;
|
||||
position: fixed;
|
||||
background-color: white;
|
||||
opacity: 0.75;
|
||||
box-shadow: 1px 1px 5px #aaa;
|
||||
left: $sidebar-width;
|
||||
padding: 5px 10px;
|
||||
display: none;
|
||||
z-index: 100;
|
||||
text-decoration: none !important;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
#main-content {
|
||||
position: relative;
|
||||
padding: $padding;
|
||||
padding-left: $sidebar-width + $padding;
|
||||
}
|
||||
|
||||
.nav-link.active {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a > span {
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
.table-of-contents-section {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.table-of-contents-section.active {
|
||||
background-color: #edffcb;
|
||||
}
|
||||
|
||||
.table-of-contents-section {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
#table-of-contents {
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
padding: 5px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
#sidebar {
|
||||
left: 0;
|
||||
transition: $sidebar-transition;
|
||||
}
|
||||
|
||||
#sidebar-toggle-link {
|
||||
display: block;
|
||||
transition: $sidebar-transition;
|
||||
}
|
||||
|
||||
#main-content {
|
||||
left: $sidebar-width;
|
||||
padding-left: $padding;
|
||||
transition: $sidebar-transition;
|
||||
}
|
||||
|
||||
body.sidebar-hidden {
|
||||
#sidebar {
|
||||
left: -$sidebar-width;
|
||||
}
|
||||
|
||||
#main-content {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#sidebar-toggle-link {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#playground-container {
|
||||
.CodeMirror {
|
||||
height: auto;
|
||||
max-height: 350px;
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
height: auto;
|
||||
max-height: 350px;
|
||||
}
|
||||
|
||||
h4, select, .field, label {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
#logging-checkbox {
|
||||
height: 15px;
|
||||
}
|
||||
|
||||
.CodeMirror div.CodeMirror-cursor {
|
||||
border-left: 3px solid red;
|
||||
}
|
||||
|
||||
h4#about {
|
||||
margin: 10ex 0 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
#output-container {
|
||||
padding: 0 10px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#output-container-scroll {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
margin-top: 0;
|
||||
overflow: auto;
|
||||
max-height: 350px;
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
|
||||
a.highlighted {
|
||||
background-color: #ddd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.query-error {
|
||||
text-decoration: underline red dashed;
|
||||
-webkit-text-decoration: underline red dashed;
|
||||
}
|
||||
|
|
@ -9,8 +9,8 @@ src = "src"
|
|||
title = "Tree-sitter"
|
||||
|
||||
[output.html]
|
||||
additional-css = ["assets/css/playground.css"]
|
||||
additional-js = ["assets/js/playground.js"]
|
||||
additional-css = ["src/assets/css/playground.css"]
|
||||
additional-js = ["src/assets/js/playground.js"]
|
||||
git-repository-url = "https://github.com/tree-sitter/tree-sitter"
|
||||
git-repository-icon = "fa-github"
|
||||
edit-url-template = "https://github.com/tree-sitter/tree-sitter/edit/master/docs/{path}"
|
||||
|
|
|
|||
|
|
@ -251,7 +251,10 @@ input[type="checkbox"]:focus {
|
|||
}
|
||||
|
||||
/* Dark Theme Overrides */
|
||||
.ayu, .coal, .navy {
|
||||
.ayu,
|
||||
.coal,
|
||||
.navy {
|
||||
|
||||
& #language-select,
|
||||
& .select-button {
|
||||
background-color: var(--dark-bg);
|
||||
|
Before Width: | Height: | Size: 887 B After Width: | Height: | Size: 887 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
Loading…
Add table
Add a link
Reference in a new issue