-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: Implement new design for asset cards #253
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.
Works nicely. I think there are couple of things we could improve here but given we are working towards MVP and will get a more refined design to work with, it's better to work on them later.
I know it's not part of design but the button to get image tag seems necessary if this version is made live at any point of time.
Thanks for the awesome work 🥳
<div class="p-asset-card p-equal-height-row__col" style=""> | ||
<div class="p-equal-height-row__item" style="max-height:6rem;"> | ||
{% if asset.asset_type == "whitepaper" %} | ||
<img class="p-asset-card--thumbnail" src="https://assets.ubuntu.com/v1/b061c401-White+paper.svg" alt=""> | ||
{% else %} | ||
<img class="p-asset-card--thumbnail" src="https://assets.ubuntu.com/v1/fd84bbdc-Document-open.svg" alt=""> | ||
{% endif %} | ||
</div> | ||
<div class="p-equal-height-row__item"> | ||
{% if asset.name %} | ||
<p><strong>{{ asset.name }}</strong></p> | ||
{% else %} | ||
<p><strong>{{ asset.file_path.split('.')[0] }}</strong></p> | ||
{% endif %} | ||
<p class="u-no-margin--bottom">File type: <strong>.{{ asset.file_path.split('.', 1)[1] }}</strong></p> | ||
<p>Asset type: <strong>{{ asset.asset_type }}</strong></p> | ||
<p> | ||
Tags: | ||
{% for tag in asset.tags %} | ||
<strong>{{ tag.name }}{% if not loop.last %},{% endif %}</strong> | ||
{% endfor %} | ||
</p> | ||
<p> |
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.
Just wondering if we could use a single template with some conditions for asset-card and asset-card-image
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.
I think we should keep them separate for now as we don't know how different they are going to look in the end.
Done
/details
for a detailed view of each assetQA
Issue / Card
Fixes https://warthogs.atlassian.net/browse/WD-15205