Skip to content

Commit

Permalink
add link to thumbnail fixes #19, load more error display
Browse files Browse the repository at this point in the history
  • Loading branch information
rystaf committed Jul 9, 2023
1 parent 6685bad commit bf0bc42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion public/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ function loadMore(e) {
}
},
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;
Expand Down
6 changes: 5 additions & 1 deletion templates/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
{{ end }}
{{ if ne .State.Op "vote_post" }}
</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="title">
<a class="url" href="{{ if .Post.URL.IsValid }}{{ .Post.URL }}{{ else }}/{{ .State.Host }}/post/{{ .Post.ID }}{{ end }}">{{ rmmarkdown .Post.Name }}</a>
Expand Down

0 comments on commit bf0bc42

Please sign in to comment.