+
diff --git a/js/script.js b/js/script.js
index 6f97a24..96bfb0a 100644
--- a/js/script.js
+++ b/js/script.js
@@ -5,7 +5,7 @@ function setLightMode() {
// Set the theme attribute to light
$(":root").attr("data-theme", "light");
// Change the theme icon to the light theme icon
- $(".theme-icon").attr("src", "images/light-theme.png");
+ // $(".theme-icon").attr("src", "images/light-theme.png");
// Save the theme to local storage
window.localStorage.setItem("data-theme", "light");
}
@@ -17,7 +17,7 @@ function setDarkMode() {
// Set the theme attribute to dark
$(":root").attr("data-theme", "dark");
// Change the theme icon to the dark theme icon
- $(".theme-icon").attr("src", "images/dark-theme.png");
+ // $(".theme-icon").attr("src", "images/dark-theme.png");
// Save the theme to local storage
window.localStorage.setItem("data-theme", "dark");
}
@@ -48,6 +48,30 @@ function loadThemeToggle() {
}
}
+function preloadTheme() {
+ let dataTheme = window.localStorage.getItem("data-theme");
+ if (dataTheme === null) {
+ if (window.matchMedia) {
+ // Check if the dark-mode Media-Query matches
+ if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
+ dataTheme = "dark";
+ } else {
+ dataTheme = "light";
+ }
+ } else {
+ dataTheme = "light";
+ }
+ window.localStorage.setItem("data-theme", dataTheme);
+ }
+ if (dataTheme === "dark") {
+ // Set the theme attribute to dark
+ $(":root").attr("data-theme", "dark");
+ } else {
+ // Set the theme attribute to light
+ $(":root").attr("data-theme", "light");
+ }
+}
+
/**
* Performs the following actions when the page is loaded:
* 1. Highlight the current page in the nav menu
@@ -55,16 +79,15 @@ function loadThemeToggle() {
*/
function loadNav() {
// Determine the current page
- var path = window.location.pathname;
- var page = path.split("/").pop();
- if (page == "" || page == ".") {
- page = "index.html";
- }
+ let path = window.location.pathname;
+ path = path.replace(".html", "");
+ let page = path.split("/").pop();
+ page = page.replace("index", "");
// Highlight the active nav item based on the current page
$("nav > .menu-item").each(function () {
- var href = $(this).attr("href");
- if (page == href) {
+ const href = $(this).attr("href");
+ if ("/" + page === href) {
$(this).addClass("active");
}
});
@@ -93,12 +116,12 @@ function loadScrollBehavior() {
});
// On scroll, hide/show the navbar and theme toggle
- var lastScroll = 0;
- $(window).scroll(function (event) {
+ let lastScroll = 0;
+ $(window).scroll(function (_) {
// Current scroll position
- var current = $(this).scrollTop();
+ const current = $(this).scrollTop();
// Maximum scroll position
- var scrollMax = window.document.body.scrollHeight - window.innerHeight;
+ const scrollMax = window.document.body.scrollHeight - window.innerHeight;
// If the current scroll position is near the top or
// the scroll direction is up and not past the bottom, show the navbar
// Otherwise, if the scroll direction is down, hide the navbar
@@ -129,22 +152,16 @@ function updateSlider(projectname) {
// Hide all other images (opacity 0)
if (i === counter[projectname]) {
// Grab the image at the current counter index and animate it to show
- $(`#${projectname} > :nth-child(${i + 1})`).animate(
- {
- opacity: 1,
- zIndex: 1,
- },
- 500
- );
+ $(`#${projectname} > :nth-child(${i + 1})`).css({
+ zIndex: 1,
+ opacity: 1,
+ });
} else {
// Hide all other images
- $(`#${projectname} > :nth-child(${i + 1})`).animate(
- {
- opacity: 0,
- zIndex: 0,
- },
- 250
- );
+ $(`#${projectname} > :nth-child(${i + 1})`).css({
+ zIndex: 0,
+ opacity: 0,
+ });
}
// Generate the html for the dots below the image
dots += `
- Home
- Experience
- Projects
- Blog
- Testimonials
+ Home
+ Resume
+ Projects
@@ -559,6 +557,16 @@
+ The University of Queensland
+ — Bachelor of Computer Science
+
+
Jan 2021 — Jun 2024
+
+
+ I have recently graduated with a
+ Bachelor of Computer Science, majoring
+ in Programming Languages, at The
+ University of Queensland.
+
+
+ I've gained a comprehensive understanding of
+ algorithms,
+ data structures,
+ software architecture,
+ operating systems, and
+ database systems.
+
+
+ Additionally, my coursework covered topics such as
+ object-oriented programming,
+ functional programming,
+ compilers and interpreters,
+ operating systems and
+ networking.
+
+
+
+
+
Experience
+
+
+ Software Engineer Intern
+ — FPT Software
+
+
+
Jan 2023 — Feb 2023
+
+
+
+ Designed and tested RESTful APIs for a business
+ directory application using Node.js.
+
+
+ Implemented a database schema using MongoDB and
+ integrated it with the application using
+ Node.js.
+
+
+ Improved the application's search functionality
+ by implementing a search feature using
+ ElasticSearch.
+
+
+ Participated in daily stand-up meetings, code
+ reviews, and sprint planning sessions.
+
+
+ Implemented unit tests and participated in
+ integration testing to ensure code quality and
+ reliability.
+
+
+
+
+ Academic Tutor
+ — The University of Queensland
+
+
+
Jul 2023 — Present
+
+
+
Tutor Algorithms & Data Structure course.
+
+ Assisted students in understanding complex
+ concepts and solving problems related to
+ programming languages, algorithms, and data
+ structures.
+
+
+ Conducted tutorial sessions, graded assignments,
+ and provided feedback to students to help them
+ improve their understanding and performance.
+