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

User Story: Site Editor create two 'hero blocks' with custom content and set each to different background color #21

Closed
stpaultim opened this issue Jul 10, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@stpaultim
Copy link
Member

stpaultim commented Jul 10, 2019

I would like for a site editor to be able to create two full width blocks on the home page of the site with custom content in each and then be able to use the color module (theme settings) to select a different color background for each one.

See here:

Screen_Capture_Result

This is currently possible in the Tatsu theme, but I am looking for feedback on whether or not there is a better way to do this. I will describe the current solution in the first comment.

@stpaultim stpaultim added the enhancement New feature or request label Jul 10, 2019
@stpaultim
Copy link
Member Author

stpaultim commented Jul 10, 2019

hero region = region in which background image or color stretches from one side of page to the other.

My initial thought on how to accomplish this was:

  1. To provide a layout with more than one "hero region" and then configure the color module to set the background color for each one.
  2. Using currently available blocks and theming, the site editor can create custom blocks in each region and add the "container" class to the block (to center the text and prevent it from bleeding to each edge).
  3. The site editor can then use the theme settings to set the background color in each region.

Tatsu_settings___Tatsu_Test

This method required a layout with more than one hero region if the user wants more than one background color. I was unable to find any existing core or contrib layouts with more than one hero region, so I forked the boxton-hero layout and gave it a total of 4 hero regions. 4 hero regions provide for plenty of flexibility. A user editor can mix hero image blocks and custom content blocks with up to 4 different background colors to achieve a very long page with lots of different blocks that stretch from one side to another.

For now, I added this new layout "Tatsu-hero" to the theme with instructions to move it to the layout directory. See discussion about this: #10

@stpaultim
Copy link
Member Author

stpaultim commented Jul 10, 2019

In defining this problem, the obvious solution occurred to me. I need a custom/contrib "hero block" that allows a user to set the background color for the block instead of an image. With such a block, we would no longer need multiple hero regions.

In fact, I am going to create a core issue that suggests that we add this functionality to the core provided "hero block."

Home_page__home____Tatsu_Test

Any other ideas?

See screenshots of Drupal 7 module:
backdrop/backdrop-issues#3918 (comment)

@stpaultim
Copy link
Member Author

stpaultim commented Oct 20, 2019

This is now possible with Configurable Block Styles contrib module

We are recommending this module for use with this theme, especially if you are looking for heaving UI custom options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant