Initial commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<script>
|
||||
let { src, fallback = '/images/default_cover.jpg', class: className = '' } = $props();
|
||||
|
||||
async function handleError(e) {
|
||||
e.target.src = fallback;
|
||||
}
|
||||
</script>
|
||||
|
||||
<img {src} onerror={handleError} class={className} alt="book cover" />
|
||||
Reference in New Issue
Block a user