From 495163060de5c1509b7c8381e2c9aa83d9c5fd43 Mon Sep 17 00:00:00 2001 From: jedi Date: Tue, 3 Aug 2021 02:02:48 +0200 Subject: [PATCH] switch to css only paging --- firmware/fsdata/fs/css/style.css | 19 ++++--------------- firmware/fsdata/fs/index.html | 8 ++------ 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/firmware/fsdata/fs/css/style.css b/firmware/fsdata/fs/css/style.css index a26dda5..0e0e33a 100644 --- a/firmware/fsdata/fs/css/style.css +++ b/firmware/fsdata/fs/css/style.css @@ -5,28 +5,17 @@ main { margin-left: auto; margin-right: auto; } -section { - display: none; -} canvas{ width: 100%; } -main[data-page="dashboard"] section[id="dashboard"] { - display: block; +main section:target ~ section, main section#io, main section#wifi, main section#ota { + display: none; } -main[data-page="ota"] section[id="ota"] { - display: block; -} - -main[data-page="wifi"] section[id="wifi"] { - display: block; -} - -main[data-page="io"] section[id="io"] { - display: block; +main section:target{ + display: block !important; } .table { diff --git a/firmware/fsdata/fs/index.html b/firmware/fsdata/fs/index.html index 7d3fcdb..2244e40 100644 --- a/firmware/fsdata/fs/index.html +++ b/firmware/fsdata/fs/index.html @@ -15,10 +15,10 @@ -
+

Status

@@ -152,10 +152,6 @@ return pos; }; - function use_page(name) { - section.dataset.page = name; - } - var ws; var retries; var series = new TimeSeries();