Skip to content

Commit

Permalink
split?why
Browse files Browse the repository at this point in the history
  • Loading branch information
vickkie committed Mar 27, 2024
1 parent abc39f6 commit 1f5653d
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 32 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,16 +344,16 @@ <h1 class="title-uzi split-chars">Uzitrake</h1>
<main>
<nav class="menu">
<a href="#freetime" class="menu__item">
<span class="split-char menu__item-title">Contact</span>
<span class="split-char menu__item-sub">reach me</span>
<span class="split-char-title menu__item-title">Contact</span>
<span class="split-char-title menu__item-sub">reach me</span>
</a>
<a href="#works" class="menu__item menu-work">
<span class="split-char menu__item-title">Work</span>
<span class="split-char menu__item-sub">cases</span>
<span class="split-char-title menu__item-title">Work</span>
<span class="split-char-title menu__item-sub">cases</span>
</a>
<a href="#contactme " class="menu__item">
<span class="split-char menu__item-title">Socials</span>
<span class="split-char menu__item-sub">follow</span>
<span class="split-char-title menu__item-title">Socials</span>
<span class="split-char-title menu__item-sub">follow</span>
</a>
</nav>
</main>
Expand Down
3 changes: 1 addition & 2 deletions js/distort/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import { MenuItem } from "./menuItem.js";
const splitting = Splitting();

gsap.registerPlugin(SplitText);

document.addEventListener("DOMContentLoaded", () => {
const splitchars = document.querySelectorAll(".split-char");
const splitchars = document.querySelectorAll(".split-char-title");

splitchars.forEach((splitchar) => {
new SplitText(splitchar, {
Expand Down
24 changes: 11 additions & 13 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ if ("serviceWorker" in navigator) {
});
}

// // Call the split text to transform the data-splitting texts to spans of chars
// // Call the split text to transform the splittext gsap texts to spans of chars

// this has been commented out because it is not needed anymore. defined in distort index js
gsap.registerPlugin(SplitText);

// gsap.registerPlugin(SplitText);

// document.addEventListener("DOMContentLoaded", () => {
// const splitchars = selectAll(".split-char");
document.addEventListener("DOMContentLoaded", () => {
const splitchars = selectAll(".split-char");

// splitchars.forEach((splitchar) => {
// new SplitText(splitchar, {
// type: "chars",
// charsClass: "char",
// });
// });
// });
splitchars.forEach((splitchar) => {
new SplitText(splitchar, {
type: "chars",
charsClass: "char",
});
});
});

//Group 1; code to update time
document.addEventListener("DOMContentLoaded", function () {
Expand Down
7 changes: 1 addition & 6 deletions js/works/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { preloadImages, abibae } from "./utils.js";
// import { Cursor } from './cursor.js';
import { Item } from "./item.js";

// Preload images and fonts
Promise.all([preloadImages(".item__img, .content__img")]).then(() => {
// remove loader (loading class)
document.body.classList.remove("loading");

// initialize custom cursor
abibae();
// const cursor = (document.querySelector('.cursor-round'));
document.body.classList.remove("loading");

let itemsArr = [];
[...document.querySelectorAll(".items > .item")].forEach((item) => itemsArr.push(new Item(item, itemsArr)));
Expand Down
2 changes: 1 addition & 1 deletion public/bundle.js

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

2 changes: 1 addition & 1 deletion public/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/distort/index.js

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

Loading

0 comments on commit 1f5653d

Please sign in to comment.