From 529f6e86a8330919ea5443e6150acb28cc731307 Mon Sep 17 00:00:00 2001 From: gravel Date: Sun, 22 Jan 2023 18:45:34 +0000 Subject: [PATCH] Add disclaimer and links to footer --- output/js/constants.js | 4 +-- output/main.js | 10 +++--- output/styles2.css | 18 +++++++++-- sites/index.php | 69 ++++++++++++++++++++++++++++++++++-------- 4 files changed, 78 insertions(+), 23 deletions(-) diff --git a/output/js/constants.js b/output/js/constants.js index 82b89c4..f313728 100644 --- a/output/js/constants.js +++ b/output/js/constants.js @@ -4,10 +4,10 @@ export const dom = { tbl_communities: () => document.getElementById("tbl_communities"), - td_last_checked: () => document.getElementById("td_last_checked"), + last_checked: () => document.getElementById("last_checked_value"), qr_modal: (communityID) => document.getElementById(`modal_${communityID}`), join_urls: () => document.getElementsByClassName("td_join_url"), - td_summary: () => document.getElementById("td_summary"), + servers_hidden: () => document.getElementById("servers_hidden"), snackbar: () => document.getElementById("copy-snackbar") } diff --git a/output/main.js b/output/main.js index 38a7a46..5580094 100644 --- a/output/main.js +++ b/output/main.js @@ -92,9 +92,8 @@ function hideBadCommunities() { .reduce((a, b) => a + b); } - // Not ideal. Separate element should be allocated for content. - const summary = dom.td_summary(); - summary.innerText += ` (${numberOfHiddenCommunities} hidden)`; + const summary = dom.servers_hidden(); + summary.innerText = `(${numberOfHiddenCommunities} hidden)`; } /** @@ -131,9 +130,8 @@ function setLastChecked(last_checked) { const time_passed_in_seconds = seconds_now - last_checked; const time_passed_in_minutes = Math.floor(time_passed_in_seconds / 60); // time in minutes, rounded down - const timestamp_element = dom.td_last_checked(); - timestamp_element.innerText = - `Last checked ${time_passed_in_minutes} minutes ago.`; + const timestamp_element = dom.last_checked(); + timestamp_element.innerText = `${time_passed_in_minutes} minutes`; } /** diff --git a/output/styles2.css b/output/styles2.css index e66d4a1..4a9843b 100644 --- a/output/styles2.css +++ b/output/styles2.css @@ -19,11 +19,23 @@ .copy_button { } -#tbl_footer { width:100%; } +footer { + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + text-align: center; +} -#td_summary { text-align: center; } -#td_last_checked { text-align: center; } +footer p { + width: 75%; + margin: .5em; + text-align: center; +} +footer nav a { + margin: 0 .5ch; +} /* */ :root { diff --git a/sites/index.php b/sites/index.php index f0d7092..3d58e78 100644 --- a/sites/index.php +++ b/sites/index.php @@ -22,18 +22,63 @@ - - - - - - - - - + +
+ +
+

+ unique Session Communities + on servers have been found. + (None hidden as JS is off) +

+

+ Last checked ago. +

+

+ This site is not affiliated with + Oxen Tech Privacy Foundation. +
+ Communities shown are fetched automatically from + various sources. +
+ We make an attempt to hide communities containing + objectionable or illegal content, but + you should still proceed with caution. +

+ + +
Copied URL to clipboard. Paste into Session app to join