Flat Preloader Icon
<div class="c-preloader">
	<div class="c-preloader__count"></div>
  <div class="c-preloader__progress"></div>
</div>
.bricks-is-frontend .c-preloader {
  position: fixed;
  top: 0;
  left: 0;
  background: #cc0000;
  width: 100%;
  height: 100vh;
  z-index: 10;
}
.bricks-is-frontend .c-preloader__count {
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
font-size: clamp(4rem, 3.824vw + 2.776rem, 8rem);
  font-weight: 100;
  letter-spacing: -.5rem;
  z-index: 10;
}
.bricks-is-frontend .c-preloader__progress {
  background: black;
  height: 100%;
  width: 0%;
  position: absolute;
  top: 0;
  left: 0;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.3/TweenMax.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/4.1.4/imagesloaded.pkgd.min.js"></script>

<script>
  
var imgLoad = imagesLoaded('img');

var progressBar = jQuery(".c-preloader__progress"),
    count = jQuery(".c-preloader__count"),
    images = jQuery("img").length,
    loadedCount = 0,
    loadingProgress = 0;
 
var tlProgress = new TimelineMax({
    paused: true,
    onUpdate: countPercent,
    onComplete: loadComplete
});

tlProgress.to(progressBar, 1, {width:"100%"});

imgLoad.on('progress', function(instance, image) {
    loadProgress();
});
 
function loadProgress() {
    loadedCount++;
    loadingProgress = (loadedCount / images);
    console.log(loadingProgress);

    TweenMax.to(tlProgress, 1, {progress: loadingProgress});
}

function countPercent() {
    var newPercent = (tlProgress.progress() * 100).toFixed();
    count.text(newPercent + "%");
}

function loadComplete() {
    var tlEnd = new TimelineMax();
    tlEnd
        .to(count, 0.5, {autoAlpha: 0})
        .to(".c-preloader", 0.5, {scaleX: 0, transformOrigin: "center right"});
}

</script>
/* Default state: transparent background */
#brx-header.sticky {
  position: sticky;
  top: 0;
  transition: opacity 0.5s ease, background-color 0.5s ease;
  opacity: 1;
  visibility: visible;
  background-color: transparent !important; /* Start with transparent background */
}

/* Hidden state when scrolling down */
#brx-header.sticky.nav-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background-color: transparent !important; /* Stay transparent when hidden */
}

/* Visible state when scrolling up: background becomes black */
#brx-header.sticky.nav-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  background-color: rgba(0, 0, 0, 0.5) !important; /* Background becomes black when scrolling up */
}
document.addEventListener('DOMContentLoaded', function () {
  let lastScrollTop = 0;
  const nav = document.querySelector('#brx-header.sticky'); // Ensure this targets the correct header element
  let hasScrolledDown = false; // Track if the user has scrolled down

  // Listen for the scroll event on the window
  window.addEventListener('scroll', function () {
    let scrollTop = window.pageYOffset || document.documentElement.scrollTop;

    console.log('Scroll position:', scrollTop); // Check scroll position in console

    if (scrollTop > lastScrollTop) {
      // User is scrolling down
      console.log('Scrolling down');
      nav.classList.remove('nav-visible');
      nav.classList.add('nav-hidden');
      hasScrolledDown = true; // User has scrolled down
    } else if (scrollTop < lastScrollTop && hasScrolledDown) {
      // User is scrolling up and has already scrolled down
      console.log('Scrolling up');
      nav.classList.remove('nav-hidden');
      nav.classList.add('nav-visible');
    }

    // Update the last scroll position
    lastScrollTop = scrollTop;
  });
});

Wheels of Hope: How Rekha Found Her Way Back to School

Eighteen-year-old Rekha lives in Raike, Gurbhakot Municipality, Ward No. 12, Dahchaur. She stays with her parents, brother, sister, and her little niece. Like many families in rural Nepal, her family depends on farming and daily wage work to survive. They have five goats, a cattle shed, and five acres of sandy farmland. But the land…

  • 2:2 min

  • 0 comments

Eighteen-year-old Rekha lives in Raike, Gurbhakot Municipality, Ward No. 12, Dahchaur. She stays with her parents, brother, sister, and her little niece. Like many families in rural Nepal, her family depends on farming and daily wage work to survive. They have five goats, a cattle shed, and five acres of sandy farmland. But the land gives so little that their food doesn’t even last a month.

Rekha’s father works in India to help the family. Her mother and sister earn money by doing local work. Her younger brother studies in class 10 at a nearby government school.

But Rekha has faced more than just poverty. When she was only two years old, she lost the ability to walk. One day, while her parents were out working, she fell down the stairs. Soon after, she had a high fever. The family didn’t have money to take her to the hospital. The fever went away, but it had already done damage. Slowly, Rekha lost movement in her lower body. Since then, she has depended on her family for everything.

As she grew older, Rekha really wanted to go to school like her brother. Her father took her to Shree Saraswati Primary School. She was happy and excited. But that didn’t last long. The school had no accessible toilets or proper classrooms. Rekha had to relieve herself in the classroom. She felt ashamed and her classmates made fun of her. After just two days, she dropped out.

Later, she got some help from INF Nepal’s Shining Hospital. They gave her physiotherapy and a wheelchair. But the roads around her home were too steep and rough. She couldn’t use the wheelchair. It stayed unused at home.

Then something changed.

INF Nepal Access and Inclusion Project team heard about Rekha. The team leader and staff came to her house. They listened to her story and offered real help. They made her house and school wheelchair-friendly.

Now, Rekha is back in school. She has joined class one again. She moves around proudly in her wheelchair. At home, she can now bathe, cook, wash clothes, and use the toilet all by herself. She no longer needs help for daily activities. At school, her classmates treat her like a friend, not someone different.

Rekha is doing well. With a big smile, she says,
“I have received a new life because of the support from the project and the hospital.”

Share this post:

Post tags