Browse Source

Add post meta to Geologist Theme (#4663)

* Add post meta to Geologist Theme

* Geologist: add date icon to post meta

Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
Kjell Reigstad 3 years ago
parent
commit
5bab92a2ef

+ 0 - 9
geologist/assets/theme.css

@@ -402,20 +402,11 @@ textarea:focus {
 	}
 }
 
-.post-meta .wp-block-post-date::before {
-	display: none;
-}
-
 .post-meta > *,
 .post-meta .wp-block-post-date {
 	margin: 0 8px;
 }
 
-.post-meta > *::before,
-.post-meta .wp-block-post-date::before {
-	content: "";
-}
-
 .post-meta .wp-block-post-terms {
 	margin-left: 0;
 	color: transparent;

+ 8 - 0
geologist/block-template-parts/post-meta.html

@@ -0,0 +1,8 @@
+<!-- wp:group {"className":"post-meta","layout":{"type":"flex"}} -->
+<div class="wp-block-group post-meta">
+    <!-- wp:post-author {"showAvatar":false,"showBio":false,"fontSize":"tiny"} /-->
+    <!-- wp:post-date {"fontSize":"tiny","isLink":true} /-->
+    <!-- wp:post-terms {"term":"category","fontSize":"tiny"} /-->
+    <!-- wp:post-terms {"term": "post_tag", "fontSize":"tiny"} /-->
+</div>
+<!-- /wp:group -->

+ 1 - 1
geologist/block-templates/index.html

@@ -6,7 +6,7 @@
 		<!-- wp:post-title {"isLink":true, "level": 3, "textAlign":"left"} /-->
 		<!-- wp:post-featured-image {"isLink":true} /-->
 		<!-- wp:post-excerpt /-->
-		<!-- wp:post-date {"fontSize":"tiny","textAlign":"left"} /-->
+		<!-- wp:template-part {"slug":"post-meta","layout":{"inherit":true}} /-->
 		<!-- wp:spacer {"height":120} -->
 		<div style="height:120px" aria-hidden="true" class="wp-block-spacer"></div>
 		<!-- /wp:spacer -->

+ 1 - 6
geologist/block-templates/single.html

@@ -12,12 +12,7 @@
 
 	<!-- wp:post-content {"layout":{"inherit":true}} /-->
 
-	<!-- wp:group {"layout":{"inherit":true},"className":"post-meta"} -->
-	<div class="wp-block-group post-meta">
-		<!-- wp:post-date {"textAlign":"left","fontSize":"tiny"} /-->
-		<!-- wp:post-terms {"term":"category","textAlign":"left","fontSize":"tiny"} /-->
-	</div>
-	<!-- /wp:group -->
+	<!-- wp:template-part {"slug":"post-meta","layout":{"inherit":true}} /-->
 
 	<!-- wp:spacer {"height":150} -->
 	<div style="height:150px" aria-hidden="true" class="wp-block-spacer"></div>

+ 0 - 7
geologist/sass/templates/_meta.scss

@@ -6,16 +6,9 @@
 		margin-bottom: -20px;
 	}
 
-	.wp-block-post-date::before {
-		display: none;
-	}
-
 	> *,
 	.wp-block-post-date {
 		margin: 0 8px;
-		&::before {
-			content: "";
-		}
 	}
 
 	.wp-block-post-terms {