mlmym/templates/frontpage.html

61 lines
2.2 KiB
HTML
Raw Normal View History

2023-06-30 19:41:35 +00:00
<!DOCTYPE html>
<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>
2023-06-30 19:41:35 +00:00
<link rel="shortcut icon" href="/{{.Host}}/icon.jpg">
<link rel="stylesheet" href="/_/static/style.css?v=12">
<meta name="viewport" content="width=device-width, initial-scale=1" />
2023-06-30 19:41:35 +00:00
</head>
2023-07-03 00:11:13 +00:00
<body {{ if .Dark }}class="dark"{{end}}>
2023-06-30 19:41:35 +00:00
<noscript>
<style>
2023-07-05 20:20:34 +00:00
.expando-button,
.minimize,
2023-07-05 22:34:46 +00:00
#loadmore,
2023-07-05 20:20:34 +00:00
.hidechildren {
2023-06-30 19:41:35 +00:00
display: none;
}
2023-07-05 22:34:46 +00:00
div.pager {
display: block;
}
2023-07-05 20:20:34 +00:00
.post .expando .image img {
visibility: visible;
2023-06-30 19:41:35 +00:00
}
</style>
</noscript>
{{ template "nav.html" . -}}
{{ if and (not .ShowNSFW) .Community .Community.CommunityView.Community.NSFW }}
{{ template "nsfw.html" }}
{{ else }}
2023-07-03 00:11:13 +00:00
<main>
{{ if or (contains .Sort "Top") (and (not .PostID) (not .User) (not .Community) (not .Activities) (eq .Op ""))}}
{{ template "menu.html" . }}
{{ end}}
2023-06-30 19:41:35 +00:00
{{ if .Error }}
2023-06-30 19:41:35 +00:00
<div class="error">{{.Error}}</div>
{{ end }}
2023-06-30 19:41:35 +00:00
{{ range .Posts }}
{{ template "post.html" . }}
{{ end }}
2023-06-30 19:41:35 +00:00
{{ if or (and (not .Op) (not .Activities) (not .Comments) (not .Posts) (not .Communities)) (and (not .Comments) .PostID) (and (not .Activities) (not .Query) .User) }}
<div class="error">there doesn't seem to be anything here</div>
{{ end }}
2023-06-30 19:41:35 +00:00
{{ if or .Query (eq .SearchType "Communities") (eq (len .Posts) 25) (and .Comments (and (eq .CommentCount 200) (gt (index .Posts 0).Counts.Comments .CommentCount))) (and .User (or (gt .User.PersonView.Counts.CommentCount 10) (gt .User.PersonView.Counts.PostCount 10))) }}
<div class="pager">
view more: {{if gt .Page 1 }}<a href="{{ .PrevPage }}"> prev</a>{{ end }} <a href="{{ .NextPage }}">next </a>
</div>
2023-07-07 16:30:07 +00:00
<input id="loadmore" type="submit" value="load more" onclick="loadMore(event)" data-page="2">
{{ end }}
2023-06-30 19:41:35 +00:00
{{ template "sidebar.html" . }}
2023-06-30 19:41:35 +00:00
</main>
{{ end }}
<script src="/_/static/utils.js?v=6"></script>
2023-06-30 19:41:35 +00:00
</body>
</html>