modify landing page

This commit is contained in:
Bkk1234 committed 2026-11-16 01:39:59 +07:00
commit dd232b1c02
2599 files changed
+226992

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
//ETo is caluated by Penman-Monteith method
ETo=(0.408*Δ*(Rn-G)+γ((900/(T+273))*U2*(es-ea)))/(Δ+γ*(1+0.34*U2))
+96
View File
@@ -0,0 +1,96 @@
(function($) {
"use strict"; // Start of use strict
// Smooth scrolling using jQuery easing
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html, body').animate({
scrollTop: (target.offset().top - 56)
}, 1000, "easeInOutExpo");
return false;
}
}
});
// Closes responsive menu when a scroll trigger link is clicked
$('.js-scroll-trigger').click(function() {
$('.navbar-collapse').collapse('hide');
});
// Activate scrollspy to add active class to navbar items on scroll
$('body').scrollspy({
target: '#mainNav',
offset: 57
});
// Collapse Navbar
var navbarCollapse = function() {
if ($("#mainNav").offset().top > 100) {
$("#mainNav").addClass("navbar-shrink");
} else {
$("#mainNav").removeClass("navbar-shrink");
}
};
// Collapse now if page is not at top
navbarCollapse();
// Collapse the navbar when page is scrolled
$(window).scroll(navbarCollapse);
// Scroll reveal calls
window.sr = ScrollReveal();
sr.reveal('.sr-icon-1', {
delay: 200,
scale: 0
});
sr.reveal('.sr-icon-2', {
delay: 400,
scale: 0
});
sr.reveal('.sr-icon-3', {
delay: 600,
scale: 0
});
sr.reveal('.sr-icon-4', {
delay: 800,
scale: 0
});
sr.reveal('.sr-button', {
delay: 200,
distance: '15px',
origin: 'bottom',
scale: 0.8
});
sr.reveal('.sr-contact-1', {
delay: 200,
scale: 0
});
sr.reveal('.sr-contact-2', {
delay: 400,
scale: 0
});
// Magnific popup calls
$('.popup-gallery').magnificPopup({
delegate: 'a',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0, 1]
},
image: {
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
}
});
})(jQuery); // End of use strict
$(function() {
$(".rslides").responsiveSlides();
});
+11
View File
@@ -0,0 +1,11 @@
/*!
* Start Bootstrap - Creative v5.0.2 (https://startbootstrap.com/template-overviews/creative)
* Copyright 2013-2018 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-creative/blob/master/LICENSE)
*/
!function(e){"use strict";e('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function(){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var a=e(this.hash);if((a=a.length?a:e("[name="+this.hash.slice(1)+"]")).length)return e("html, body").animate({scrollTop:a.offset().top-56},1e3,"easeInOutExpo"),!1}}),e(".js-scroll-trigger").click(function(){e(".navbar-collapse").collapse("hide")}),e("body").scrollspy({target:"#mainNav",offset:57});var a=function(){100<e("#mainNav").offset().top?e("#mainNav").addClass("navbar-shrink"):e("#mainNav").removeClass("navbar-shrink")};a(),e(window).scroll(a),window.sr=ScrollReveal(),sr.reveal(".sr-icon-1",{delay:200,scale:0}),sr.reveal(".sr-icon-2",{delay:400,scale:0}),sr.reveal(".sr-icon-3",{delay:600,scale:0}),sr.reveal(".sr-icon-4",{delay:800,scale:0}),sr.reveal(".sr-button",{delay:200,distance:"15px",origin:"bottom",scale:.8}),sr.reveal(".sr-contact-1",{delay:200,scale:0}),sr.reveal(".sr-contact-2",{delay:400,scale:0}),e(".popup-gallery").magnificPopup({delegate:"a",type:"image",tLoading:"Loading image #%curr%...",mainClass:"mfp-img-mobile",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.'}})}(jQuery);
/*
Selects
*/
+92
View File
@@ -0,0 +1,92 @@
$(function(){
var values = new Array();
$(document).on('change', '.form-group-multiple-selects .input-group-multiple-select:last-child select','.form-group-1', function(){
var selectsLength = $(this).parent().parent().find('.input-group-multiple-select select').length;
var optionsLength = ($(this).find('option').length)-1;
if(selectsLength < optionsLength){
var sInputGroupHtml = $(this).parent().html();
var sInputGroupClasses = $(this).parent().attr('class');
$(this).parent().parent().append('<div class="'+sInputGroupClasses+'">'+sInputGroupHtml+'</div>');
}
updateValues($(this).parent().parent());
});
$(document).on('change', '.form-group-multiple-selects .input-group-multiple-select:not(:last-child) select','.form-group-1', function(){
updateValues($(this).parent().parent());
});
$(document).on('click', '.input-group-addon-remove', function(){
var oSelectContainer = $(this).parent().parent()
$(this).parent().remove();
updateValues(oSelectContainer);
});
function updateValues(oSelectContainer){
values = new Array();
$(oSelectContainer).find('.input-group-multiple-select select').each(function(){
var value = $(this).val();
if(value != 0 && value != ""){
values.push(value);
}
});
$(oSelectContainer).find('.input-group-multiple-select select').find('option').each(function(){
var optionValue = $(this).val();
var selectValue = $(this).parent().val();
if(in_array(optionValue,values)!= -1 && selectValue != optionValue)
{
$(this).attr('disabled', 'disabled');
}
else
{
$(this).removeAttr('disabled');
}
});
}
function in_array(needle, haystack){
var found = 0;
for (var i=0, length=haystack.length;i<length;i++) {
if (haystack[i] == needle) return i;
found++;
}
return -1;
}
// Update all options for first use
$('.form-group-multiple-selects').each(function(i, e){
updateValues(e);
});
});
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("myBtn").style.display = "block";
} else {
document.getElementById("myBtn").style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
+1
View File
@@ -0,0 +1 @@
//data collection
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
/*! http://responsiveslides.com v1.55 by @viljamis */
(function(c,K,C){c.fn.responsiveSlides=function(m){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},m);return this.each(function(){C++;var f=c(this),u,t,v,n,q,r,p=0,e=f.children(),D=e.length,h=parseFloat(a.speed),E=parseFloat(a.timeout),w=parseFloat(a.maxwidth),g=a.namespace,d=g+C,F=g+"_nav "+d+"_nav",x=g+"_here",k=d+"_on",
y=d+"_s",l=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),z={"float":"left",position:"relative",opacity:1,zIndex:2},A={"float":"none",position:"absolute",opacity:0,zIndex:1},G=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;u=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<u.length;c++)if("string"===typeof b[u[c]+a])return!0;return!1}(),B=function(b){a.before(b);G?(e.removeClass(k).css(A).eq(b).addClass(k).css(z),
p=b,setTimeout(function(){a.after(b)},h)):e.stop().fadeOut(h,function(){c(this).removeClass(k).css(A).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(k).css(z);a.after(b);p=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-.5}),f.empty().append(e));e.each(function(a){this.id=y+a});f.addClass(g+" "+d);m&&m.maxwidth&&f.css("max-width",w);e.hide().css(A).eq(0).addClass(k).css(z).show();G&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+
h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.length){if(E<h+100)return;if(a.pager&&!a.manualControls){var H=[];e.each(function(a){a+=1;H+="<li><a href='#' class='"+y+a+"'>"+a+"</a></li>"});l.append(H);m.navContainer?c(a.navContainer).append(l):f.after(l)}a.manualControls&&(l=c(a.manualControls),l.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&l.find("li").each(function(a){c(this).addClass(y+(a+1))});if(a.pager||a.manualControls)r=
l.find("a"),t=function(a){r.closest("li").removeClass(x).eq(a).addClass(x)};a.auto&&(v=function(){q=setInterval(function(){e.stop(!0,!0);var b=p+1<D?p+1:0;(a.pager||a.manualControls)&&t(b);B(b)},E)},v());n=function(){a.auto&&(clearInterval(q),v())};a.pause&&f.hover(function(){clearInterval(q)},function(){n()});if(a.pager||a.manualControls)r.bind("click",function(b){b.preventDefault();a.pauseControls||n();b=r.index(this);p===b||c("."+k).queue("fx").length||(t(b),B(b))}).eq(0).closest("li").addClass(x),
a.pauseControls&&r.hover(function(){clearInterval(q)},function(){n()});if(a.nav){g="<a href='#' class='"+F+" prev'>"+a.prevText+"</a><a href='#' class='"+F+" next'>"+a.nextText+"</a>";m.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),I=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+k);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<D?p+1:0;B(c(this)[0]===I[0]?b:d);(a.pager||a.manualControls)&&t(c(this)[0]===I[0]?b:d);a.pauseControls||n()}});
a.pauseControls&&d.hover(function(){clearInterval(q)},function(){n()})}}if("undefined"===typeof document.body.style.maxWidth&&m.maxwidth){var J=function(){f.css("width","100%");f.width()>w&&f.css("width",w)};J();c(K).bind("resize",function(){J()})}})}})(jQuery,this,0);
+7
View File
@@ -0,0 +1,7 @@
function cals(a,b,c) {
var a,b,c;
a=Number(document.formcals.a.value);
b=Number(document.formcbls.b.value);
c=a+b;
document.formcals.c.valuec;
}
+2
View File
@@ -0,0 +1,2 @@
var Consumer_water,farm_water,livestock_water,amount,;
var total = Consumer_water+farm_water+livestock_water;