Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archeo: Add Image with headline on dark background pattern #5474

Merged
merged 8 commits into from
Feb 8, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added archeo/assets/images/figure-gigantesque.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions archeo/inc/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function archeo_register_block_patterns() {

$block_patterns = array(
'headline-over-dark-image',
'image-with-headline-on-dark-background'
);

/**
Expand Down
17 changes: 17 additions & 0 deletions archeo/inc/patterns/image-with-headline-on-dark-background.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Image with headline on dark background
*/
return array(
'title' => __( 'Image with headline on dark background', 'archeo' ),
'categories' => array( 'pages' ),
'content' => '<!-- wp:media-text {"mediaPosition":"right","mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/figure-gigantesque.jpg","mediaType":"image","imageFill":false,"backgroundColor":"foreground","textColor":"background"} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile has-background-color has-foreground-background-color has-text-color has-background"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/figure-gigantesque.jpg" alt="Photo of gigantic figure at Izamal" class="size-full"/></figure><div class="wp-block-media-text__content">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"clamp(30px, 4vw, 80px)","right":"clamp(30px, 4vw, 80px)","bottom":"clamp(30px, 4vw, 80px)","left":"clamp(30px, 4vw, 80px)"}}}} -->
<div class="wp-block-group" style="padding-top:clamp(30px, 4vw, 80px);padding-right:clamp(30px, 4vw, 80px);padding-bottom:clamp(30px, 4vw, 80px);padding-left:clamp(30px, 4vw, 80px)">
<!-- wp:paragraph {"placeholder":"Content…","style":{"typography":{"fontStyle":"italic","fontWeight":"300","lineHeight":"1.5"}},"fontSize":"large"} -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the line height to 1.4 instead? It's looking a little too spaced out for my liking. I've updated the comps just now to use that value.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

<p class="has-large-font-size" style="font-style:italic;font-weight:300;line-height:1.5">' . wp_kses_post( __( 'Figure gigantesque, <br>à Izamal; au bas de la seconde pyramide', 'archeo' ) ) . '</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to do anything different given that this isn't in English? Should it even be translated? @Automattic/i18n

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The translators expect English text in originals, so it'd be a problem to get it translated. On the other hand, leaving it untranslated would mean that non-English users would see the same French text in any language.
Would it be possible to use an English original here instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think it's fine to keep this in the original language. It's just a placeholder anyway.

<!-- /wp:paragraph --></div>
<!-- /wp:group --></div></div>
<!-- /wp:media-text -->',
);