mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-25 14:49:07 +00:00
noscript pager fixes
This commit is contained in:
parent
b9cf0c4835
commit
dcc3cd4d49
|
@ -377,7 +377,7 @@ form.nsfw div {
|
||||||
top: 1px;
|
top: 1px;
|
||||||
}
|
}
|
||||||
.pager {
|
.pager {
|
||||||
margin: 10px;
|
margin: 20px 0px;
|
||||||
}
|
}
|
||||||
.pager a {
|
.pager a {
|
||||||
padding: 1px 4px;
|
padding: 1px 4px;
|
||||||
|
@ -471,7 +471,7 @@ form.nsfw div {
|
||||||
.expando-button:hover{
|
.expando-button:hover{
|
||||||
background-color: #466599;
|
background-color: #466599;
|
||||||
}
|
}
|
||||||
.expando-button.hidden, .children.hidden {
|
.expando-button.hidden, .children.hidden .comment {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.hidechildren .show {
|
.hidechildren .show {
|
||||||
|
|
|
@ -304,6 +304,9 @@ function setup() {
|
||||||
hidechildren.addEventListener("click", hideAllChildComments)
|
hidechildren.addEventListener("click", hideAllChildComments)
|
||||||
}
|
}
|
||||||
if (lmc = document.getElementById("lmc")){
|
if (lmc = document.getElementById("lmc")){
|
||||||
|
if (pager = document.getElementsByClassName("pager")){
|
||||||
|
pager[0].style.display = "none";
|
||||||
|
}
|
||||||
lmc.addEventListener("click", loadMoreComments)
|
lmc.addEventListener("click", loadMoreComments)
|
||||||
}
|
}
|
||||||
var posts = document.getElementsByClassName("post")
|
var posts = document.getElementsByClassName("post")
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<head>
|
<head>
|
||||||
<title>{{ if and .Community (ne .Community.CommunityView.Community.Title "")}}{{.Community.CommunityView.Community.Title}}{{else if ne .CommunityName ""}}/c/{{.CommunityName}}{{ else if .User}}overview for {{.User.PersonView.Person.Name}}{{else}}{{ host .Host }}{{end}}</title>
|
<title>{{ if and .Community (ne .Community.CommunityView.Community.Title "")}}{{.Community.CommunityView.Community.Title}}{{else if ne .CommunityName ""}}/c/{{.CommunityName}}{{ else if .User}}overview for {{.User.PersonView.Person.Name}}{{else}}{{ host .Host }}{{end}}</title>
|
||||||
<link rel="shortcut icon" href="/{{.Host}}/icon.jpg">
|
<link rel="shortcut icon" href="/{{.Host}}/icon.jpg">
|
||||||
<link rel="stylesheet" href="/_/static/style.css?v=20">
|
<link rel="stylesheet" href="/_/static/style.css?v=21">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
</head>
|
</head>
|
||||||
<body {{ if .Dark }}class="dark"{{end}}>
|
<body {{ if .Dark }}class="dark"{{end}}>
|
||||||
|
@ -56,6 +56,6 @@
|
||||||
{{ template "sidebar.html" . }}
|
{{ template "sidebar.html" . }}
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<script src="/_/static/utils.js?v=14"></script>
|
<script src="/_/static/utils.js?v=15"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<title>{{if and .Posts .PostID }}{{ (index .Posts 0).Post.Name}} : {{.CommunityName}}{{else if and .Community (ne .Community.CommunityView.Community.Title "")}}{{.Community.CommunityView.Community.Title}}{{else if ne .CommunityName ""}}/c/{{.CommunityName}}{{ else if .User}}overview for {{.User.PersonView.Person.Name}}{{else}}{{ host .Host }}{{end}}</title>
|
<title>{{if and .Posts .PostID }}{{ (index .Posts 0).Post.Name}} : {{.CommunityName}}{{else if and .Community (ne .Community.CommunityView.Community.Title "")}}{{.Community.CommunityView.Community.Title}}{{else if ne .CommunityName ""}}/c/{{.CommunityName}}{{ else if .User}}overview for {{.User.PersonView.Person.Name}}{{else}}{{ host .Host }}{{end}}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<link rel="shortcut icon" href="/{{.Host}}/icon.jpg">
|
<link rel="shortcut icon" href="/{{.Host}}/icon.jpg">
|
||||||
<link rel="stylesheet" href="/_/static/style.css?v=20">
|
<link rel="stylesheet" href="/_/static/style.css?v=21">
|
||||||
</head>
|
</head>
|
||||||
<body{{ if .Dark }} class="dark"{{end}}>
|
<body{{ if .Dark }} class="dark"{{end}}>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
@ -12,6 +12,7 @@
|
||||||
.expando-button,
|
.expando-button,
|
||||||
.minimize,
|
.minimize,
|
||||||
#showimages,
|
#showimages,
|
||||||
|
#lmc,
|
||||||
.hidechildren {
|
.hidechildren {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div class="commentmenu">
|
<div class="commentmenu">
|
||||||
{{if .Comments}}{{if gt .Page 1}}next{{else if or (lt .CommentCount 200) (lt (index .Posts 0).Counts.Comments .CommentCount) }}all{{else}}top{{end}} {{.CommentCount}} comments{{else}} no comments (yet){{end}}
|
{{if .Comments}}{{if gt .Page 1}}(page {{ .Page }}) {{else if lt (index .Posts 0).Counts.Comments .CommentCount }}all{{else}}top{{end}} {{.CommentCount}} comments{{else}} no comments (yet){{end}}
|
||||||
<div>
|
<div>
|
||||||
sorted by:
|
sorted by:
|
||||||
<a {{ if eq .Sort "Hot"}}class="selected"{{end}} href="{{ .SortBy "Hot"}}">hot</a>
|
<a {{ if eq .Sort "Hot"}}class="selected"{{end}} href="{{ .SortBy "Hot"}}">hot</a>
|
||||||
|
@ -123,14 +124,16 @@
|
||||||
<div class="error">there doesn't seem to be anything here</div>
|
<div class="error">there doesn't seem to be anything here</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if or .Query (eq .SearchType "Communities") (eq (len .Posts) 25) (and .User (or (gt .User.PersonView.Counts.CommentCount 10) (gt .User.PersonView.Counts.PostCount 10))) }}
|
{{ if or .Query (eq .SearchType "Communities") (eq (len .Posts) 25) (and .Comments (gt (index .Posts 0).Counts.Comments .CommentCount) (not .CommentID)) (and .User (or (gt .User.PersonView.Counts.CommentCount 10) (gt .User.PersonView.Counts.PostCount 10))) }}
|
||||||
<div class="pager">
|
<div class="pager">
|
||||||
view more: {{if gt .Page 1 }}<a href="{{ .PrevPage }}">‹ prev</a>{{ end }} <a href="{{ .NextPage }}">next ›</a>
|
view more: {{if gt .Page 1 }}<a href="{{ .PrevPage }}">‹ prev</a>{{ end }} <a href="{{ .NextPage }}">next ›</a>
|
||||||
</div>
|
</div>
|
||||||
|
{{ if not .PostID }}
|
||||||
<input id="loadmore" type="submit" value="load more" data-page="2">
|
<input id="loadmore" type="submit" value="load more" data-page="2">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<script src="/_/static/utils.js?v=14"></script>
|
<script src="/_/static/utils.js?v=15"></script>
|
||||||
{{ template "sidebar.html" . }}
|
{{ template "sidebar.html" . }}
|
||||||
</main>
|
</main>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue