Skip to content

Commit b996d95

Browse files
committed
add a call to action against the Online Safety Act for UK visitors
Signed-off-by: stadust <[email protected]>
1 parent 05cb7b3 commit b996d95

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pointercrate-core-api/src/response.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ impl<'r, 'o: 'r> Responder<'r, 'o> for Page {
6363

6464
let fragment = self.0;
6565

66+
let is_uk = request.headers().get_one("CF-IPCountry").map(|c| c == "GB").unwrap_or(false);
67+
6668
let rendered_fragment = html! {
6769
(DOCTYPE)
6870
html lang=(lang_id) prefix="og: http://opg.me/ns#" {
@@ -73,6 +75,13 @@ impl<'r, 'o: 'r> Responder<'r, 'o> for Page {
7375
body {
7476
div.content {
7577
(nav_bar)
78+
@if is_uk {
79+
nav.red style="height:auto; font-weight: bolder; position: relative; z-index: 100" {
80+
marquee scrolldelay = "60" {
81+
"Stand for a free internet, and the right to privacy and anonymity! " a.link href = "https://petition.parliament.uk/petitions/722903" style = "color: var(--color-error-bg)" {"Call"} " upon the UK government to repeal the " a.link href = "https://www.openrightsgroup.org/campaign/online-safety-bill-campaign-hub/" style = "color: var(--color-error-bg)" {"Online Safety Act!"} " Don't give up your privacy, use a " a.link href = "https://protonvpn.com/free-vpn" style = "color: var(--color-error-bg)" {"VPN!"}
82+
}
83+
}
84+
}
7685
(fragment.body)
7786
div #bg {}
7887
}

0 commit comments

Comments
 (0)