From 0973338dbd24ff914ad8e5694b61f0c6c706c1d9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 11 Apr 2022 02:55:56 +0200 Subject: index.html: use flexbox for header Drop the weird workaround. Also, make the power buttons stack vertically on my phone. --- html/index.html | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/html/index.html b/html/index.html index a116867..659b3b4 100644 --- a/html/index.html +++ b/html/index.html @@ -10,13 +10,15 @@
-

-

-

refreshed every - seconds

-
-
-
- Reboot - Shutdown +
+
+

-

+

refreshed every - seconds

+
+
@@ -342,6 +344,18 @@ function main() { $(function() { main(); }); + +function on_resize(width) { + if (width < 576) { // xs, in Bootstrap's terms + $('#power_buttons').attr('class', 'btn-group-vertical'); + } else { + $('#power_buttons').attr('class', 'btn-group'); + } +} + +$(window).bind('resize', function() { + on_resize($(this).width()); +}).trigger('resize'); -- cgit v1.2.3