From ea54b588fbe06ebff6ff0a0bc24655b1b50b98bb Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 07:56:00 +0100 Subject: [PATCH 1/8] chore: update js dependencies --- web/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/index.html b/web/index.html index 2bbc209e64f9..9a48a45635e8 100644 --- a/web/index.html +++ b/web/index.html @@ -3,10 +3,10 @@ Flathub Stats - - - - + + + + From e2fbb506dca10c084877a74f07b12418a3466c43 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 08:17:00 +0100 Subject: [PATCH 2/8] feat: add dark mode --- web/index.html | 3 +++ web/style.css | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 web/style.css diff --git a/web/index.html b/web/index.html index 9a48a45635e8..5cfbed9078bb 100644 --- a/web/index.html +++ b/web/index.html @@ -6,8 +6,11 @@ + + + diff --git a/web/style.css b/web/style.css new file mode 100644 index 000000000000..f181d4981ce3 --- /dev/null +++ b/web/style.css @@ -0,0 +1,3 @@ +html { + color-scheme: light dark; +} From 06e8c1ce3ae72a8895095d433cc834d1789bc5c9 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 08:25:05 +0100 Subject: [PATCH 3/8] feat: no more body scrolling --- web/index.html | 45 ++++++++++++++++++++++++--------------------- web/style.css | 14 ++++++++++++++ 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/web/index.html b/web/index.html index 5cfbed9078bb..f8c9dcbe2b9d 100644 --- a/web/index.html +++ b/web/index.html @@ -22,29 +22,32 @@ {"description":"Stats of flathub.org","@type":"WebSite","headline":"Flathub Stats","url":"https://klausenbusk.github.io/flathub-stats/","name":"Flathub Stats","@context":"https://schema.org"} - - - - -

+
+ + + + +

+
- -
+
-
+ - https://github.com/klausenbusk/flathub-stats -
- * An update is sometimes reported as an install + diff --git a/web/style.css b/web/style.css index f181d4981ce3..050ed3e34f0f 100644 --- a/web/style.css +++ b/web/style.css @@ -1,3 +1,17 @@ html { color-scheme: light dark; } +html, body { + height: 100%; + margin: 0; + padding: 0; +} +body { + display: flex; + flex-flow: column nowrap; +} +main { + display: flex; + flex: 1; + align-items: center; +} From 011732f78c25576dfd7acb4e94e477f2f31c4f08 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 08:32:04 +0100 Subject: [PATCH 4/8] feat: add bg to header and footer --- web/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/style.css b/web/style.css index 050ed3e34f0f..f4955ccd68ef 100644 --- a/web/style.css +++ b/web/style.css @@ -15,3 +15,9 @@ main { flex: 1; align-items: center; } + +header, +footer { + background: rgba(100, 100, 100, 0.1); + padding: 1rem; +} From 17c180054e5b1a3020150d6edeeda89c510cecf8 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 08:56:46 +0100 Subject: [PATCH 5/8] fix: height overflow on wide screens --- web/style.css | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/style.css b/web/style.css index f4955ccd68ef..b8df81a23652 100644 --- a/web/style.css +++ b/web/style.css @@ -12,12 +12,18 @@ body { } main { display: flex; - flex: 1; + flex: 0 1 100%; align-items: center; + justify-content: center; +} +main canvas { + max-width: 100%; + max-height: 100%; } header, footer { + flex: 0 0 auto; background: rgba(100, 100, 100, 0.1); padding: 1rem; } From a46551d12c4a9c28fbc09e5cb9ed42ee43ffff04 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 09:18:57 +0100 Subject: [PATCH 6/8] feat: make graph less "sharp" --- web/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/script.js b/web/script.js index 75ee897fe781..2a64fad26d76 100644 --- a/web/script.js +++ b/web/script.js @@ -14,6 +14,10 @@ function initChart() { // Configuration options go here options: { + tension: 0.5, + borderCapStyle: "round", + borderJoinStyle: "round", + scales: { x: { type: "time", @@ -65,7 +69,7 @@ function updateDatasets() { let color = chartColors.pop(); datasets[arch] = { label: arch, - backgroundColor: Chart.helpers.color(color).alpha(0.5).rgbString(), + backgroundColor: Chart.helpers.color(color).alpha(0.2).rgbString(), borderColor: color, fill: true, data: [] From 210283d56b1d6ab4328f557dd770d85ba0830463 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Sun, 7 Apr 2024 13:16:06 +0100 Subject: [PATCH 7/8] feat: allow changing granularity --- web/index.html | 6 ++++++ web/script.js | 39 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/web/index.html b/web/index.html index f8c9dcbe2b9d..7a3ed3194c67 100644 --- a/web/index.html +++ b/web/index.html @@ -32,6 +32,12 @@ +