From ea66a52bff41660d4532319a59463c0c4cc83fe1 Mon Sep 17 00:00:00 2001 From: Pritam Date: Wed, 25 Oct 2023 11:38:13 +0530 Subject: [PATCH 1/3] make a smooth routing of navbar and add contact --- contact.html | 42 +----- index.html | 367 +++------------------------------------------- indexcon.html | 354 ++++++++++++++++++++++++++++++++++++++++++++ scripts/router.js | 25 ++++ 4 files changed, 400 insertions(+), 388 deletions(-) create mode 100644 indexcon.html create mode 100644 scripts/router.js diff --git a/contact.html b/contact.html index 67789e5..47f6bad 100644 --- a/contact.html +++ b/contact.html @@ -25,47 +25,7 @@ - +

Contact Us

diff --git a/index.html b/index.html index 232e8f9..5e0dcb7 100644 --- a/index.html +++ b/index.html @@ -22,8 +22,8 @@ -
- - - -
-
-
-
-

Create
Whatsapp Links

-

Best Website to create Whatsapp Links

-

Skip the hassle of saving the number
Message directly through our website. -
We're justย aย clickย away!

- -
- -
-
-
- - -
-
-
-
-

Enter Details ๐Ÿš€

- - -
-
- -
-
- -
-
-
Cannot be blank -
-
- Don't worry we never store anyone's mobile number -
-
-
- - -
- -
- -
- -
-
- -
-
- -
+ +
-
- - -
- -
- - - - - -
-
Copyright © 2023 WhiSave ®
-
- + + + - + \ No newline at end of file diff --git a/indexcon.html b/indexcon.html new file mode 100644 index 0000000..cd969f0 --- /dev/null +++ b/indexcon.html @@ -0,0 +1,354 @@ + + +
+
+
+
+

Create
Whatsapp Links

+

Best Website to create Whatsapp Links

+

Skip the hassle of saving the number
Message directly through our website. +
We're justย aย clickย away!

+ +
+ +
+
+
+ + +
+
+
+
+
+

Enter Details ๐Ÿš€

+ + +
+
+ +
+
+ +
+
+
Cannot be blank +
+
+ Don't worry we never store anyone's mobile number +
+ + + +
+
+ + +
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + + + + +
+
Copyright © 2023 WhiSave ®
+
+ + + + \ No newline at end of file diff --git a/scripts/router.js b/scripts/router.js new file mode 100644 index 0000000..8b5aeb2 --- /dev/null +++ b/scripts/router.js @@ -0,0 +1,25 @@ +const route = (event) => { + event = event || window.event; + event.preventDefault(); + window.history.pushState({}, "", event.target.href); + handleLocation(); +}; + +const routes = { + + "/": "indexcon.html", + "/contact": "contact.html", + +}; + +const handleLocation = async () => { + const path = window.location.pathname; + const route = routes[path]; + const html = await fetch(route).then((data) => data.text()); + document.getElementById("main-page").innerHTML = html; +}; + +window.onpopstate = handleLocation; +window.route = route; + +handleLocation(); \ No newline at end of file From 192266946fb8ec8c4135760fd89935fec5719381 Mon Sep 17 00:00:00 2001 From: Pritam Date: Wed, 25 Oct 2023 11:42:26 +0530 Subject: [PATCH 2/3] just make the router script suntax at last --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 5e0dcb7..761d27a 100644 --- a/index.html +++ b/index.html @@ -59,13 +59,14 @@
- + + From 5f8c386b311e3bce5271a9034dd54927e4ffda62 Mon Sep 17 00:00:00 2001 From: Pritam Date: Wed, 25 Oct 2023 11:53:07 +0530 Subject: [PATCH 3/3] added contact us on nav and make smooth routing --- contact.html | 2 - index.html | 309 +-------------------------------------------------- 2 files changed, 2 insertions(+), 309 deletions(-) diff --git a/contact.html b/contact.html index 47f6bad..6428498 100644 --- a/contact.html +++ b/contact.html @@ -25,8 +25,6 @@ - -

Contact Us

diff --git a/index.html b/index.html index b8c06a6..c980afc 100644 --- a/index.html +++ b/index.html @@ -58,322 +58,17 @@
- -
-
-
-
-

Create
Whatsapp Links

-

Best Website to create Whatsapp Links

-

Skip the hassle of saving the number
Message directly through our website. -
We're justย aย clickย away!

- -
- -
-
-
- - -
-
-
-
-
-

Enter Details ๐Ÿš€

- - -
-
- -
-
- -
-
-
Cannot be blank -
-
- Don't worry we never store anyone's mobile number -
- - - -
-
- - -
- -
- -
- -
-
-
-
-
-
-
-
-
-
-
- -
- -
-
- -
-
- - - -
-
- + - +