-
Notifications
You must be signed in to change notification settings - Fork 306
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
Component: Refactor kicker deck and title #7747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lcummings12 This is a good start. We should expand the scope of this card to cover all templates that use the kicker, title and summary fields.
Insted of just the guides page, each of the content/**/single.html
templates use these fields.
It would be ideal to extract this into a page-header
component that can be used for all templates pages and not just the guides.
I've updated the trello card description to expand the scope and provide some directions.
Note
We do not link trello cards in PR's to prevent access to our trello board. I've removed the link in the description.
The new page-header
component should not include grid styles, we will set those in the template (single.html, list.html) that includes the component partial.
Sample Code
{{- if .Params.kicker -}}
<p class="kicker">{{- .Params.kicker -}}</p>
{{- end -}}
{{/* Page Title */}}
<h1>{{- .Title | markdownify -}}</h1>
{{/* Deck */}}
{{- if .Params.deck -}}
<div class="deck">{{- .Params.deck | markdownify -}}</div>
{{- end -}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lcummings12! Overall I think this is moving in the right direction. some suggestions below:
- Consider renaming to something more generic, e.g. 'page-header.html' or 'page-details.html' to use in all single.html and list.html markup templates.
- Add comments explaining usage and required parameters
Closing, replaced by #7803 |
Summary
To enhance clarity, a new partial called universal-header.html was created which is designed to handle the display logic for page headers.
Preview
Solution
A new partial, guide-details.html, was created to separate the logic for guide headers from the main template. This partial is integrated into the existing guide-header.html.
How To Test
A correct implementation should have no visual differentiation from the production site. Attached are two images showing this.
Dev Checklist