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

Move handbook meta info inside complementary landmark #504

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

?>

<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|40"},"margin":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"},"blockGap":"var:preset|spacing|20"},"border":{"top":{"color":"var:preset|color|light-grey-1","width":"1px"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"left","verticalAlignment":"top"},"className":"entry-meta"} -->
<div class="wp-block-group entry-meta" style="border-top-color:var(--wp--preset--color--light-grey-1);border-top-width:1px;margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40);padding-top:var(--wp--preset--spacing--40)">
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|20"},"margin":{"top":"20","bottom":"0"},"blockGap":"5px"},"border":{"top":{"color":"var:preset|color|light-grey-1","width":"1px"}}},"className":"entry-meta","layout":{"type":"flex","orientation":"vertical"}} -->
<div class="wp-block-group entry-meta" style="border-top-color:var(--wp--preset--color--light-grey-1);border-top-width:1px;margin-top:20px;margin-bottom:0;padding-top:var(--wp--preset--spacing--20)">

<!-- wp:wporg/article-meta-date {"heading":"<?php esc_html_e( 'First published', 'wporg' ); ?>"} /-->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ function render( $attributes, $content, $block ) {

$wrapper_attributes = get_block_wrapper_attributes();
return sprintf(
'<aside %1$s><nav>%2$s<ul class="wporg-chapter-list__list">%3$s</ul></nav></aside>',
'<aside %1$s>%2$s<nav>%3$s<ul class="wporg-chapter-list__list">%4$s</ul></nav></aside>',
$wrapper_attributes,
do_blocks( '<!-- wp:pattern {"slug":"wporg-developer-2023/article-meta"} /-->' ),
$header,
$content
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
--local--icon-size: calc(var(--local--line-height) * 1em);
line-height: var(--local--line-height);

display: flex;
flex-direction: column-reverse;

@media (max-width: 767px) {
border: 1px solid var(--wp--preset--color--light-grey-1);
border-radius: 2px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,20 @@ pre {

// Wrap meta on smaller screens. Double class needed to override core style.
.entry-meta.entry-meta {
a {
color: var(--wp--custom--link--color--text);
text-decoration: underline;
}

@media (max-width: 781px) {
flex-wrap: wrap;
margin: 0 !important;
padding: 15px var(--wp--preset--spacing--20) !important;
flex-direction: row;
gap: 20px !important;

> * {
min-width: calc(50% - var(--wp--preset--spacing--20) / 2);
min-width: 30%;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

<!-- wp:post-content /-->

<!-- wp:pattern {"slug":"wporg-developer-2023/article-meta"} /-->

<!-- wp:pattern {"slug":"wporg-developer-2023/handbook-pagination"} /-->

</article>
Expand All @@ -30,7 +28,6 @@
<!-- /wp:group -->

<!-- wp:wporg/sidebar-container {"hasBackToTop":false,"inlineBreakpoint": "768px"} -->

<!-- wp:wporg/chapter-list /-->

<!-- /wp:wporg/sidebar-container -->
Expand Down
Loading