diff --git a/about-us/index.html b/about-us/index.html
index 9cb330c..f4fc1d2 100644
--- a/about-us/index.html
+++ b/about-us/index.html
@@ -70,7 +70,7 @@
Our Achievements
From winning entry class, to also getting fastest car and best engineered, our team has never dissapointed,
with a plethora of awards to show for our hard and dedicated work. We hope to carry this momentum into Dev
class, where we are planning to continue into the UK Nationals, and if all goes to plan, even Worlds. Read More...
+ href="../our-journey/?id=our-journey" target="_blank">Read More...
diff --git a/assets/js/global.js b/assets/js/global.js
index 5602798..5f12e0e 100644
--- a/assets/js/global.js
+++ b/assets/js/global.js
@@ -3,13 +3,14 @@ let cookieConsentBanner = document.getElementById('cookie-consent-banner');
let acceptAllCookies = document.getElementById('accept-all-cookies');
let onlyFunctionalCookies = document.getElementById('only-functional-cookies');
+let navbar = document.getElementById("navbar");
+
function setCookie(cname, cvalue, exdays) {
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
let expires = "expires=" + d.toUTCString();
-
document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
}
@@ -31,15 +32,24 @@ function getCookie(cname) {
return "";
}
-acceptAllCookies.addEventListener('click', function () {
- setCookie('cookieConsent', true, 365);
- location.reload();
-});
+function getWidth() {
+ return Math.max(
+ document.body.scrollWidth,
+ document.documentElement.scrollWidth,
+ document.body.offsetWidth,
+ document.documentElement.offsetWidth,
+ document.documentElement.clientWidth
+ );
+}
-onlyFunctionalCookies.addEventListener('click', function () {
- setCookie('cookieConsent', false, 365);
- location.reload();
-});
+function scrollToElement() {
+ const params = new URLSearchParams(window.location.search);
+
+ const elementID = params.get("id");
+ const elementY = window.scrollY + document.getElementById(elementID).getBoundingClientRect().top;
+
+ window.scrollTo(0, getWidth() < 1000 ? elementY : elementY - navbar.offsetHeight);
+}
window.addEventListener("load", function () {
let cookieConsent = getCookie('cookieConsent');
@@ -68,4 +78,16 @@ window.addEventListener("load", function () {
} else if (cookieConsent == "") {
cookieConsentBanner.style.display = 'block';
}
+
+ scrollToElement();
+});
+
+acceptAllCookies.addEventListener('click', function () {
+ setCookie('cookieConsent', true, 365);
+ location.reload();
+});
+
+onlyFunctionalCookies.addEventListener('click', function () {
+ setCookie('cookieConsent', false, 365);
+ location.reload();
});
\ No newline at end of file
diff --git a/index.html b/index.html
index a51867a..0fd108f 100644
--- a/index.html
+++ b/index.html
@@ -61,7 +61,8 @@
About Us
WΔRP is a team of five 13-14 year-old boys from Saint Olave's Grammar School, who are competing in the F1 in
Schools competition as a dev class team. We are a team of leaders, innovators, and designers who are
ready to compete in this year's competition. We love STEM based activities, since we believe they provide
- valuable, real-life experience through hands-on-learning. Read
+ valuable, real-life experience through hands-on-learning. Read
More...
@@ -77,7 +78,7 @@ Meet the Team
Abhinav Malladi
Joined: 2021 - 22 Season (Team didn't compete).
Roles: Team Manager / Engineer.
Find
+ href="about-us/?id=abhinav-malladi" target="_blank">Find
out more...
@@ -85,7 +86,7 @@ Abhinav Malladi
Aneeq Weerasinghe
Joined: 2021 - 22 Season (Team didn't compete).
Roles: Portfolio Manager / Verbal
- Presentation / Sponsors.
Find
+ Presentation / Sponsors.
Find
out more...
@@ -93,7 +94,7 @@ Aneeq Weerasinghe
Michael Qu
Joined: After end of 2022 - 23 Season.
Roles: Portfolio / Verbal Presentation.
Find
+ href="about-us/?id=michael-qu" target="_blank">Find
out more...
@@ -101,7 +102,7 @@ Michael Qu
Neal Ye
Joined: 2021 - 22 Season (Team didn't compete).
Roles: Engineer / Graphics.
Find
+ href="about-us/?id=neal-ye" target="_blank">Find
out more...
@@ -109,7 +110,7 @@ Neal Ye
Thomas Howcroft
Joined: After end of 2022 - 23 Season.
Roles: Finance / Portfolio.
Find
+ href="about-us/?id=thomas-howcroft" target="_blank">Find
out more...