fix breaking images

pull/24/head
Akhil Gupta 4 years ago
parent 55916d584d
commit 60b33e6e99

@ -51,7 +51,7 @@ hr{
<div class="podcasts row">
<div class="columns two">
<img class="u-full-width" src="{{ .Image }}" alt="{{ .Title }}">
<img onerror="onImageError(this)" class="u-full-width" src="{{ .Image }}" alt="{{ .Title }}">
</div>
<div class="columns ten">

@ -42,7 +42,7 @@
{{range .podcasts}}
<div class="podcasts row" id="podcast-{{ .ID }}">
<div class="columns two">
<img class="u-full-width" src="{{ .Image }}" alt="{{ .Title }}">
<img onerror="onImageError(this)" class="u-full-width" src="{{ .Image }}" alt="{{ .Title }}">
</div>
<div class="columns ten">
<a style="text-decoration: none;" href="/podcasts/{{ .ID }}/view"> <h3>{{.Title}}</h3></a>

@ -0,0 +1,3 @@
{{define "podcastlist"}}
{{end}}

@ -5,5 +5,10 @@
<script>
Vue.use(Toasted)
function onImageError(image){
image.onerror = "";
image.src = "/webassets/blank.png";
return true;
}
</script>
{{end}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Loading…
Cancel
Save