-
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
feat(DH): Add card last created #7
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3ad612f
feat(datahub): Add card for last created result, WIP
Angi-Kinas 110330e
feat(DH): Add more styling, add click behaviour
Angi-Kinas abc1132
Add color codes, add tailwind class
Angi-Kinas 7fdd4ea
Update extending component
Angi-Kinas 43e7798
feat(DH): Remove unnessecary logic,
Angi-Kinas d4ce2d9
feat(DH): Move logic to parent class,
Angi-Kinas ab006b3
feat(last-created): Add style
Angi-Kinas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 35 additions & 14 deletions
49
...mmon/results-list-item/results-card-last-created/results-card-last-created.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,37 @@ | ||
<div | ||
class="h-full border bg-blue-200 rounded-sm overflow-hidden transition duration-200 transform hover:scale-105 hover:bg-gray-50 border-gray-300 hover:border-primary hover:text-primary" | ||
<a | ||
[title]="record.title" | ||
(click)="mdSelect.emit(record)" | ||
class="bg-gray-8 group flex flex-col justify-between relative h-40 p-[16px] w-[330px] rounded border border-gray-6 filter overflow-hidden cursor-pointer hover:drop-shadow-lg" | ||
> | ||
<a [title]="record.abstract" (click)="mdSelect.emit(record)"> | ||
<div class="flex flex-col min-h-full cursor-pointer"> | ||
<div class="grow p-4"> | ||
<h1 class="title-font text-lg font-medium mb-3 clamp-2"> | ||
{{ record.title }} | ||
</h1> | ||
<p class="leading-relaxed text-sm text-gray-700 clamp-3"> | ||
{{ record.abstract }} | ||
</p> | ||
</div> | ||
<h1 class="font-bold text-[17px] line-clamp-2"> | ||
{{ record.title }} | ||
</h1> | ||
|
||
<div class="flex flex-col justify-between w-[calc(100%-80px)]"> | ||
@if(creationDate){ | ||
<div class="text-sm mb-[10px] leading-none">{{ creationDate }}</div> | ||
} @if(record.keywords?.length) { | ||
<div class="flex gap-1"> | ||
@for(keyword of record.keywords.slice(0, 2); track | ||
record.uniqueIdentifier) { | ||
<button | ||
type="button" | ||
[attr.aria-label]="keyword" | ||
[title]="keyword" | ||
class="mel-badge-button truncate" | ||
(click)="onKeywordClick(keyword, $event)" | ||
> | ||
{{ keyword }} | ||
</button> | ||
} | ||
</div> | ||
</a> | ||
</div> | ||
} | ||
</div> | ||
|
||
@if(shownOrganization?.logoUrl?.href){<gn-ui-thumbnail | ||
class="absolute right-[10px] bottom-[10px] w-[80px] h-[80px]" | ||
[thumbnailUrl]="shownOrganization?.logoUrl?.href" | ||
fit="contain" | ||
></gn-ui-thumbnail | ||
>} | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
apps/datahub/src/app/common/results-list/results-list-grid/results-list-grid.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Could it make sense to define a tailwind component for card titles, for example?
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.
Yes and no. In the favorite card the title is only supposed to be one line... that leaves only
font-bold text-[17px]
for the tailwind component. I don't know if it's worth the implementation.