From 227f397c06abcd722ea0d6e3d70b453f0da9e37c Mon Sep 17 00:00:00 2001 From: wipedlifepotato Date: Wed, 10 Sep 2025 22:20:36 +0700 Subject: [PATCH 1/2] patch: fix css for webconsole --- contrib/webconsole/hacker.css | 4 +++- contrib/webconsole/style.css | 4 +++- daemon/HTTPServerResources.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/webconsole/hacker.css b/contrib/webconsole/hacker.css index 93baf564..5d93be50 100644 --- a/contrib/webconsole/hacker.css +++ b/contrib/webconsole/hacker.css @@ -98,12 +98,14 @@ a:hover, a.button.selected, .slide label:hover, button[type=submit]:hover { } .content { - float: left; +/* float: left;*/ font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto; + left: 35%; + position: absolute; } .tunnel.established { diff --git a/contrib/webconsole/style.css b/contrib/webconsole/style.css index ea8ffd4f..c3aa4e98 100644 --- a/contrib/webconsole/style.css +++ b/contrib/webconsole/style.css @@ -92,12 +92,14 @@ a.button { } .content { - float: left; +/* float: left;*/ font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto; + left: 35%; + position: absolute; } .tunnel.established { diff --git a/daemon/HTTPServerResources.h b/daemon/HTTPServerResources.h index 1e5b6f75..011475a4 100644 --- a/daemon/HTTPServerResources.h +++ b/daemon/HTTPServerResources.h @@ -45,7 +45,7 @@ namespace http ".menu { display: block; float: left; overflow: hidden; padding: 4px; max-width: 12em; white-space: nowrap; text-overflow: ellipsis ;}\r\n" ".listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n" ".tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap; }\r\n" - ".content { float: left; font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto; }\r\n" + ".content { font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto; position: absolute; left: 35%; }\r\n" ".tunnel.established { color: #56B734; }\r\n" ".tunnel.expiring { color: #D3AE3F; }\r\n" ".tunnel.failed { color: #D33F3F; }\r\n" From 0afce7304cec2b042dc380c86e366b78dcd24c53 Mon Sep 17 00:00:00 2001 From: wipedlifepotato Date: Wed, 10 Sep 2025 22:31:09 +0700 Subject: [PATCH 2/2] fix: fix css for small width size --- contrib/webconsole/style.css | 2 ++ daemon/HTTPServerResources.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/webconsole/style.css b/contrib/webconsole/style.css index c3aa4e98..2f399fea 100644 --- a/contrib/webconsole/style.css +++ b/contrib/webconsole/style.css @@ -232,6 +232,8 @@ input[type=number]::-webkit-inner-spin-button { max-width: 100%; width: 100%; text-align: center; + position: absolute; + left: 0; } a, .slide label { diff --git a/daemon/HTTPServerResources.h b/daemon/HTTPServerResources.h index 011475a4..2772fb69 100644 --- a/daemon/HTTPServerResources.h +++ b/daemon/HTTPServerResources.h @@ -73,7 +73,7 @@ namespace http "@media screen and (max-width: 980px) { body { font: 100%/1.2em sans-serif; padding: 1.2em 0 0 0; }\r\n" " .menu { width: 100%; max-width: unset; display: block; float: none; position: unset; font-size: 16px; text-align: center; }\r\n" " .menu a, .commands a { display: inline-block; padding: 4px; }\r\n" - " .content { float: none; margin-left: unset; margin-top: 16px; max-width: 100%; width: 100%; text-align: center; }\r\n" + " .content { float: none; margin-left: unset; margin-top: 16px; max-width: 100%; width: 100%; text-align: center; position: absolute; left: 0; }\r\n" " a, .slide label { display: block; }\r\n" " .header { margin: unset; font-size: 1.5em; }\r\n" " small { display: block; }\r\n"