💄(plugins) added 'large-banner' plugin template variant 'compacted-banner' #2499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
It was required to have a compacted block available for page contents and that allowed to insert a title with the search bar and some buttons.
Mockup for expected display was this:
Proposal
Since expected block contents was nearly identical to the ones from plugin 'large-banner', we just implemented this compacted block with existing a new template variant (and related CSS) for this plugin.
This new feature includes:
Notices
Backgrounds
As required, plugin image and logo are ignored from this template because the compacted form is expected to be simple.
Content title
The variant 'hero-intro' was styling a specific class
hero-intro__title
that was required to append in HTML content to work, so existing content may have this and since of BEM scope it would still work inside compacted variant but this is unwanted since it is not very compact.So the CSS class
.compacted-banner
include a rule.hero-intro__title
to disable it, but this can not work with the text font-size. I recommend we assume that writers will be made aware about it for migrating existing banner to the compacted variant and will just remove it and so we can just remove it from the CSS. For compatibility there is also a rule.compacter-banner__title
that is identical to.hero-intro__title
, we may probably remove it also.Buttons
Mockup includes two CTA buttons but there is only one in the default Richie template, this is something to change from sites templates overriding.
Sample screenshot
On mobile, the search bar and buttons just stack vertically.
This has been taken on bare Richie Sass settings (opposed to the mockup that has been done from funmooc settings).