From 8dd6b6b52ae6bb1b757a0bf9948edec81bcc04ec Mon Sep 17 00:00:00 2001
From: Jumachaje <73429193+Jumanjigobez@users.noreply.github.com>
Date: Wed, 4 Sep 2024 19:33:11 +0300
Subject: [PATCH] Removal of Jquery library
---
index.html | 9 +++------
script/script.js | 13 +++++++------
style/style.css | 39 ++++++++++++++++++++++++++++++++++++++-
3 files changed, 48 insertions(+), 13 deletions(-)
diff --git a/index.html b/index.html
index e847971..33b7d8a 100644
--- a/index.html
+++ b/index.html
@@ -4,23 +4,20 @@
Juma Chaje | Personal Portfolio Website
-
+
-
+
{
return document.getElementById(x);
};
@@ -10,15 +10,16 @@ var text = elem("text");
loader = () => {
let count = setInterval(function () {
- var c = parseInt($(".counter").text());
- $(".counter").text((++c).toString());
+ var c = parseInt(counter.innerText);
+ counter.innerText = `${(++c).toString()}`;
if (c == 100) {
clearInterval(count);
counter.classList.add("hide");
- $(text).fadeIn(1000);
-
- $(text).fadeOut(2000);
+ // $(text).fadeIn(1000);
+ text.classList.add("fadeIn");
+ // $(text).fadeOut(2000);
+ text.classList.add("fadeOut");
preloader.classList.add("active");
//Get Visitor's name
diff --git a/style/style.css b/style/style.css
index 966f6c0..839f39e 100644
--- a/style/style.css
+++ b/style/style.css
@@ -75,12 +75,44 @@ main {
font-size: 0.5em;
}
.text {
- display: none;
+ opacity: 0;
font-size: 25px;
font-weight: 700;
letter-spacing: 5px;
margin: 10px;
+ transition: all 0.3s linear;
}
+.text.fadeIn {
+ animation: fadeIn 0.5s linear;
+}
+.text.fadeOut {
+ animation: fadeOut 1s linear;
+}
+
+@keyframes fadeIn {
+ 0% {
+ opacity: 0;
+ }
+ 50% {
+ opacity: 50%;
+ }
+ 100% {
+ opacity: 100%;
+ }
+}
+
+@keyframes fadeOut {
+ 0% {
+ opacity: 100%;
+ }
+ 50% {
+ opacity: 50%;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+
.text span {
color: limegreen;
}
@@ -193,6 +225,11 @@ main {
#visitor {
color: var(--theme-color-dark);
font-weight: 700;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: inline-flex;
+ max-width: 200px;
}
.typing_part {
margin-top: -5rem;