Selaa lähdekoodia

move the spacer to the CSS so if the block isn't there nothing shows

Ben Dwyer 4 vuotta sitten
vanhempi
commit
eebb4e3957

+ 20 - 16
quadrat/assets/theme.css

@@ -729,6 +729,24 @@ textarea:focus {
 	}
 	}
 }
 }
 
 
+.home .site-footer.wp-block-group {
+	position: relative;
+	overflow: visible;
+}
+
+.home .site-footer.wp-block-group:before {
+	content: "";
+	background-color: var(--wp--custom--color--secondary);
+	-webkit-clip-path: polygon(41vw 49vw, 100vw 68vw, 100vw 100vw, 18vw 100vw);
+	        clip-path: polygon(41vw 49vw, 100vw 68vw, 100vw 100vw, 18vw 100vw);
+	position: absolute;
+	height: 100vw;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	z-index: -1;
+}
+
 .post-meta {
 .post-meta {
 	align-items: center;
 	align-items: center;
 	justify-content: center;
 	justify-content: center;
@@ -822,22 +840,8 @@ textarea:focus {
 	}
 	}
 }
 }
 
 
-.home .site-footer.wp-block-group {
-	position: relative;
-	overflow: visible;
-}
-
-.home .site-footer.wp-block-group:before {
-	content: "";
-	background-color: var(--wp--custom--color--secondary);
-	-webkit-clip-path: polygon(41vw 49vw, 100vw 68vw, 100vw 100vw, 18vw 100vw);
-	        clip-path: polygon(41vw 49vw, 100vw 68vw, 100vw 100vw, 18vw 100vw);
-	position: absolute;
-	height: 100vw;
-	bottom: 0;
-	left: 0;
-	right: 0;
-	z-index: -1;
+.wp-block-query .wp-block-post-featured-image {
+	margin-top: calc( var(--wp--custom--margin--vertical) / 2);
 }
 }
 
 
 .wp-block-post-featured-image {
 .wp-block-post-featured-image {

+ 0 - 3
quadrat/block-template-parts/query.html

@@ -3,9 +3,6 @@
 <!-- wp:query-loop -->
 <!-- wp:query-loop -->
 	<!-- wp:post-date {"fontSize":"tiny","textAlign":"center"} /-->
 	<!-- wp:post-date {"fontSize":"tiny","textAlign":"center"} /-->
 	<!-- wp:post-title {"isLink":true, "level": 3, "textAlign":"center"} /-->
 	<!-- wp:post-title {"isLink":true, "level": 3, "textAlign":"center"} /-->
-	<!-- wp:spacer {"height":15} -->
-	<div style="height:15px" aria-hidden="true" class="wp-block-spacer"></div>
-	<!-- /wp:spacer -->
 	<!-- wp:post-featured-image {"isLink":true} /-->
 	<!-- wp:post-featured-image {"isLink":true} /-->
 	<!-- wp:post-excerpt /-->
 	<!-- wp:post-excerpt /-->
 	<!-- wp:spacer {"height":60} -->
 	<!-- wp:spacer {"height":60} -->

+ 0 - 0
quadrat/sass/_footer.scss → quadrat/sass/templates/_footer.scss


+ 0 - 0
quadrat/sass/_header.scss → quadrat/sass/templates/_header.scss


+ 0 - 0
quadrat/sass/_meta.scss → quadrat/sass/templates/_meta.scss


+ 0 - 0
quadrat/sass/_post-header.scss → quadrat/sass/templates/_post-header.scss


+ 5 - 0
quadrat/sass/templates/_query.scss

@@ -0,0 +1,5 @@
+.wp-block-query {
+	.wp-block-post-featured-image {
+		margin-top: calc( var(--wp--custom--margin--vertical) / 2 );
+	}
+}

+ 5 - 4
quadrat/sass/theme.scss

@@ -19,10 +19,11 @@
 @import "colors";
 @import "colors";
 @import "elements/links";
 @import "elements/links";
 @import "elements/forms";
 @import "elements/forms";
-@import "header";
-@import "meta";
-@import "post-header";
-@import "footer";
+@import "templates/header";
+@import "templates/footer";
+@import "templates/meta";
+@import "templates/post-header";
+@import "templates/query";
 
 
 .wp-block-post-featured-image {
 .wp-block-post-featured-image {
 	margin-top: 0;
 	margin-top: 0;