From f5670c39da27be6a6775d4c0f02c24cbc17758a1 Mon Sep 17 00:00:00 2001 From: M Sarmad Qadeer Date: Tue, 7 Mar 2023 03:25:54 +0500 Subject: [PATCH] website: add support for overlay hash in URL (#1974) * website: add support for overlay hash in URL * website: update the overlay hashes * website: fix the ui of donate button in join simplex section * website: make the text selectable of unique & explained swiper * scroll to popup context --------- Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> --- website/src/_data/hero_overlays.json | 8 ++- .../src/_data/simplex_network_overlay.json | 5 +- website/src/_data/why_privacy_matters.json | 11 ++-- website/src/_data/why_simplex_is_unique.json | 14 ++-- website/src/_includes/components/macro.njk | 2 +- .../src/_includes/sections/join_simplex.html | 2 +- website/src/index.html | 2 +- website/src/js/script.js | 65 ++++++++++++++----- 8 files changed, 77 insertions(+), 32 deletions(-) diff --git a/website/src/_data/hero_overlays.json b/website/src/_data/hero_overlays.json index f8d12427f6..d50ba0db68 100644 --- a/website/src/_data/hero_overlays.json +++ b/website/src/_data/hero_overlays.json @@ -5,7 +5,8 @@ "imgLight": "/img/new/explained-2.svg", "imgDark": "/img/new/explained-2.svg", "overlayContent": { - "overlayId": "hero-overlay-1", + "overlayId": "how-simplex-works", + "overlayScrollTo": "", "title": "hero-overlay-1-title", "showImage": true, "contentBody": "overlay_content/hero/card_1.html" @@ -16,11 +17,12 @@ "imgLight": "/img/new/explained-1.svg", "imgDark": "/img/new/explained-1.svg", "overlayContent": { - "overlayId": "hero-overlay-2", + "overlayId": "why-ids-bad-for-privacy", + "overlayScrollTo": "", "title": "hero-overlay-2-title", "showImage": true, "contentBody": "overlay_content/hero/card_2.html" } } ] -} +} \ No newline at end of file diff --git a/website/src/_data/simplex_network_overlay.json b/website/src/_data/simplex_network_overlay.json index 8e3df75e07..ee86310ba0 100644 --- a/website/src/_data/simplex_network_overlay.json +++ b/website/src/_data/simplex_network_overlay.json @@ -5,11 +5,12 @@ "imgLight": "/img/new/network-1.svg", "imgDark": "/img/new/network-1-dark.svg", "overlayContent": { - "overlayId": "simplex-network-overlay-1", + "overlayId": "comparison-with-p2p-protocols", + "overlayScrollTo": "network", "title": "simplex-network-overlay-1-title", "showImage": true, "contentBody": "overlay_content/simplex_network/card_1.html" } } ] -} +} \ No newline at end of file diff --git a/website/src/_data/why_privacy_matters.json b/website/src/_data/why_privacy_matters.json index 7072cc010a..8f7305363b 100644 --- a/website/src/_data/why_privacy_matters.json +++ b/website/src/_data/why_privacy_matters.json @@ -6,7 +6,8 @@ "imgLight": "/img/new/privacy-section-1.svg", "imgDark": "/img/new/privacy-section-1.svg", "overlayContent": { - "overlayId": "why-privacy-matters-1", + "overlayId": "privacy-saves-money", + "overlayScrollTo": "why-privacy", "title": "privacy-matters-1-overlay-1-title", "linkText": "privacy-matters-1-overlay-1-linkText", "showImage": false, @@ -19,7 +20,8 @@ "imgLight": "/img/new/privacy-section-2.svg", "imgDark": "/img/new/privacy-section-2.svg", "overlayContent": { - "overlayId": "why-privacy-matters-2", + "overlayId": "privacy-gives-power", + "overlayScrollTo": "why-privacy", "title": "privacy-matters-2-overlay-1-title", "linkText": "privacy-matters-2-overlay-1-linkText", "showImage": false, @@ -32,7 +34,8 @@ "imgLight": "/img/new/privacy-section-3.svg", "imgDark": "/img/new/privacy-section-3.svg", "overlayContent": { - "overlayId": "why-privacy-matters-3", + "overlayId": "privacy-protects-freedom", + "overlayScrollTo": "why-privacy", "title": "privacy-matters-3-overlay-1-title", "linkText": "privacy-matters-3-overlay-1-linkText", "showImage": false, @@ -40,4 +43,4 @@ } } ] -} +} \ No newline at end of file diff --git a/website/src/_data/why_simplex_is_unique.json b/website/src/_data/why_simplex_is_unique.json index 601c7e95e3..2ee986abc0 100644 --- a/website/src/_data/why_simplex_is_unique.json +++ b/website/src/_data/why_simplex_is_unique.json @@ -7,7 +7,8 @@ "imgLight": "/img/new/unique-section-1.png", "imgDark": "/img/new/unique-section-1-dark.png", "overlayContent": { - "overlayId": "why-simplex-is-unique-1", + "overlayId": "privacy-of-identity-contacts-metadata", + "overlayScrollTo": "why-simplex", "title": "simplex-unique-1-overlay-1-title", "showImage": true, "contentBody": "overlay_content/why_simplex_is_unique/card_1.html" @@ -20,7 +21,8 @@ "imgLight": "/img/new/unique-section-2.png", "imgDark": "/img/new/unique-section-2-dark.png", "overlayContent": { - "overlayId": "why-simplex-is-unique-2", + "overlayId": "protection-from-spam-and-abuse", + "overlayScrollTo": "why-simplex", "title": "simplex-unique-2-overlay-1-title", "showImage": true, "contentBody": "overlay_content/why_simplex_is_unique/card_2.html" @@ -33,7 +35,8 @@ "imgLight": "/img/new/unique-section-3.png", "imgDark": "/img/new/unique-section-3-dark.png", "overlayContent": { - "overlayId": "why-simplex-is-unique-3", + "overlayId": "you-control-your-data", + "overlayScrollTo": "why-simplex", "title": "simplex-unique-3-overlay-1-title", "showImage": true, "contentBody": "overlay_content/why_simplex_is_unique/card_3.html" @@ -46,11 +49,12 @@ "imgLight": "/img/new/unique-section-4.png", "imgDark": "/img/new/unique-section-4-dark.png", "overlayContent": { - "overlayId": "why-simplex-is-unique-4", + "overlayId": "you-own-simplex-network", + "overlayScrollTo": "why-simplex", "title": "simplex-unique-4-overlay-1-title", "showImage": true, "contentBody": "overlay_content/why_simplex_is_unique/card_4.html" } } ] -} +} \ No newline at end of file diff --git a/website/src/_includes/components/macro.njk b/website/src/_includes/components/macro.njk index 1499486890..bfcbb6a435 100644 --- a/website/src/_includes/components/macro.njk +++ b/website/src/_includes/components/macro.njk @@ -1,6 +1,6 @@ {% macro overlay(section, lang='en') %} {# Overlay is either hidder or flex #} -