fullwidth
This commit is contained in:
parent
e45d4c38a0
commit
8e9b7682b6
3 changed files with 29 additions and 8 deletions
|
@ -68,6 +68,7 @@ async fn get_log_string(container_name: String, state: AppState) -> impl IntoRes
|
|||
follow: false,
|
||||
stdout: true,
|
||||
stderr: true,
|
||||
timestamps: true,
|
||||
..Default::default()
|
||||
}),
|
||||
)
|
||||
|
@ -89,6 +90,7 @@ async fn get_log_stream(container_name: String, state: AppState) -> impl IntoRes
|
|||
follow: true,
|
||||
stdout: true,
|
||||
stderr: true,
|
||||
timestamps: true,
|
||||
..Default::default()
|
||||
}),
|
||||
)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<title>{% block title %}{{ title }} - staxman{% endblock %}</title>
|
||||
<link rel="preconnect" href="https://rsms.me/">
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
<link rel="stylesheet" href="https://iosevka-webfonts.github.io/iosevka/iosevka.css">
|
||||
<style>
|
||||
:root {
|
||||
background-color: #13131E;
|
||||
|
@ -14,6 +15,11 @@
|
|||
font-family: Inter, sans-serif;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: "Iosevka Web", monospace;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
a[href],
|
||||
a[href]:visited {
|
||||
color: #FFC53D;
|
||||
|
@ -25,7 +31,6 @@
|
|||
|
||||
body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
|
@ -57,9 +62,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
body>* {
|
||||
width: 100%;
|
||||
max-width: 1000px;
|
||||
|
||||
main {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
body,
|
||||
html {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
|
@ -39,8 +39,8 @@
|
|||
display: flex;
|
||||
|
||||
display: block;
|
||||
height: 500px;
|
||||
max-height: 50vh;
|
||||
height: 800px;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
|
||||
& .error {
|
||||
|
@ -52,9 +52,10 @@
|
|||
& p {
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
background-color: #1a1c38;
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: #202248;
|
||||
background-color: #212345;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,12 +100,19 @@
|
|||
if ("lines" in data) {
|
||||
data.lines.split("\n").map(line => convert.toHtml(line)).filter(line => line).forEach(line => {
|
||||
const lineEl = document.createElement("p");
|
||||
lineEl.innerHTML = line;
|
||||
lineEl.innerHTML = line.trim();
|
||||
logEl.appendChild(lineEl);
|
||||
lineEl.scrollIntoView();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Fix copying from log (remove double newlines)
|
||||
logEl.addEventListener("copy", (event) => {
|
||||
const selection = document.getSelection();
|
||||
event.clipboardData.setData("text/plain", selection.toString().replace(/\n\n/g, '\n'));
|
||||
event.preventDefault();
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
Reference in a new issue