add link to thumbnail fixes #19, load more error display

This commit is contained in:
Ryan Stafford 2023-07-08 22:33:49 -04:00
parent 6685badaca
commit bf0bc421cd
2 changed files with 7 additions and 2 deletions

View file

@ -129,7 +129,8 @@ function loadMore(e) {
} }
}, },
function(res) { function(res) {
e.target.outerHTML = '<input id="end" type="submit" value="loading failed" onclick="loadMore(event)">' e.target.outerHTML = '<input id="loadmore" type="submit" data-page="'+parseInt(page)+'" value="loading failed" onclick="loadMore(event)">'
document.getElementById("loadmore").className = "show"
} }
) )
return false; return false;

View file

@ -21,7 +21,11 @@
{{ end }} {{ end }}
{{ if ne .State.Op "vote_post" }} {{ if ne .State.Op "vote_post" }}
</div> </div>
<div class="thumb"><div {{ if and .Post.NSFW (not (and .State.Community .State.Community.CommunityView.Community.NSFW))}}class="img-blur"{{end}} style="background-image: url({{thumbnail .Post}})"></div></div> <div class="thumb">
<a class="url" href="{{ if .Post.URL.IsValid }}{{ .Post.URL }}{{ else }}/{{ .State.Host }}/post/{{ .Post.ID }}{{ end }}">
<div {{ if and .Post.NSFW (not (and .State.Community .State.Community.CommunityView.Community.NSFW))}}class="img-blur"{{end}} style="background-image: url({{thumbnail .Post}})"></div>
</a>
</div>
<div class="entry"> <div class="entry">
<div class="title"> <div class="title">
<a class="url" href="{{ if .Post.URL.IsValid }}{{ .Post.URL }}{{ else }}/{{ .State.Host }}/post/{{ .Post.ID }}{{ end }}">{{ rmmarkdown .Post.Name }}</a> <a class="url" href="{{ if .Post.URL.IsValid }}{{ .Post.URL }}{{ else }}/{{ .State.Host }}/post/{{ .Post.ID }}{{ end }}">{{ rmmarkdown .Post.Name }}</a>