Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshvdw committed Dec 9, 2024
1 parent 0d2f5da commit 6de8afb
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 249 deletions.
10 changes: 2 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
import aboutLottie from "./js/global/about/aboutLottie";
import copyEmail from "./js/global/copyEmail";
import initCms from "./js/global/initCms";
import logCareers from "./js/global/logCareers";
import { loopLogoLoading, readyPreloader } from "./js/global/preloader";
import initProjectLotties from "./js/global/projectLotties";
import loadAnim from "./js/home/loadAnim";
import setLogoHref from "./js/pitches/setLogoHref";
import audioImplementation from "./js/global/audio";
import { showreelHome, showreelNav } from "./js/global/showreel";
import { stopCmdClick } from "./js/global/bugFixes";
// import setLogoHref from "./js/pitches/setLogoHref";

const parceled = true; // for checking localhost vs github pages / CDN
const currentPage = window.location.pathname;
const homePage = currentPage == "/";

const onReady = () => {
// alert("local");
readyPreloader(); // hides preloader and add event listener for frog lottie
const page = window.location.pathname.split("/").pop();
const audio = audioImplementation(homePage); // adds music, ui-sounds and mute-lottie functionality
if (homePage) showreelHome(audio); // code for homepage showreel video
showreelNav(audio); // code for nav showreel video
// logCareers(); // logs a frog and message to the console
initProjectLotties(); // initiates project lotties for home and work pages
copyEmail(); // copies email to clipboard in footer
initCms(); // sets color hovers and cms filtering style for work page & content hub
document.querySelector(".landing-video-container") && loadAnim(); // for home page intro anim
document.querySelector(".client-link") && setLogoHref();
// document.querySelector(".client-link") && setLogoHref();
document.querySelectorAll(".article-rich-text a").forEach((e) => {
e.target = "_blank";
});
// page == "about" && aboutLottie();
stopCmdClick(); // prevent command click from triggering page transition
};

Expand Down
242 changes: 51 additions & 191 deletions dist/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/app.js.map

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6de8afb

Please sign in to comment.