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

Data Liberation: Add interior pages #375

Open
wants to merge 39 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6b42dd5
Add the guide list pages.
StevenDufresne Dec 20, 2023
d19edac
Update all guides link.
StevenDufresne Dec 20, 2023
d58f6b1
Add the single page view.
StevenDufresne Dec 20, 2023
69d1544
Update the templates.
StevenDufresne Dec 21, 2023
0cecaa7
Fix the breadcrumbs.
StevenDufresne Dec 21, 2023
38fce81
Fix the breadcrumbs.
StevenDufresne Dec 21, 2023
33152fa
Add the border top.
StevenDufresne Dec 22, 2023
069f0c0
Remove the edit link.
StevenDufresne Dec 22, 2023
7d3f419
Remove the links in titles.
StevenDufresne Dec 22, 2023
d487096
Fix the homepage.
StevenDufresne Dec 22, 2023
e64dd41
Fix the miage width
StevenDufresne Dec 22, 2023
bce74bf
Add a callout on the guides page.
StevenDufresne Dec 22, 2023
705f7b2
Add merged changes.
StevenDufresne Jan 15, 2024
bd190bc
Fix more merge conflicts.
StevenDufresne Jan 15, 2024
95d5d8a
Another fix.
StevenDufresne Jan 15, 2024
13b9cb9
another.
StevenDufresne Jan 15, 2024
8653ef6
Another.
StevenDufresne Jan 15, 2024
92b2453
Add space.
StevenDufresne Jan 15, 2024
635e45d
Update one more.
StevenDufresne Jan 15, 2024
835dd86
Remove the search and count for now.
StevenDufresne Jan 15, 2024
9dfecca
Clean up template.
StevenDufresne Jan 15, 2024
c33ccbf
Clean up
StevenDufresne Jan 15, 2024
6238975
Run formatter.
StevenDufresne Jan 22, 2024
cc9fb3c
Update frontpage links.
StevenDufresne Jan 22, 2024
731242d
Simplify the breadcrumbs.
StevenDufresne Jan 22, 2024
ff2f7c8
Remove the post details.
StevenDufresne Jan 22, 2024
6353c07
Add the padding to the container.
StevenDufresne Jan 22, 2024
ded91a8
Fix guides view.
StevenDufresne Jan 22, 2024
462548b
Clean up the template.
StevenDufresne Jan 22, 2024
fd0cc8f
Clean up the template.
StevenDufresne Jan 22, 2024
8a16b35
Clean up the template.
StevenDufresne Jan 22, 2024
431eeaf
Add newlines.
StevenDufresne Jan 22, 2024
96fa7f1
Remove extra line.
StevenDufresne Jan 22, 2024
064d05e
Fix linter.
StevenDufresne Jan 23, 2024
54bdf05
Update site title.
StevenDufresne Jan 23, 2024
5e21c8c
Fix the title, article offset.
StevenDufresne Jan 24, 2024
7716d17
Add last slach to avoid redirect.
StevenDufresne Jan 24, 2024
b5efb17
Add footer to single page.
StevenDufresne Jan 24, 2024
3d237f6
Update heading padding to match ToC.
StevenDufresne Jan 24, 2024
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
59 changes: 59 additions & 0 deletions source/wp-content/themes/wporg-main-2022/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/**
* Actions and filters.
*/
add_filter( 'document_title_parts', __NAMESPACE__ . '\document_title' );
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_assets' );
add_action( 'init', __NAMESPACE__ . '\register_shortcodes' );
add_filter( 'wp_img_tag_add_loading_attr', __NAMESPACE__ . '\override_lazy_loading', 10, 2 );
Expand All @@ -27,6 +28,12 @@
add_filter( 'render_block_data', __NAMESPACE__ . '\update_header_template_part_class' );
add_filter( 'wporg_block_navigation_menus', __NAMESPACE__ . '\add_site_navigation_menus' );

// Remove table of contents.
add_filter( 'wporg_handbook_toc_should_add_toc', '__return_false' );

// Remove the edit link from handbook titles.
add_filter( 'wporg_markdown_should_filter_title', '__return_false' );
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why this filter seems to not exist anymore… I would have thought this would prevent the issue @renintw and I are seeing here. I can't find the filter in the wporg-markdown plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, dang. That was a filter I implemented in my local environment in the markdown plugin. Essentially returning early here.

I discussed this with @dd32 and since we don't use the title anywhere anymore, we agreed we could remove the function altogether and I forgot to update.


/**
* Enqueue scripts and styles.
*/
Expand Down Expand Up @@ -138,6 +145,25 @@ function override_lazy_loading( $value, $image ) {
* Use the page heirarchy to display breadcrumbs.
*/
function update_site_breadcrumbs( $breadcrumbs ) {

// Handle breadcrumbs for the data liberation section.
if ( is_singular( 'and-handbook' ) ) {
return array(
array(
'url' => home_url( '/data-liberation' ),
'title' => __( 'Home', 'wporg' ),
),
array(
'url' => home_url( '/data-liberation/and' ),
'title' => __( 'Guides', 'wporg' ),
),
array(
'url' => false,
'title' => get_the_title(),
Copy link
Contributor

Choose a reason for hiding this comment

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

This would somehow get me the title plus an edit button, is this also the case on your side?

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I also see this, looks like it comes from filter_the_title_edit_link in the wporg-markdown plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is everyone okay with removing that function from the wporg-markdown plugin?

Context: #375 (comment)

Copy link
Contributor

@renintw renintw Jan 24, 2024

Choose a reason for hiding this comment

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

If it's not going to be used anywhere, I also think we can remove it.

),
);
}

$parent = get_post_parent();
if ( ! $parent ) {
return $breadcrumbs;
Expand Down Expand Up @@ -263,6 +289,16 @@ function add_site_navigation_menus( $menus ) {
* @param WP_Block $instance The block instance.
*/
function use_parent_page_title( $block_content, $block, $instance ) {

// Handle the site title for data liberation.
if ( is_post_type_archive( 'and-handbook' ) || is_singular( 'and-handbook' ) ) {
return str_replace(
array( home_url(), get_bloginfo( 'name' ) ),
array( home_url( '/data-liberation' ), __( 'Data Liberation', 'wporg' ) ),
$block_content
);
}

if ( is_home() || is_single() || is_archive() ) {
return str_replace(
array( home_url(), get_bloginfo( 'name' ) ),
Expand Down Expand Up @@ -323,3 +359,26 @@ function update_header_template_part_class( $block ) {
}
return $block;
}

/**
* Append an optimized site name.
*
* @param array $parts {
* The document title parts.
*
* @type string $title Title of the viewed page.
* @type string $page Optional. Page number if paginated.
* @type string $tagline Optional. Site description when on home page.
* @type string $site Optional. Site title when not on home page.
* }
* @return array Filtered title parts.
*/
function document_title( $parts ) {

if ( is_singular( 'and-handbook' ) ) {
// translators: %s: Name of the guide.
$parts['title'] = sprintf( __( '%s - Data Liberation', 'wporg' ), $parts['title'] );
}

return $parts;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
// phpcs:disable WordPress.Files.FileName -- Allow underscore for pattern partial.
/**
* Title: Section Nav (Data Liberation Single)
* Slug: wporg-main-2022/nav-data-liberation-single
* Inserter: no
*/

?>
<!-- wp:pattern {"slug":"wporg-main-2022/nav-data-liberation"} /-->

<!-- wp:group {"className":"wporg-breadcrumbs","align":"full","style":{"spacing":{"padding":{"top":"18px","bottom":"18px","left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space"}}},"backgroundColor":"white","layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} -->
<div class="wporg-breadcrumbs wp-block-group alignfull has-white-background-color has-background" style="padding-top:18px;padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:18px;padding-left:var(--wp--preset--spacing--edge-space)">
<!-- wp:wporg/site-breadcrumbs {"fontSize":"small"} /-->
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
// phpcs:disable WordPress.Files.FileName -- Allow underscore for pattern partial.
/**
* Title: Section Nav (Data Liberation)
* Slug: wporg-main-2022/nav-data-liberation
* Inserter: no
*/

?>

<!-- wp:wporg/local-navigation-bar {"backgroundColor":"charcoal-2","style":{"position":{"type":"sticky"},"elements":{"link":{"color":{"text":"var:preset|color|white"},":hover":{"color":{"text":"var:preset|color|white"}}}}},"textColor":"white","fontSize":"small"} -->
<!-- wp:site-title {"level":0,"fontSize":"small"} /-->
<!-- wp:navigation {"menuSlug":"documentation","icon":"menu","overlayBackgroundColor":"charcoal-2","overlayTextColor":"white","layout":{"type":"flex","orientation":"horizontal"},"fontSize":"small"} /-->
<!-- /wp:wporg/local-navigation-bar -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Title: Data Liberation Guides List
* Slug: wporg-main-2022/data-liberation-guide-single
* Inserter: no
*/

?>
<!-- wp:group {"align":"wide","layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group alignwide"><!-- wp:group {"tagName":"article"} -->
<article class="wp-block-group"><!-- wp:post-title {"level":1,"style":{"spacing":{"margin":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|40"}}}} /-->

<!-- wp:wporg/sidebar-container {"style":{"spacing":{"margin":{"bottom":"40px"}}}} -->
<!-- wp:wporg/table-of-contents /-->
<!-- /wp:wporg/sidebar-container -->

<!-- wp:post-content {"layout":{"inherit":true}} /--></article>
<!-- /wp:group --></div>
<!-- /wp:group -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* Title: Data Liberation Guides List
* Slug: wporg-main-2022/data-liberation-guides
* Inserter: no
*/

?>

<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"right":"var:preset|spacing|edge-space","left":"var:preset|spacing|edge-space"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="padding-right:var(--wp--preset--spacing--edge-space);padding-left:var(--wp--preset--spacing--edge-space)"><!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"top":"var:preset|spacing|60","bottom":"var:preset|spacing|80"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group alignwide" style="padding-top:var(--wp--preset--spacing--60);padding-bottom:var(--wp--preset--spacing--80)"><!-- wp:heading {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|30","top":"0"}}}} -->
<h2 class="wp-block-heading" style="margin-top:0;margin-bottom:var(--wp--preset--spacing--30)">Guides</h2>
<!-- /wp:heading -->

<!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:query {"queryId":2,"query":{"perPage":10,"pages":0,"offset":0,"postType":"and-handbook","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"layout":{"type":"default"}} -->
<div class="wp-block-query"><!-- wp:group {"style":{"border":{"bottom":{"color":"var:preset|color|light-grey-1","width":"1px"}},"spacing":{"margin":{"bottom":"var:preset|spacing|30"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="border-bottom-color:var(--wp--preset--color--light-grey-1);border-bottom-width:1px;margin-bottom:var(--wp--preset--spacing--30)"><!-- wp:post-template {"style":{"spacing":{"blockGap":"0"}},"className":"is-style-border-list"} -->
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20","left":"var:preset|spacing|20","right":"var:preset|spacing|20"},"margin":{"top":"0","bottom":"0"}},"border":{"top":{"color":"var:preset|color|light-grey-1","width":"1px"},"right":{"color":"var:preset|color|light-grey-1","width":"1px"},"bottom":{},"left":{"color":"var:preset|color|light-grey-1","width":"1px"}}},"layout":{"type":"default"}} -->
<div class="wp-block-group" style="border-top-color:var(--wp--preset--color--light-grey-1);border-top-width:1px;border-right-color:var(--wp--preset--color--light-grey-1);border-right-width:1px;border-left-color:var(--wp--preset--color--light-grey-1);border-left-width:1px;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--20);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"><!-- wp:post-title {"level":3,"isLink":true,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"},"elements":{"link":{"color":{"text":"var:preset|color|blueberry-1"}}}},"textColor":"blueberry-1","fontSize":"normal","fontFamily":"inter"} /-->

<!-- wp:post-excerpt {"style":{"spacing":{"margin":{"top":"0","bottom":"0"}}}} /--></div>
<!-- /wp:group -->
<!-- /wp:post-template --></div>
<!-- /wp:group -->

<!-- wp:query-pagination -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-numbers /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:query --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
Original file line number Diff line number Diff line change
Expand Up @@ -30,56 +30,56 @@

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"className":"is-style-cards-grid","layout":{"type":"grid","minimumColumnWidth":"32%"}} -->
<div class="wp-block-group is-style-cards-grid"><!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/squarespace-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/squarespace/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( '<strong>Squarespace to WordPress</strong>', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/tumblr-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/tumblr/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( '<strong>Tumblr to WordPress</strong>', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/html-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/html/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( 'HTML to WordPress', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/rss-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/rss/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( 'RSS to WordPress', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/wix-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/wix/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( '<strong>Wix to WordPress</strong>', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/drupal-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/drupal/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( '<strong>Drupal to WordPress</strong>', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/blogger-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/blogger/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( 'Blogger to WordPress', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper -->

<!-- wp:wporg/link-wrapper -->
<a class="wp-block-wporg-link-wrapper" href="https://github.com/WordPress/move-to-wp/blob/trunk/guides/wordpress-to-wordpress.md"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<a class="wp-block-wporg-link-wrapper" href="<?php echo esc_url( site_url( 'data-liberation/and/wordpress/' ) ); ?>"><!-- wp:heading {"level":3,"style":{"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"fontStyle":"normal","fontWeight":"700"}},"fontSize":"small","fontFamily":"inter"} -->
<h3 class="wp-block-heading has-inter-font-family has-small-font-size" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:700"><?php _e( 'WordPress to WordPress', 'wporg' ); ?></h3>
<!-- /wp:heading --></a>
<!-- /wp:wporg/link-wrapper --></div>
<!-- /wp:group -->

<!-- wp:paragraph {"align":"left","style":{"spacing":{"margin":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20"}}},"fontSize":"small"} -->
<p class="has-text-align-left has-small-font-size" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)"><?php _e( '<a href="https://github.com/WordPress/move-to-wp/tree/trunk/guides">View all guides</a>', 'wporg' ); ?></p>
<p class="has-text-align-left has-small-font-size" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:var(--wp--preset--spacing--20)"><a href="/data-liberation/and"><?php _e( 'View all guides', 'wporg' ); ?></a></p>
<!-- /wp:paragraph --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
Expand Down
4 changes: 4 additions & 0 deletions source/wp-content/themes/wporg-main-2022/src/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,10 @@ $wporg-about-breakpoint-max: 1920px;
text-decoration: none;
}

.single-and-handbook img {
width: 100%;
}

/*
* Workaround for Gutenberg CSS4 selectors on older browsers.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- wp:wporg/global-header {"style":{"border":{"bottom":{"color":"var:preset|color|white-opacity-15","style":"solid","width":"1px"}}}} /-->

<!-- wp:pattern {"slug":"wporg-main-2022/nav-data-liberation"} /-->

<!-- wp:group {"tagName":"main","style":{"spacing":{"blockGap":"0px"}},"className":"entry-content","layout":{"inherit":true,"type":"constrained"}} -->
<main class="wp-block-group entry-content">
<!-- wp:pattern {"slug":"wporg-main-2022/data-liberation-guides"} /-->
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there plans to support translating the data lib pages? If not, we probably don't need to use the pattern process here, since these pages wouldn't be rolled out to rosetta sites. (IIRC we don't have a process for translating handbooks yet, which is why i assume no)

Not a strong suggestion, but it would be one less abstraction, to put the pattern content (query loop, etc) here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I default to yes. We should support it but understand that rosetta experiences vary right now and these pages may never be viewed in other locales... but still feel it should be localized.

Copy link
Contributor

Choose a reason for hiding this comment

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

okay, if we assume that it will be available eventually then 👍🏻 — my aim was to not make more work for the translators.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good thought and something I haven't considered when developing. Thanks.

</main>
<!-- /wp:group -->

<!-- wp:wporg/global-footer /-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!-- wp:wporg/global-header {"style":{"border":{"bottom":{"color":"var:preset|color|white-opacity-15","style":"solid","width":"1px"}}}} /-->

<!-- wp:pattern {"slug":"wporg-main-2022/nav-data-liberation-single"} /-->


Copy link
Contributor

Choose a reason for hiding this comment

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

extra line.

<!-- wp:group {"tagName":"main","style":{"spacing":{"padding":{"left":"var:preset|spacing|edge-space","right":"var:preset|spacing|edge-space","bottom":"var:preset|spacing|70"}}},"className":"alignfull","layout":{"type":"constrained"}} -->
<main class="wp-block-group alignfull" style="padding-right:var(--wp--preset--spacing--edge-space);padding-bottom:var(--wp--preset--spacing--70);padding-left:var(--wp--preset--spacing--edge-space)">
<!-- wp:pattern {"slug":"wporg-main-2022/data-liberation-guide-single"} /-->
</main>
<!-- /wp:group -->
StevenDufresne marked this conversation as resolved.
Show resolved Hide resolved

<!-- wp:wporg/global-footer /-->
9 changes: 9 additions & 0 deletions source/wp-content/themes/wporg-main-2022/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"name": "Newsreader"
}
]
},
"custom": {
"wporg-sidebar-container": {
"spacing": {
"margin": {
"top": "150px"
}
}
}
}
},
"styles": {
Expand Down
Loading