浏览代码

Add the link list pattern back

Ben Dwyer 4 年之前
父节点
当前提交
6fd11ad0e3

+ 2 - 6
spearhead/assets/sass/block-extends/_links.scss

@@ -1,13 +1,9 @@
-.podcast-links-block {
-    a {
-        margin: 0 4px;
-    }
-}
-
 .podcast-links-list-block {
     color: var(--entry-header--color);
+
     a {
         margin: 0 3px 0 7px;
+
         &:first-child {
             margin-left: 0;
         }

+ 9 - 0
spearhead/inc/block-patterns.php

@@ -70,6 +70,15 @@ if ( ! function_exists( 'spearhead_register_block_patterns' ) ) :
 						<!-- /wp:navigation -->',
 				)
 			);
+
+			register_block_pattern(
+				'spearhead/podcast-links-list',
+				array(
+					'title'      => __( 'Podcast links list', 'spearhead' ),
+					'categories' => array( 'spearhead' ),
+					'content'    => '<!-- wp:paragraph {"className":"podcast-links-list-block","style":{"typography":{"fontSize":18}}} --><p class="podcast-links-list-block" style="font-size:18px"><a rel="noreferrer noopener" target="_blank" href="https://www.apple.com/">Apple </a>•<a rel="noreferrer noopener" target="_blank" href="https://www.breaker.audio/">Breaker </a>•<a rel="noreferrer noopener" target="_blank" href="https://www.google.com/">Google </a>•<a rel="noreferrer noopener" target="_blank" href="https://www.linkedin.com/">LinkedIn </a>•<a rel="noreferrer noopener" target="_blank" href="https://overcast.fm/">Overcast </a>•<a rel="noreferrer noopener" target="_blank" href="https://www.spotify.com/">Spotify </a>•<a rel="noreferrer noopener" target="_blank" href="https://twitter.com/">Twitter </a>•<a href="https://www.youtube.com/" target="_blank" rel="noreferrer noopener">YouTube</a></p><!-- /wp:paragraph -->',
+				)
+			);
 		}
 
 		/**

+ 0 - 4
spearhead/style-rtl.css

@@ -356,10 +356,6 @@ ul.wp-block-categories,
 	color: var(--global--color-primary);
 }
 
-.podcast-links-block a {
-	margin: 0 4px;
-}
-
 .podcast-links-list-block {
 	color: var(--entry-header--color);
 }

+ 0 - 4
spearhead/style.css

@@ -356,10 +356,6 @@ ul.wp-block-categories,
 	color: var(--global--color-primary);
 }
 
-.podcast-links-block a {
-	margin: 0 4px;
-}
-
 .podcast-links-list-block {
 	color: var(--entry-header--color);
 }

文件差异内容过多而无法显示
+ 0 - 0
spearhead/style.css.map


部分文件因为文件数量过多而无法显示