Skip to content

Commit

Permalink
Nicer broken image style
Browse files Browse the repository at this point in the history
Use a broken image icon instead of a warning icon,
because the image could just be missing. A bit more padding
makes it look nicer in the thumbnail background.
  • Loading branch information
tvdeyen committed Jan 16, 2024
1 parent 1e3bad6 commit 136b6e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/alchemy/archive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
&:hover {
text-decoration: none;
}

.icon.error {
padding: 2em;
}
}

.picture_thumbnail {
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/alchemy_admin/image_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class ImageLoader {
onError(evt) {
const message = `Could not load "${this.image.src}"`
this.spinner.stop()
this.parent.innerHTML = `<span class="icon error ri-alert-line" title="${message}" />`
this.parent.innerHTML = `<span class="icon error ri-file-damage-line ri-xl" title="${message}" />`
console.error(message, evt)
this.unbind()
}
Expand Down

0 comments on commit 136b6e9

Please sign in to comment.