Skip to content

Theme preview: Create preview page and show wp-themes.com preview#39

Merged
ryelle merged 8 commits intotrunkfrom
add/theme-preview
Apr 26, 2024
Merged

Theme preview: Create preview page and show wp-themes.com preview#39
ryelle merged 8 commits intotrunkfrom
add/theme-preview

Conversation

@ryelle
Copy link
Collaborator

@ryelle ryelle commented Apr 25, 2024

See #38 — This adds a new path to the site, ex https://wordpress.org/themes/twentytwentyfour/preview/, which will show a new preview.html template. The preview template sets up 2 columns, on the left is the theme information, and the right has the iframed preview of wp-themes.com.

This matches the current production previewer with the following features:

  • The page loads the theme preview, with theme info
  • The preview can toggle between three screen sizes
  • There is a download button
  • There is a back button to return to the theme details page
  • It is possible to preview a pattern page /twentytwentytwo/preview/?pattern_name=twentytwentytwo%2Ffooter-about-title-logo
  • Viewing a style variation shows the theme with that applied /twentytwentytwo/preview/?style_variation=pink
  • New: Combining the two also works /twentytwentytwo/preview/?pattern_name=twentytwentytwo%2Ffooter-about-title-logo&style_variation=pink

Additionally, I've added in the available patterns to the sidebar, clicking a pattern will load that preview. This can create a very long list though, so I can easily remove it if necessary.

In following PRs:

  • Adjust the frame on small screens
  • The style variations list is not available yet, once the block is built it can be added here
  • Maybe remove patterns list

Screenshots

Screenshot
Previewer (default) previewer-1
Previewer (mobile) previewer-m
Previewer (different style variation) previewer-style

@ryelle ryelle self-assigned this Apr 25, 2024
@ryelle ryelle added [Component] Theme Templates, patterns, CSS [Component] Blocks Custom blocks or block variations labels Apr 25, 2024
@ryelle ryelle merged commit 6779fd0 into trunk Apr 26, 2024
@ryelle ryelle deleted the add/theme-preview branch April 26, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Component] Blocks Custom blocks or block variations [Component] Theme Templates, patterns, CSS

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant