Add disclaimer and links to footer

dev
gravel 2 years ago
parent d8c1542ba6
commit 529f6e86a8
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -4,10 +4,10 @@
export const dom = { export const dom = {
tbl_communities: () => document.getElementById("tbl_communities"), 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}`), qr_modal: (communityID) => document.getElementById(`modal_${communityID}`),
join_urls: () => document.getElementsByClassName("td_join_url"), join_urls: () => document.getElementsByClassName("td_join_url"),
td_summary: () => document.getElementById("td_summary"), servers_hidden: () => document.getElementById("servers_hidden"),
snackbar: () => document.getElementById("copy-snackbar") snackbar: () => document.getElementById("copy-snackbar")
} }

@ -92,9 +92,8 @@ function hideBadCommunities() {
.reduce((a, b) => a + b); .reduce((a, b) => a + b);
} }
// Not ideal. Separate element should be allocated for content. const summary = dom.servers_hidden();
const summary = dom.td_summary(); summary.innerText = `(${numberOfHiddenCommunities} 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_seconds = seconds_now - last_checked;
const time_passed_in_minutes = const time_passed_in_minutes =
Math.floor(time_passed_in_seconds / 60); // time in minutes, rounded down Math.floor(time_passed_in_seconds / 60); // time in minutes, rounded down
const timestamp_element = dom.td_last_checked(); const timestamp_element = dom.last_checked();
timestamp_element.innerText = timestamp_element.innerText = `${time_passed_in_minutes} minutes`;
`Last checked ${time_passed_in_minutes} minutes ago.`;
} }
/** /**

@ -19,11 +19,23 @@
.copy_button { } .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; } footer p {
#td_last_checked { text-align: center; } width: 75%;
margin: .5em;
text-align: center;
}
footer nav a {
margin: 0 .5ch;
}
/* <Colors> */ /* <Colors> */
:root { :root {

@ -22,18 +22,63 @@
<?php include "+components/qr_modals.php" ?> <?php include "+components/qr_modals.php" ?>
<?php include "+components/tbl_communities.php" ?> <?php include "+components/tbl_communities.php" ?>
<table id="tbl_footer"> <hr>
<tr>
<td id="td_summary"> <footer>
<?=count($rooms_assoc)?> unique Session Communities <p id="server_summary">
on <?=count_servers($rooms_assoc)?> servers have been found. <?=count($rooms_assoc)?> unique Session Communities
</td> on <?=count_servers($rooms_assoc)?> servers have been found.
</tr> <span id="servers_hidden">(None hidden as JS is off)</span>
<tr> </p>
<td id="td_last_checked">Last checked X minutes ago.</td> <p id="last_checked">
</tr> Last checked <span id="last_checked_value"></span> ago.
</table> </p>
<p id="disclaimer">
This site is not affiliated with
<a href="https://optf.ngo">Oxen Tech Privacy Foundation</a>.
<br>
Communities shown are fetched automatically from
various sources.
<br>
We make an attempt to hide communities containing
objectionable or illegal content, but
you should still proceed with caution.
</p>
<noscript>
<p>
This site works fine without JavaScript.
However, some interactive features are
only available with JS enabled.
</p>
</noscript>
<nav>
<a
href="https://lokilocker.com/Mods/Session-Groups/wiki/Session-Closed-Groups"
target="_blank"
title="Closed groups curated by community moderators"
>Closed Groups</a>
<a
href="https://session.directory/"
target="_blank"
title="User-submitted closed groups, communities and user profiles. Not safe for work."
>session.directory</a>
<a
href="https://github.com/oxen-io/session-pysogs"
target="_blank"
title="Information about running a community server"
>Host Your Own Community</a>
<a
href="https://getsession.org/terms-of-service"
target="_blank"
>Session Terms Of Service</a>
<a
href="https://github.com/mdPlusPlus/sessioncommunities.online"
target="_blank"
title="sessioncommunities.online repository on GitHub."
>Source Code & Contact</a>
</nav>
</footer>
<div id="copy-snackbar"> <div id="copy-snackbar">
Copied URL to clipboard. Paste into Session app to join Copied URL to clipboard. Paste into Session app to join

Loading…
Cancel
Save