From 141151bcec56c669b886f06dcdd58b349848571a Mon Sep 17 00:00:00 2001
From: sasha-astiadi
Date: Wed, 10 Sep 2025 16:37:21 +0200
Subject: [PATCH] ok
---
content/home/index.md | 2 +-
static/js/custom.js | 35 ++++++++++++++++++++++++++++++++
templates/partials/benefits.html | 5 +----
templates/partials/hero.html | 10 +++------
templates/partials/invest.html | 3 ---
templates/partials/opcta.html | 1 -
templates/partials/ourpass.html | 3 ---
7 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/content/home/index.md b/content/home/index.md
index 66ceb10..d9fdb12 100644
--- a/content/home/index.md
+++ b/content/home/index.md
@@ -17,7 +17,7 @@ HOMEPAGE (layouts/index.html) contains:
1. Hero section: "partials/hero.html
2. About section: "partials/about1.html"
- 3. Why Choose a Digital Free Zone section: "partials/about.html"
+ 3. Why Choose a Digital Free Zone section: "partials#contact.html"
4. Why ZNZ section: "partials/feature.html
5. Benefits section: "partials/benefits.html"
6. Blog section : "partials/blogs.html"
diff --git a/static/js/custom.js b/static/js/custom.js
index 0abfffc..aa87508 100644
--- a/static/js/custom.js
+++ b/static/js/custom.js
@@ -104,6 +104,31 @@ function toggleFilter() {
filterMenu.className = filterMenu.className + " hidden"
}
}
+// Smooth scrolling function for anchor links
+function smoothScrollToElement(targetId) {
+ const element = document.getElementById(targetId);
+ if (element) {
+ const headerHeight = document.getElementById('header-container') ?
+ document.getElementById('header-container').offsetHeight : 80;
+ const elementPosition = element.offsetTop - headerHeight - 20;
+
+ window.scrollTo({
+ top: elementPosition,
+ behavior: 'smooth'
+ });
+ }
+}
+
+// Handle anchor link clicks
+function handleAnchorClick(event, link) {
+ const href = link.getAttribute('href');
+ if (href && href.startsWith('#')) {
+ event.preventDefault();
+ const targetId = href.substring(1);
+ smoothScrollToElement(targetId);
+ }
+}
+
window.onload = function () {
let elements = document.getElementsByTagName("button");
let buttons = [...elements]
@@ -126,8 +151,18 @@ window.onload = function () {
if (!internal_hosts.includes(links[i].hostname)) {
links[i].target = '_blank';
}
+
+ // Add smooth scrolling for anchor links
+ if (links[i].getAttribute('href') && links[i].getAttribute('href').startsWith('#')) {
+ links[i].addEventListener('click', function(event) {
+ handleAnchorClick(event, this);
+ });
+ }
}
+ // Add smooth scrolling behavior to html element
+ document.documentElement.style.scrollBehavior = 'smooth';
+
document.getElementById("filter-btn").addEventListener('click', toggleFilter);
}
diff --git a/templates/partials/benefits.html b/templates/partials/benefits.html
index 1da25d5..c47379a 100644
--- a/templates/partials/benefits.html
+++ b/templates/partials/benefits.html
@@ -19,13 +19,10 @@
diff --git a/templates/partials/hero.html b/templates/partials/hero.html
index ca112c4..aa787fc 100644
--- a/templates/partials/hero.html
+++ b/templates/partials/hero.html
@@ -12,15 +12,11 @@
Zanzibar Digital Free Zone
Zanzibar Digital Free Zone is a collaboration between the Government of Zanzibar and OurWorld Venture Creator. We are the world's first 100% digital free zone, accessible and affordable for all. Removing complexity from doing business.
-
diff --git a/templates/partials/invest.html b/templates/partials/invest.html
index 30f3d54..33f2fc9 100644
--- a/templates/partials/invest.html
+++ b/templates/partials/invest.html
@@ -17,9 +17,6 @@
OurWorld presents an innovative approach to obtaining global citizenship through strategic investment. SAFE: Safe Investment for Future equity offers a unique pathway for global investors to obtain residency and, eventually, citizenship in multiple countries.
-
diff --git a/templates/partials/opcta.html b/templates/partials/opcta.html
index f193407..184a484 100644
--- a/templates/partials/opcta.html
+++ b/templates/partials/opcta.html
@@ -8,7 +8,6 @@
Take the first step towards becoming a truly global citizen with SAFE. Our team is ready to guide you through every aspect of the Passport By Investment program, ensuring a clear and straightforward path to personal sovereignty.
diff --git a/templates/partials/ourpass.html b/templates/partials/ourpass.html
index 4abab42..1bb4c16 100644
--- a/templates/partials/ourpass.html
+++ b/templates/partials/ourpass.html
@@ -10,9 +10,6 @@
Introducing SAFE
A Unique Approach to Global Citizenship
OurWorld presents SAFE: an innovative approach to obtaining global citizenship through strategic investment. The Venture Creator Passport Program offers a unique pathway for global investors to obtain residency and, eventually, citizenship in multiple countries.
-