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;
  });
});

Case Story: Hasiram Kami’s Journey to a Safer Home

  • 2:47 min

  • 0 comments

Hasiram Kami, a dedicated father and hardworking individual, used to live in Kalapahad, India. After the devas­tating massive earth­quake that struck Jajarkot, he returned to his hometown, where he and his family faced numerous hardships. Despite having no more land or property except a small piece of land, Hasiram was deter­mined to provide for his family. He worked tirelessly as a forest watchman for the local community and sometimes took on labor work to manage his family’s daily expenses.

Pic: Hasiram’s Newly Constructed House

His family lived in an old house that had been severely damaged by the earth­quake, forcing them to shift to temporary shelter. Amidst the struggle, Hasiram was fortunate to receive some support in the form of maize from the community, which helped them get through the toughest times. In recog­nition of the need for safer homes in the community, the Ward Disaster Management Committee selected Hasiram’s house based on a set of selection criteria. Soon after, the construction of a model house for his family began. As part of the process, a 7‑day mason training was organized, where partic­i­pants, including Hasiram, learned about building codes and construction norms. They were also involved in supporting the construction work.

Mr. Badri Panta, a local leader, shared, “We, as a ward team, along with technical experts from INF Jajarkot and the local community, have worked together to complete this model house. By completing this project, we gained more under­standing of how to construct other homes. With the government’s approval of the detail damage assessment, we are now moving forward with plans to build safer houses. We’ve collab­o­rated closely with the INF Nepal team, and with their external support, we were able to build a safer home for Hasiram’s family. We are proud of our efforts, and we’ll continue to work with all partners to support other vulnerable families in our community.”

Mr. Surendra Rawat, the ward’s technical person, was involved from the very beginning of the project and played an instru­mental role in coordi­nating the construction of the model house. “We followed government building codes metic­u­lously throughout the process,” Mr. Rawat said. “By using Interlock CSEB bricks, we success­fully completed the model house and included toilet facil­ities. This experience has not only provided a safer home for Hasiram’s family but has also allowed us to develop skills among local laborers. After completing the mason training and building this house, we now have a solid foundation to build other houses in our municipality.”

Pic1: Hasiram Kami with his wife Rita BK in his new constructed house. / Pic2: Hasiram’s damaged house and it’s residue after the Jajarkot Earthquake.

Despite the many challenges they face, the ward’s team remains committed to helping vulnerable families. “We have many more families in need,” Mr. Rawat continued. “Our ward has a disaster risk management plan, and we are working to implement all activ­ities related to DRM, WASH, and liveli­hoods. Coordi­nating with various supporting partners is crucial for us to restore the lives of families affected by the Jajarkot earthquake.”
INF Nepal, in collab­o­ration with INF UK and PWS&D, has been imple­menting the Jajarkot earth­quake recovery project in Nalagad Munic­i­pality, Ward No. 4, since August 2024. Their combined efforts have made a lasting impact, bringing hope and a safer future to families like Hasiram’s.

Share this post:

Post tags