-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add card footer link & secondary card link #238
base: main
Are you sure you want to change the base?
Conversation
I've added styling for secondary card links and added examples to the guidance: ![]() cc: @Graham-Pembrey |
014aef9
to
5ab4fbb
Compare
@@ -44,14 +48,23 @@ | |||
ariaHidden: params.badgeLarge.ariaHidden | |||
}) }} | |||
{% endif %} | |||
{%- if not params.readOnly -%} | |||
{%- if params.readOnly or params.footer.href -%} |
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.
The formatting might have gone weird here but I can't see what this if statement is doing? From the looks of it, it is doing if (nothing) else (chevron)
?
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.
That is what it is doing if (nothing) else (chevron)
, maybe I've galaxy brained it and there's a simpler way to do it? It basically needs to hide the chevron if the card id read only or the footer is a link.
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.
Would it be better to have a params to hide the chevron, eg: chevronHidden: true
?
@@ -20,10 +20,14 @@ | |||
{{ params.aboveContent.html | safe }} | |||
</div> | |||
{%- endif -%} | |||
{%- if params.readOnly -%} | |||
<p class="nhsapp-card__title">{{ params.title }}</p> | |||
{%- if params.readOnly or params.footer.href -%} |
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.
Again Github could of messed up formatting but why checking for footer.href
here?
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.
It's for if read only or a footer link (have no anchor tag) else (have anchor tag)
- maybe there's a better way to achieve this?
The guidance looks good @davidhunter08. I'm in two minds about whether "on hub pages" is needed. On the one hand, we've only currently validated and approved of secondary card links being used on a hub page (the new account area). On the other, teams have been exploring potentially using them on error pages, and in the organ donation journey. They might have wider use? I also wonder if we should specify what we mean by 'less important topics'. Maybe:
|
Description
Notes
On this PR, should we also add the: