From 285e2dac45723f9446c007ba927f0d17ed236f49 Mon Sep 17 00:00:00 2001 From: M Sarmad Qadeer Date: Thu, 18 Aug 2022 21:21:49 +0500 Subject: [PATCH] add navigation --- website/src/_includes/layouts/article.html | 19 ++++++++++-- website/src/blog.html | 23 +++++++++++++-- website/src/contact/index.html | 6 ++++ website/src/css/blog.css | 13 +++++++++ website/src/css/style.css | 34 ++++++++++++++++++++++ website/src/index.html | 25 +++++++++++++--- website/src/invitation/index.html | 20 +++++++++++-- website/src/js/script.js | 8 +++++ 8 files changed, 135 insertions(+), 13 deletions(-) create mode 100644 website/src/css/style.css create mode 100644 website/src/js/script.js diff --git a/website/src/_includes/layouts/article.html b/website/src/_includes/layouts/article.html index 05c3bd0c09..73b2349e81 100644 --- a/website/src/_includes/layouts/article.html +++ b/website/src/_includes/layouts/article.html @@ -16,9 +16,17 @@
+
+ Whitepaper + Comparison + Blog +
{{ content | safe }}
diff --git a/website/src/blog.html b/website/src/blog.html index 107c502be1..cfe4696f6a 100644 --- a/website/src/blog.html +++ b/website/src/blog.html @@ -6,6 +6,7 @@ + Blogs @@ -13,9 +14,17 @@
+ +
{% for blog in collections.blogs %}
@@ -65,5 +80,7 @@ + + \ No newline at end of file diff --git a/website/src/contact/index.html b/website/src/contact/index.html index 94181777c2..9f629d96aa 100644 --- a/website/src/contact/index.html +++ b/website/src/contact/index.html @@ -14,6 +14,7 @@ + @@ -44,6 +45,11 @@ +
diff --git a/website/src/css/blog.css b/website/src/css/blog.css index 5d2b394781..30d49f836a 100644 --- a/website/src/css/blog.css +++ b/website/src/css/blog.css @@ -74,3 +74,16 @@ h3::before { visibility: hidden; pointer-events: none; } + +@media screen and (max-width: 1024px) { + h1::before, + h2::before, + h3::before { + display: block; + content: " "; + margin-top: -125px; + height: 125px; + visibility: hidden; + pointer-events: none; + } +} \ No newline at end of file diff --git a/website/src/css/style.css b/website/src/css/style.css new file mode 100644 index 0000000000..a11ae709d1 --- /dev/null +++ b/website/src/css/style.css @@ -0,0 +1,34 @@ +html { + scroll-behavior: smooth; +} + +h1::before, +h2::before, +h3::before +#comparison::before { + display: block; + content: " "; + margin-top: -80px; + height: 100px; + visibility: hidden; + pointer-events: none; +} + +@media screen and (max-width: 1024px) { + h1::before, + h2::before, + h3::before + #comparison::before { + display: block; + content: " "; + margin-top: -125px; + height: 205px; + visibility: hidden; + pointer-events: none; + } +} + +.nav-button-active{ + background-color: #00C8FB; + color: #fff; +} \ No newline at end of file diff --git a/website/src/index.html b/website/src/index.html index e800eda66a..a36b52d94a 100644 --- a/website/src/index.html +++ b/website/src/index.html @@ -19,6 +19,8 @@ + + @@ -28,9 +30,17 @@
+ -
+

SimpleX Chat

Private & encrypted - the only platform without user identifiers!

@@ -443,6 +458,8 @@
+ + diff --git a/website/src/invitation/index.html b/website/src/invitation/index.html index c4255d9ac9..8525a2dd93 100644 --- a/website/src/invitation/index.html +++ b/website/src/invitation/index.html @@ -15,6 +15,7 @@ + @@ -22,9 +23,17 @@
+
diff --git a/website/src/js/script.js b/website/src/js/script.js new file mode 100644 index 0000000000..84ede67c05 --- /dev/null +++ b/website/src/js/script.js @@ -0,0 +1,8 @@ +console.log(window.location.href) +if(window.location.href.includes('comparison')){ + console.log('Comparison'); + document.querySelector('.comparison-nav-btn').classList.add('nav-button-active'); +} +else if(window.location.href.includes('blog')){ + document.querySelector('.blog-nav-btn').classList.add('nav-button-active'); +} \ No newline at end of file