Browse Source

fixed spacing issues on the query block

Maggie 3 years ago
parent
commit
452d5bcccc

+ 19 - 2
skatepark/assets/theme.css

@@ -1,3 +1,4 @@
+@charset "UTF-8";
 /**
  * Breakpoints & Media Queries
  */
@@ -42,6 +43,11 @@
 	color: var(--wp--preset--color--background);
 }
 
+p {
+	margin-top: calc( 0.5 * var(--wp--custom--margin--vertical));
+	margin-bottom: calc( 0.5 * var(--wp--custom--margin--vertical));
+}
+
 .wp-block-post-author__content {
 	display: flex;
 	flex-direction: column;
@@ -441,12 +447,12 @@ a {
 	text-underline-offset: 0.46ex;
 }
 
-.wp-block-post-content p a {
+.wp-block-post-content p a:not(.wp-block-post-excerpt__more-link) {
 	-webkit-text-decoration-line: underline;
 	        text-decoration-line: underline;
 }
 
-.wp-block-post-content p a:hover {
+.wp-block-post-content p a:not(.wp-block-post-excerpt__more-link):hover {
 	text-decoration: none;
 	background-color: var(--wp--custom--color--primary);
 	color: var(--wp--custom--color--background);
@@ -598,4 +604,15 @@ header.wp-block-template-part > .wp-block-group .wp-block-social-links.is-style-
 	text-underline-offset: 0.46ex;
 }
 
+.wp-block-post-excerpt__more-link {
+	font-weight: 500;
+}
+
+.wp-block-post-excerpt__more-link:after {
+	content: "→";
+	display: inline-block;
+	padding-left: 0.7ch;
+	text-decoration: none;
+}
+
 /*# sourceMappingURL=theme.css.map */

+ 2 - 2
skatepark/block-templates/index.html

@@ -5,8 +5,8 @@
 	<!-- wp:query-title {"type":"archive","align":"wide"} /-->
 	<!-- wp:query {"query":{"perPage":6,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
 	<div class="wp-block-query alignwide"><!-- wp:post-template -->
-	<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
-	<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:separator {"className":"is-style-wide"} -->
+	<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
+	<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-left:30px"><!-- wp:separator {"className":"is-style-wide"} -->
 	<hr class="wp-block-separator is-style-wide"/>
 	<!-- /wp:separator -->
 	

+ 1 - 1
skatepark/child-theme.json

@@ -200,7 +200,7 @@
 			"margin": {
 				"baseline": "15px",
 				"horizontal": "30px",
-				"vertical": "45px"
+				"vertical": "40px"
 			},
 			"separator": {
 				"margin": "calc( 0.5 * var(--wp--custom--margin--vertical) ) auto"

+ 3 - 3
skatepark/inc/patterns/blog-posts.php

@@ -10,8 +10,8 @@ return array(
 	'categories' => array( 'skatepark' ),
 	'content'    => '<!-- wp:query {"query":{"perPage":6,"pages":0,"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
 	<div class="wp-block-query alignwide"><!-- wp:post-template -->
-	<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","bottom":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
-	<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-bottom:30px;padding-left:30px"><!-- wp:separator {"className":"is-style-wide"} -->
+	<!-- wp:group {"style":{"spacing":{"padding":{"top":"30px","right":"30px","left":"30px"}}},"layout":{"inherit":false}} -->
+	<div class="wp-block-group" style="padding-top:30px;padding-right:30px;padding-left:30px"><!-- wp:separator {"className":"is-style-wide"} -->
 	<hr class="wp-block-separator is-style-wide"/>
 	<!-- /wp:separator -->
 	
@@ -19,7 +19,7 @@ return array(
 	
 	<!-- wp:post-title {"isLink":true,"fontSize":"normal"} /-->
 	
-	<!-- wp:post-excerpt {"className":"is-style-indented-post-excerpt"} /-->
+	<!-- wp:post-excerpt {"moreText":"Continue reading","className":"is-style-indented-post-excerpt"} /-->
 	
 	<!-- wp:post-date {"style":{"typography":{"fontWeight":"500"}},"fontSize":"tiny"} /--></div>
 	<!-- /wp:group -->

+ 5 - 0
skatepark/sass/base/_text.scss

@@ -1,4 +1,9 @@
 // Text selection text color
 ::selection {
 	color: var(--wp--preset--color--background);
+}
+
+p {
+	margin-top: calc( 0.5 * var(--wp--custom--margin--vertical) );
+	margin-bottom: calc( 0.5 * var(--wp--custom--margin--vertical) );
 }

+ 1 - 1
skatepark/sass/elements/_links.scss

@@ -2,7 +2,7 @@ a {
 	@include text-decoration;
 }
 
-.wp-block-post-content p a {
+.wp-block-post-content p a:not(.wp-block-post-excerpt__more-link) {
 	text-decoration-line: underline;
 	&:hover {
 		text-decoration: none;

+ 10 - 0
skatepark/sass/templates/_index.scss

@@ -15,4 +15,14 @@
 		text-decoration: underline;
 		@include text-decoration;
 	}
+}
+
+.wp-block-post-excerpt__more-link {
+	font-weight: 500;
+	&:after {
+		content: "→";
+		display: inline-block;
+		padding-left: 0.7ch;
+		text-decoration: none;
+	}
 }

+ 1 - 1
skatepark/theme.json

@@ -284,7 +284,7 @@
 			"margin": {
 				"baseline": "15px",
 				"horizontal": "30px",
-				"vertical": "45px"
+				"vertical": "40px"
 			},
 			"paragraph": {
 				"dropcap": {