Skip to content

Commit

Permalink
Merge pull request #395 from GDGAhmedabad/feat/add-user-placeholder-i…
Browse files Browse the repository at this point in the history
…mage

[Update] show user placeholder if no image url exist
  • Loading branch information
ravirupareliya authored Nov 10, 2024
2 parents 0bd0fec + 6b80a9a commit c2759bf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
Binary file added public/images/user-placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 13 additions & 5 deletions src/pages/meet-the-talent-detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ export class MeetTheTalentDetail extends ReduxMixin(PolymerElement) {
font-color="[[heroSettings.fontColor]]"
>
<div class="dialog-container header-content" layout horizontal center>
<lazy-image
class="photo"
src="[[talentDetails.imageUrl]]"
alt="[[talentDetails.fullName]]">
</lazy-image>
<template is="dom-if" if="[[talent.imageUrl]]">
<lazy-image
class="photo"
src="[[talentDetails.imageUrl]]"
alt="[[talentDetails.fullName]]">
</lazy-image>
</template>
<template is="dom-if" if="[[!talent.imageUrl]]">
<lazy-image
class="photo"
src="/images/user-placeholder.png"
></lazy-image>
</template>
<div>
<h2 class="name" flex>
[[talentDetails.fullName]]
Expand Down
6 changes: 6 additions & 0 deletions src/pages/meet-the-talent-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ export class MeetTheTalentPage extends ReduxMixin(PolymerElement) {
alt="[[talent.fullName]]"
></lazy-image>
</template>
<template is="dom-if" if="[[!talent.imageUrl]]">
<lazy-image
class="photo"
src="/images/user-placeholder.png"
></lazy-image>
</template>
<div class="description">
<h2 class="name">[[talent.fullName]]</h2>
<div class="origin">[[talent.location]]</div>
Expand Down

0 comments on commit c2759bf

Please sign in to comment.