Bladeren bron

two columns pattern and indented paragraph block style

Maggie 3 jaren geleden
bovenliggende
commit
f21bc7d6e5

+ 18 - 14
skatepark/assets/theme.css

@@ -257,20 +257,6 @@
 	left: calc( -1 * var(--wp--custom--button--border--width));
 }
 
-.pre-footer h3 {
-	text-transform: uppercase;
-}
-
-.pre-footer .wp-block-social-links.is-style-logos-only {
-	margin-left: calc( -1 * ( 8px + 0.25em ));
-}
-
-.pre-footer .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__button {
-	--wp--custom--button--typography--font-size: 14px;
-	--wp--custom--button--spacing--padding--top: 0.5em;
-	--wp--custom--button--spacing--padding--bottom: 0.5em;
-}
-
 .is-style-skatepark-aside-caption {
 	align-items: center;
 	display: flex;
@@ -297,6 +283,24 @@
 	margin-right: calc( max( 0.5 * ( 100% - var(--wp--custom--layout--wide-size) ), var(--wp--custom--post-content--padding--left) ));
 }
 
+.is-style-indented-paragraph {
+	text-indent: 10em;
+}
+
+.pre-footer h3 {
+	text-transform: uppercase;
+}
+
+.pre-footer .wp-block-social-links.is-style-logos-only {
+	margin-left: calc( -1 * ( 8px + 0.25em ));
+}
+
+.pre-footer .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper .wp-block-search__button {
+	--wp--custom--button--typography--font-size: 14px;
+	--wp--custom--button--spacing--padding--top: 0.5em;
+	--wp--custom--button--spacing--padding--bottom: 0.5em;
+}
+
 h1.is-style-skatepark-heading-border, h2.is-style-skatepark-heading-border, h3.is-style-skatepark-heading-border, h4.is-style-skatepark-heading-border, h5.is-style-skatepark-heading-border, h6.is-style-skatepark-heading-border {
 	display: inline-block;
 	border-top: 2px solid var(--wp--custom--color--primary);

+ 1 - 1
skatepark/functions.php

@@ -55,4 +55,4 @@ require get_stylesheet_directory() . '/inc/block-patterns.php';
 /**
  * Block Styles.
  */
-require get_stylesheet_directory() . '/inc/block-styles.php';
+require get_stylesheet_directory() . '/inc/block-styles.php';

+ 1 - 0
skatepark/inc/block-patterns.php

@@ -21,6 +21,7 @@ if ( ! function_exists( 'skatepark_register_block_patterns' ) ) :
 				'pre-footer',
 				'text-list-with-button',
 				'full-width-image-with-aside-caption',
+				'two-columns-of-text',
 			);
 
 			foreach ( $block_patterns as $block_pattern ) {

+ 13 - 0
skatepark/inc/block-styles.php

@@ -30,10 +30,23 @@ if ( ! function_exists( 'skatepark_register_block_styles' ) ) :
 					'name'         => 'skatepark-aside-caption',
 					'label'        => __( 'Aside caption', 'skatepark' ),
 					'style_handle' => 'skatepark-aside-caption',
+					)
+				);
+	
+			register_block_style(
+				'core/paragraph',
+				array(
+					'name'         => 'indented-paragraph',
+					'label'        => __( 'Indented paragraph', 'skatepark' ),
+					'style_handle' => 'indented-paragraph',
 				)
 			);
 		}
 	}
 endif;
 
+<<<<<<< HEAD
+add_action( 'after_setup_theme', 'skatepark_register_block_styles' );
+=======
 add_action( 'after_setup_theme', 'skatepark_register_block_styles' );
+>>>>>>> d5bb84db (two columns pattern and indented paragraph block style)

+ 32 - 0
skatepark/inc/patterns/two-columns-of-text.php

@@ -0,0 +1,32 @@
+<?php
+/**
+ * Two columns of text.
+ *
+ * @package Skatepark
+ */
+
+return array(
+	'title'      => __( 'Two columns of text', 'skatepark' ),
+	'categories' => array( 'skatepark' ),
+	'content'    => '<!-- wp:columns {"align":"wide"} -->
+	<div class="wp-block-columns alignwide"><!-- wp:column {"width":"","style":{"spacing":{"padding":{"right":"5em"}}}} -->
+	<div class="wp-block-column" style="padding-right:5em"><!-- wp:paragraph {"fontSize":"medium"} -->
+	<p class="has-medium-font-size">Skate ipsum dolor sit amet, poseur nollie casper pop shove-it. Kickturn noseblunt slide tailslide lien air Bonite. Rocket air poseur snake shoveit Chico Brenes. Crooked grind locals casper slide bank. Disaster frigid air bail aerial. Hang ten smith grind tailslide sick. Axle flypaper birdie gap Thrasher. Fast plant crail grab Japan air chicken wing Bullet 66.</p>
+	<!-- /wp:paragraph --></div>
+	<!-- /wp:column -->
+	
+	<!-- wp:column {"width":"550px"} -->
+	<div class="wp-block-column" style="flex-basis:550px"><!-- wp:paragraph -->
+	<p>Nose blunt masonite nosebone bluntslide. Poseur tic-tac coping feeble Neil Blender. Rail camel back kick-nose bone air. Saran Wrap skate or die handplant coping. 540 half-flip face plant ho-ho.</p>
+	<!-- /wp:paragraph -->
+	
+	<!-- wp:paragraph -->
+	<p>Vert quarter pipe tailslide grab. Nose slide Bam Margera rocket air axle set disaster. Fast plant crail grab Japan air chicken wing Bullet 66. Hurricane coping masonite crail grab Brooklyn Banks. Death box salad grind concave cess slide.</p>
+	<!-- /wp:paragraph -->
+	
+	<!-- wp:paragraph -->
+	<p>Skate ipsum dolor sit amet, poseur nollie casper pop shove-it. Kickturn noseblunt slide tailslide lien air Bonite. Rocket air poseur snake shoveit Chico Brenes. Crooked grind locals casper slide bank. Disaster frigid air bail aerial. Hang ten smith grind tailslide sick. Axle flypaper birdie gap Thrasher.</p>
+	<!-- /wp:paragraph --></div>
+	<!-- /wp:column --></div>
+	<!-- /wp:columns -->',
+);

+ 3 - 0
skatepark/sass/block-styles/_indented-paragraph.scss

@@ -0,0 +1,3 @@
+.is-style-indented-paragraph {
+	text-indent: 10em;
+}

+ 2 - 1
skatepark/sass/theme.scss

@@ -4,8 +4,9 @@
 @import "blocks/buttons";
 @import "blocks/post-comments";
 @import "blocks/search";
-@import "block-patterns/pre-footer";
 @import "block-styles/image-caption";
+@import "block-styles/indented-paragraph";
+@import "block-patterns/pre-footer";
 @import "elements/headings";
 @import "elements/links";
 @import "templates/header";

+ 3 - 0
skatepark/theme.json

@@ -359,6 +359,9 @@
 					"margin": "var(--wp--custom--margin--vertical) auto"
 				}
 			},
+			"fontsToLoadFromGoogle": [
+				"family=Red+Hat+Display:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900"
+			],
 			"line-height": {
 				"body": 1.6
 			}