Skip to content

Commit

Permalink
added photo tag counter in album view
Browse files Browse the repository at this point in the history
  • Loading branch information
ToMaarton committed Oct 15, 2024
1 parent 18ffadc commit 5515fbe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/components/cards/photo-album-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{{#if album.amountOfTags}}
<span class='album-tag-counter badge bg-info bottom-0 end-0'>

Check failure on line 15 in app/components/cards/photo-album-card.hbs

View workflow job for this annotation

GitHub Actions / Lint

Incorrect indentation for `<span>` beginning at L15:C10. Expected `<span>` to be at an indentation of 8 but was found at 10.
<FaIcon @icon='tag' />
{{album.amountOfTags}}, {{album.amountOfTaggedPhotos}}/{{album.amountOfPhotos}}
{{album.amountOfTaggedPhotos}}/{{album.amountOfPhotos}}
</span>
{{/if}}
</div>
Expand Down
1 change: 1 addition & 0 deletions app/styles/routes/photos.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
bottom: 0;
margin-bottom: 1rem;
margin-left: 15px;
margin-right: 15px;
padding-left: 5px;
}

Expand Down
12 changes: 9 additions & 3 deletions app/templates/photo-albums/photo-album/photos/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@
@route='photo-albums.photo-album.photos.photo'
@model={{photo.id}}
>
{{#if photo.amountOfComments}}
{{#if (or photo.amountOfComments photo.amountOfTags)}}
<span class='comments-counter badge bg-info bottom-0 start-0'>
<FaIcon @icon='comments' />
{{photo.amountOfComments}}
{{#if photo.amountOfComments}}
<FaIcon @icon='comments' />
{{photo.amountOfComments}}
{{/if}}
{{#if photo.amountOfTags}}
<FaIcon @icon='tag' />
{{photo.amountOfTags}}
{{/if}}
</span>
{{/if}}
<img class='image' src='{{photo.imageThumbUrl}}' />
Expand Down

0 comments on commit 5515fbe

Please sign in to comment.