Ghost/ghost/admin/app/templates/components/gh-unsplash-photo.hbs

22 lines
1.7 KiB
Handlebars
Raw Normal View History

<a class="gh-unsplash-photo" href="#" onclick={{action "zoom"}} data-unsplash-zoomed-photo={{if zoomed photo.id}} data-test-unsplash-photo={{photo.id}} style={{style}}>
<div class="gh-unsplash-photo-container" style={{containerStyle}} data-test-unsplash-photo-container>
<img src={{imageUrl}} alt={{photo.description}} width={{width}} height={{height}} data-test-unsplash-photo-image />
<div class="gh-unsplash-photo-overlay">
<div class="gh-unsplash-photo-header">
<a class="gh-unsplash-button-likes gh-unsplash-button" href="{{photo.links.html}}?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit" target="_blank">{{svg-jar "unsplash-heart"}}{{photo.likes}}</a>
<a class="gh-unsplash-button-download gh-unsplash-button" href="{{photo.links.download}}/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit&force=true">{{svg-jar "download"}}</a>
</div>
<div class="gh-unsplash-photo-footer">
<div class="gh-unsplash-photo-author">
<a class="gh-unsplash-photo-author-img" href="{{photo.user.links.html}}?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit" target="_blank">
<img src="{{photo.user.profile_image.medium}}" />
</a>
<a class="gh-unsplash-photo-author-name" href="{{photo.user.links.html}}?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit" target="_blank">
{{photo.user.name}}
</a>
</div>
<a class="gh-unsplash-button" href="#" onclick={{action "select"}}>Insert image</a>
</div>
</div>
</div>
</a>