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 0511831
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
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
5 changes: 3 additions & 2 deletions app/assets/stylesheets/alchemy/elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,11 @@ alchemy-publish-element-button {

.icon {
font-size: 3em;
color: var(--color-grey_dark);
color: $default-border-color;

&.error {
font-size: 1.2em;
font-size: 16px;
color: $icon-color;
}
}
}
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 0511831

Please sign in to comment.