playground: make file view scrollable
This commit is contained in:
parent
75aebd9156
commit
86c21ed9ff
|
@ -68,6 +68,7 @@ export default defineConfig({
|
||||||
components: {
|
components: {
|
||||||
PageTitle: "./src/components/override/PageTitle.astro",
|
PageTitle: "./src/components/override/PageTitle.astro",
|
||||||
ContentPanel: "./src/components/override/ContentPanel.astro",
|
ContentPanel: "./src/components/override/ContentPanel.astro",
|
||||||
|
Pagination: "./src/components/override/Pagination.astro",
|
||||||
},
|
},
|
||||||
sidebar: [
|
sidebar: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
import type { Props } from "@astrojs/starlight/props";
|
||||||
|
import Default from "@astrojs/starlight/components/Pagination.astro";
|
||||||
|
import { isPlaygroundPage } from '@utils/playground';
|
||||||
|
|
||||||
|
const isPlayground = isPlaygroundPage(Astro.props.slug, Astro.currentLocale);
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
{isPlayground ? <></> : <Default {...Astro.props}><slot /></Default>}
|
|
@ -1,6 +1,6 @@
|
||||||
.playground {
|
.playground {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: clamp(100px, 15%, 400px) auto;
|
grid-template-columns: clamp(200px, 15%, 500px) auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"header header"
|
"header header"
|
||||||
"files editor";
|
"files editor";
|
||||||
|
@ -14,13 +14,18 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-right: 0.5cm;
|
margin-right: 0.5cm;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: hidden;
|
||||||
|
max-height: 70vh;
|
||||||
|
|
||||||
> h3 {
|
> h3 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entries {
|
.entries {
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
word-wrap: break-word;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
border: none;
|
border: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -41,6 +46,10 @@
|
||||||
}
|
}
|
||||||
> .editor {
|
> .editor {
|
||||||
grid-area: editor;
|
grid-area: editor;
|
||||||
|
|
||||||
|
.monaco-editor {
|
||||||
|
padding-block: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,9 @@ edition = "2021"
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = "s"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
Loading…
Reference in New Issue