Browse Source

remove header js

windhamdavid 9 months ago
parent
commit
854e341666
5 changed files with 69 additions and 51 deletions
  1. 21 21
      js/scripts.js
  2. 21 21
      js/site.js
  3. 0 0
      js/site.js.map
  4. 19 0
      parts/header-bak.html
  5. 8 9
      parts/header.html

+ 21 - 21
js/scripts.js

@@ -1,25 +1,25 @@
 //var SearchCollapse = document.getElementById('SearchCollapse')
 //var SearchCollapse = document.getElementById('SearchCollapse')
 //var bsCollapse = new bootstrap.Collapse(SearchCollapse, {toggle: false})
 //var bsCollapse = new bootstrap.Collapse(SearchCollapse, {toggle: false})
 
 
-document.addEventListener("DOMContentLoaded", function(){
-  gwp_autohide = document.querySelector('.autohide');
-  navbar_height = document.querySelector('.navbar').offsetHeight;
-  document.body.style.paddingTop = navbar_height + 'px';
-  if(gwp_autohide){
-    var last_scroll_top = 0;
-    window.addEventListener('scroll', function() {
-    var y = window.scrollY;
-    let scroll_top = window.scrollY;
-    if(scroll_top < last_scroll_top || y < navbar_height) {
-      gwp_autohide.classList.remove('scrolled-down');
-      gwp_autohide.classList.add('scrolled-up');
-    }
-    else {
-      gwp_autohide.classList.remove('scrolled-up');
-      gwp_autohide.classList.add('scrolled-down');
-    }
-    last_scroll_top = scroll_top;
-    }); 
-  }
-}); 
+//document.addEventListener("DOMContentLoaded", function(){
+//  gwp_autohide = document.querySelector('.autohide');
+//  navbar_height = document.querySelector('.navbar').offsetHeight;
+//  document.body.style.paddingTop = navbar_height + 'px';
+//  if(gwp_autohide){
+//    var last_scroll_top = 0;
+//    window.addEventListener('scroll', function() {
+//    var y = window.scrollY;
+//    let scroll_top = window.scrollY;
+//    if(scroll_top < last_scroll_top || y < navbar_height) {
+//      gwp_autohide.classList.remove('scrolled-down');
+//      gwp_autohide.classList.add('scrolled-up');
+//    }
+//    else {
+//      gwp_autohide.classList.remove('scrolled-up');
+//      gwp_autohide.classList.add('scrolled-down');
+//    }
+//    last_scroll_top = scroll_top;
+//    }); 
+//  }
+//}); 
 
 

+ 21 - 21
js/site.js

@@ -8,27 +8,27 @@
 //var SearchCollapse = document.getElementById('SearchCollapse')
 //var SearchCollapse = document.getElementById('SearchCollapse')
 //var bsCollapse = new bootstrap.Collapse(SearchCollapse, {toggle: false})
 //var bsCollapse = new bootstrap.Collapse(SearchCollapse, {toggle: false})
 
 
-document.addEventListener("DOMContentLoaded", function(){
-  gwp_autohide = document.querySelector('.autohide');
-  navbar_height = document.querySelector('.navbar').offsetHeight;
-  document.body.style.paddingTop = navbar_height + 'px';
-  if(gwp_autohide){
-    var last_scroll_top = 0;
-    window.addEventListener('scroll', function() {
-    var y = window.scrollY;
-    let scroll_top = window.scrollY;
-    if(scroll_top < last_scroll_top || y < navbar_height) {
-      gwp_autohide.classList.remove('scrolled-down');
-      gwp_autohide.classList.add('scrolled-up');
-    }
-    else {
-      gwp_autohide.classList.remove('scrolled-up');
-      gwp_autohide.classList.add('scrolled-down');
-    }
-    last_scroll_top = scroll_top;
-    }); 
-  }
-}); 
+//document.addEventListener("DOMContentLoaded", function(){
+//  gwp_autohide = document.querySelector('.autohide');
+//  navbar_height = document.querySelector('.navbar').offsetHeight;
+//  document.body.style.paddingTop = navbar_height + 'px';
+//  if(gwp_autohide){
+//    var last_scroll_top = 0;
+//    window.addEventListener('scroll', function() {
+//    var y = window.scrollY;
+//    let scroll_top = window.scrollY;
+//    if(scroll_top < last_scroll_top || y < navbar_height) {
+//      gwp_autohide.classList.remove('scrolled-down');
+//      gwp_autohide.classList.add('scrolled-up');
+//    }
+//    else {
+//      gwp_autohide.classList.remove('scrolled-up');
+//      gwp_autohide.classList.add('scrolled-down');
+//    }
+//    last_scroll_top = scroll_top;
+//    }); 
+//  }
+//}); 
 
 
 
 
 //# sourceMappingURL=site.js.map
 //# sourceMappingURL=site.js.map

File diff suppressed because it is too large
+ 0 - 0
js/site.js.map


+ 19 - 0
parts/header-bak.html

@@ -0,0 +1,19 @@
+<!-- wp:group {"style":{"spacing":{"padding":{"top":"25px","bottom":"25px"}}},"layout":{"type":"constrained"}} -->
+<div class="autohide navbar fixed-top wp-block-group has-base-color has-contrast-background-color has-background" style="padding-top:25px;padding-bottom:25px">
+	<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap"}} -->
+	<div class="wp-block-group alignwide container">
+		<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|50"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
+		<div class="wp-block-group">
+			<!-- wp:site-logo {"width":50 } /-->
+			<!-- wp:group {"style":{"spacing":{"blockGap":"30"}}} -->
+			<div class="wp-block-group">
+				<!-- wp:site-title {"level":0} /-->
+			</div>
+			<!-- /wp:group -->
+		</div>
+		<!-- /wp:group -->
+		<!-- wp:navigation {"layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|40"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
+	</div>
+	<!-- /wp:group -->
+</div>
+<!-- /wp:group -->

+ 8 - 9
parts/header.html

@@ -1,18 +1,17 @@
-<!-- wp:group {"style":{"spacing":{"padding":{"top":"25px","bottom":"25px"}}},"layout":{"type":"constrained"}} -->
-<div class="autohide navbar fixed-top wp-block-group has-base-color has-contrast-background-color has-background" style="padding-top:25px;padding-bottom:25px">
-	<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap"}} -->
+<!-- wp:group {"style":{"spacing":{"padding":{"top":"25px","bottom":"25px"}}},"className":"has-base-color has-contrast-background-color has-background","layout":{"type":"constrained"}} -->
+<div class="wp-block-group has-base-color has-contrast-background-color has-background" style="padding-top:25px;padding-bottom:25px">
+	<!-- wp:group {"className":"alignwide container","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
 	<div class="wp-block-group alignwide container">
 	<div class="wp-block-group alignwide container">
 		<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|50"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
 		<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|50"},"layout":{"selfStretch":"fit","flexSize":null}},"layout":{"type":"flex"}} -->
-		<div class="wp-block-group">
-			<!-- wp:site-logo {"width":50 } /-->
-			<!-- wp:group {"style":{"spacing":{"blockGap":"30"}}} -->
+		<div class="wp-block-group"><!-- wp:site-logo {"width":50} /-->
+		<!-- wp:group {"style":{"spacing":{"blockGap":"30"}}} -->
 			<div class="wp-block-group">
 			<div class="wp-block-group">
 				<!-- wp:site-title {"level":0} /-->
 				<!-- wp:site-title {"level":0} /-->
 			</div>
 			</div>
-			<!-- /wp:group -->
-		</div>
 		<!-- /wp:group -->
 		<!-- /wp:group -->
-		<!-- wp:navigation {"layout":{"type":"flex","justifyContent":"right","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|40"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
+		</div>
+	<!-- /wp:group -->
+	<!-- wp:navigation {"ref":5,"layout":{"type":"flex","justifyContent":"left","orientation":"horizontal"},"style":{"spacing":{"margin":{"top":"0"},"blockGap":"var:preset|spacing|40"},"layout":{"selfStretch":"fit","flexSize":null}}} /-->
 	</div>
 	</div>
 	<!-- /wp:group -->
 	<!-- /wp:group -->
 </div>
 </div>

Some files were not shown because too many files changed in this diff