sop.epic/views/user_posts.html
2023-07-01 23:30:36 -06:00

46 lines
2.3 KiB
HTML

{{if .Pjax}}
{{template "header.html" .}}
<meta property="og:profile:username" content="{{.User.Username}}">
<meta property="og:description" content="{{if .Sidebar.Profile.Comment}}{{.Sidebar.Profile.Comment}}{{else}}View {{.User.Nickname}}'s {{.Sidebar.ProfileOnPage}} on Indigo.{{end}}">
{{if .Sidebar.Profile.FavoritePostImage}}<meta property="og:image" content="{{.Sidebar.Profile.FavoritePostImage}}">{{end}}
{{else}}
<title>{{.Title}}</title>
{{end}}
<div id="main-body" class="profile-top">
{{template "profile_sidebar.html" .Sidebar}}
{{$user := .User}}
<div class="main-column">
<form class="search{{if not .Query}} folded{{end}}">
<input type="text" name="q"{{if .Query}} value="{{.Query}}"{{end}} placeholder="Search {{if eq .Sidebar.ProfileOnPage "comments"}}Comments{{else if eq .Sidebar.ProfileOnPage "yeahs"}}Yeahs{{else}}Posts{{end}}" maxlength="255"{{if not .Query}} required{{end}}>
<input type="submit" value="q" title="Search">
</form>
<div class="post-list-outline">
<h2 class="label">{{.Title}}</h2>
<div id="postsz">
<div class="body-content" id="community-post-list">
<div class="list post-list js-post-list" data-next-page-url="{{if .Posts}}?{{if .Query}}q={{.Query}}{{end}}&offset={{.Offset}}&offset_time={{.OffsetTime}}{{end}}">
{{if .Posts}}
{{$user_id := .CurrentUser.ID}}
{{range $post := .Posts}}
{{template "render_post.html" $post}}
{{end}}
<div class="post-list-loading" style="padding: 20px">
<a class="black-button trigger" href="{{if .Posts}}?{{if .Query}}q={{.Query}}{{end}}&offset={{.Offset}}&offset_time={{.OffsetTime}}{{end}}">Load More Posts</a>
</div>
{{else}}
{{if .AutoPagerize}}
<div class="no-content">
<p>No posts.</p>
</div>
{{end}}
{{end}}
</div>
</div>
</div>
</div>
</div>
</div>
{{if .Pjax}}
{{template "footer.html"}}
{{end}}