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

Port request: Zen theme #782

Open
jenlampton opened this issue May 7, 2024 · 4 comments
Open

Port request: Zen theme #782

jenlampton opened this issue May 7, 2024 · 4 comments

Comments

@jenlampton
Copy link
Member

Name of the module, theme, or layout
Zen

Link to the drupal.org module, theme, or layout
https://www.drupal.org/project/zen

Link to the Drupal 7 source code
https://git.drupalcode.org/project/zen/-/tree/7.x-6.x?ref_type=heads

(Optional) Link to an issue in the drupal.org queue asking the Drupal community if anyone is working on a Backdrop port of this project
@todo

Initial reactions:

  • Zen 6.4 is the latest stable release
  • theme settings will need testing
  • _zen_preprocess_html sets order of CSS files
  • drush support should be switched to bee (or duplicated)

Template files

  • block--no-wrapper.tpl.php - backdrop_attributes $title_attributes
  • block.tpl.php - implode $classes, backdrop_attributes $title_attributes
  • comment.tpl.php - implode $classes, backdrop_attributes $attributes & $title_attributes
  • html.tpl.php - rename to page.tpl.php, remove IE support
  • maintenance-page.tpl.php - remove IE support, remove all layouts
  • node.tpl.php - implode $classes, backdrop_attributes $attributes & $title_attributes, add comment-wrapper
  • page.tpl.php - move into zen_layouts as layout.tpl.php, copy header stuff into header.tpl.php
  • user-picture.tpl.php - leave as-is

Template files to delete

  • comment-wrapper.tpl.php -- move this code to node.tpl.php
  • pane-header.tpl.php -- remove
  • pane-messages.tpl.php -- remove
  • pane-navigation.tpl.php -- remove
  • panels-pane--no-wrapper.tpl.php -- remove
  • panels-pane.tpl.php -- remove
  • region--footer.tpl.php -- remove
  • region--no-wrapper.tpl.php -- remove
  • region.tpl.php -- remove

Preprocess functions:

  • zen_preprocess_html - remove RDF support, remove IE support, keep body classes etc
  • zen_preprocess_page - all this does is process the secondary menu heading, maybe remove? upgrade path?
  • zen_preprocess_maintenance_page - duplicates zen_preprocess_html, remove region support
  • zen_preprocess_node - update class array keys
  • zen_preprocess_comment - update class array keys
  • zen_preprocess_region - see theme_layout_region_inner maybe also create matching zen_layouts project
  • zen_preprocess_block - no block_html_id, update class array keys,
  • zen_preprocess_menu_link - leave as-is

Process functions

  • zen_process_html - remove, solved by page template implode()
  • zen_process_html_tag => no theme_html_tag in backdrop. This fixes script tags. see if backdrop_add_js is useful here?
  • zen_process_maintenance_page - remove, solved by page template implode()
  • zen_process_block - done in backdrop, remove.

Theme function overrodes:

  • breadcrumbs - leave as-is
  • zen_menu_local_tasks - leave as-is
  • zen_menu_local_task - leave as-is
  • zen_status_messages - re copy from core, add BEM classes
  • zen_mark - leave as-is
  • zen_panels_default_style_render_region - remove

Alter functions:

  • zen_html_head_alter - Simplify the meta tag for character encoding.
  • zen_page_alter - rework, no page_alter in B, there's a last_in_region setting: rework for layouts
  • zen_form_node_form_alter - leave as-is

maybe also create matching zen_layouts project

  • see zen_preprocess_region
  • see zen-no-wrapper panels layout
  • see page.tpl.php
  • see extras/sass/layouts
  • see extras/text-replacements/layouts
@stpaultim
Copy link
Contributor

@jenlampton I'm not sure if you saw this, but FYI: https://forum.backdropcms.org/forum/themes-anything-zen

@joe-maine
Copy link

I also posted "Backdrop port of 7.56" @ https://www.drupal.org/project/zen/issues/3445510
I never made the jump to Zen 7.6, I've used the Zen 7.56 on several "starterkits". 7.56 just seemed to be more stable. I can't remember if there was a difficult upgrade from 7.56 to 7.6. Zen has great documentation and with more than 30,000 sites using it... a Backdrop version could bring many new Backdrop sites. I'm not a developer but will follow this port request and offer as much input as I can.
Thank you @jenlampton for bringing up this issue and for your tremendous effort to help build the Backdrop community. Thank you @stpaultim for your speedy responses to questions and your efforts with Backdrop.

@jenlampton
Copy link
Member Author

jenlampton commented May 8, 2024

@joe-maine After reviewing the Zen theme I'm actually feeling more confident about working on a port. I had expected it to be larger and more complex than I found.

@joe-maine
Copy link

joe-maine commented May 8, 2024

@jenlampton - that's great news! I hope the port will work from either 7.5 or 7.6 and will include a new starterkit. I'm looking forward to testing. It's taking a while to get my old D-7 sites ready for the jump to Backdrop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants