Browse Source

added categories to block pattern

Maggie Cabrera 4 years ago
parent
commit
e2541bdaaf

+ 1 - 0
spearhead/assets/sass/_block-extends.scss

@@ -2,3 +2,4 @@
 @import "block-extends/search";
 @import "block-extends/latest-posts";
 @import "block-extends/related-posts";
+@import "block-extends/categories";

+ 19 - 0
spearhead/assets/sass/block-extends/_categories.scss

@@ -0,0 +1,19 @@
+.wp-block-categories {
+
+    ul {
+        list-style-type: none;
+        padding: 0;
+    }
+
+    .cat-item {
+        padding: 5px 0;
+    }
+
+    a {
+        font-size: var(--heading--font-size-h3);
+        color: var(--entry-header--color);
+        &:hover {
+            color: var(--global--color-primary);
+        }
+    }
+}

+ 4 - 1
spearhead/inc/block-patterns.php

@@ -41,7 +41,10 @@ if ( ! function_exists( 'spearhead_register_block_patterns' ) ) :
 				array(
 					'title'      => __( 'Search Form', 'spearhead' ),
 					'categories' => array( 'spearhead' ),
-					'content'    => '<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Search...","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true} /-->',
+					'content'    => '<!-- wp:search {"label":"Search","showLabel":false,"placeholder":"Search...","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true} /--><!-- wp:spacer {"height":50} -->
+					<div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div>
+					<!-- /wp:spacer --><!-- wp:heading {"level":3,"style":{"color":{"text":"#cccccc"}}} -->
+					<h3 class="has-text-color" style="color:#346073">' . __( 'Categories', 'seedlet' ) . '</h3><!-- /wp:heading --><!-- wp:categories /-->',
 				)
 			);
 		}

+ 22 - 0
spearhead/style-rtl.css

@@ -371,6 +371,7 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	text-transform: uppercase;
 }
 
+<<<<<<< HEAD
 .screen-reader-text, .search-form input[type="submit"] {
 	/* Text meant only for screen readers. */
 	border: 0;
@@ -412,6 +413,9 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	outline: 0;
 }
 
+=======
+<<<<<<< HEAD
+>>>>>>> added categories to block pattern
 .search-results .site-main > * {
 	padding: var(--global--spacing-vertical) 0;
 }
@@ -475,4 +479,22 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	margin-top: calc( var(--global--spacing-vertical) / 2);
 	padding-top: 0;
 	border: none;
+=======
+.wp-block-categories ul {
+	list-style-type: none;
+	padding: 0;
+}
+
+.wp-block-categories .cat-item {
+	padding: 5px 0;
+}
+
+.wp-block-categories a {
+	font-size: var(--heading--font-size-h3);
+	color: var(--entry-header--color);
+}
+
+.wp-block-categories a:hover {
+	color: var(--global--color-primary);
+>>>>>>> added categories to block pattern
 }

+ 18 - 0
spearhead/style.css

@@ -371,6 +371,24 @@ Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-me
 	text-transform: uppercase;
 }
 
+.wp-block-categories ul {
+	list-style-type: none;
+	padding: 0;
+}
+
+.wp-block-categories .cat-item {
+	padding: 5px 0;
+}
+
+.wp-block-categories a {
+	font-size: var(--heading--font-size-h3);
+	color: var(--entry-header--color);
+}
+
+.wp-block-categories a:hover {
+	color: var(--global--color-primary);
+}
+
 .screen-reader-text, .search-form input[type="submit"] {
 	/* Text meant only for screen readers. */
 	border: 0;

File diff suppressed because it is too large
+ 1 - 0
spearhead/style.css.map


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