1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00

fix(console): console pages render in standards mode and fit the window

console-base.html had no doctype, so the noVNC and serial console pages
rendered in quirks mode, where body and #main_container got their height
from the viewport. The console area overflowed the window: the full noVNC
page scrolled by the navbar height, the lite page's canvas and the serial
terminal ran below the bottom edge, hiding the last rows.

With the doctype, #main_container is a viewport-high flex column and the
console area (the noVNC container or the terminal) takes the space below
the navbar. Without that, the lite page's canvas collapsed to 0x0.
This commit is contained in:
catborise 2026-10-19 07:58:58 +03:00
parent 3a4488d34f
commit abc6f2063d
2 changed files with 13 additions and 3 deletions

View file

@ -1,6 +1,7 @@
{% load static %}
{% load i18n %}
{% get_current_language as LANGUAGE_CODE %}<html lang="{{ LANGUAGE_CODE }}">
{% get_current_language as LANGUAGE_CODE %}<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta charset="utf-8">
@ -11,11 +12,17 @@
<link href="{% static "css/webvirtcloud.css" %}" rel="stylesheet">
<style>
body {
padding-bottom: 0;
}
#main_container {
padding: 0;
width: 100%;
max-width: none;
height: 100%;
height: 100vh;
display: flex;
flex-direction: column;
background-color: #494949;
border-bottom-right-radius: 850px 600px;

View file

@ -9,6 +9,9 @@
<script src="{% static 'js/xterm/addon-fit.js' %}"></script>
<script src="{% static 'js/socket.io.js' %}"></script>
<style>
#terminal { flex: 1; min-height: 0; }
</style>
{% endblock %}
{% block content %}
@ -17,7 +20,7 @@
<button id="button" type="button" onclick="myFunction();">Connect</button>
</div>
<div style="width: 100%; height:100%;" id="terminal"></div>
<div id="terminal"></div>
<script>
// socketiod is behind this page's own /socket.io/ location; the page's
// signed token is the credential (the cookie holds the last console's)