feat(web): add xterm terminal panel (#5)
Use @xterm/xterm for terminal emulation and its official @xterm/addon-fit for container sizing. Lazy-load both on first open to keep them out of the main bundle. Preserve the mounted terminal on collapse and offer explicit reconnect; provide an echo transport for demos.
This commit is contained in:
@@ -439,3 +439,28 @@ a {
|
||||
min-height: 200px;
|
||||
}
|
||||
}
|
||||
.terminal[hidden] {
|
||||
display: none;
|
||||
}
|
||||
.terminal {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
min-width: 0;
|
||||
}
|
||||
.terminal-screen {
|
||||
height: calc(100% - 160px);
|
||||
min-height: 220px;
|
||||
}
|
||||
.with-terminal {
|
||||
grid-template-columns: 230px minmax(0, 1fr) minmax(300px, 40vw);
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.with-terminal {
|
||||
grid-template-columns: 170px minmax(0, 1fr);
|
||||
}
|
||||
.terminal {
|
||||
position: static;
|
||||
height: 500px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user