github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/forum.html (about)

     1  {{template "header.html" . }}
     2  
     3  <main id="forumItemList"itemscope itemtype="http://schema.org/ItemList">
     4  
     5  {{if gt .Page 1}}<div id="prevFloat"class="prev_button"><a class="prev_link"aria-label="{{lang "paginator.prev_page_aria"}}" rel="prev"href="{{.Forum.Link}}?page={{subtract .Page 1}}">{{lang "paginator.less_than"}}</a></div>{{end}}
     6  {{if ne .LastPage .Page}}<div id="nextFloat"class="next_button"><a class="next_link"aria-label="{{lang "paginator.next_page_aria"}}" rel="next"href="{{.Forum.Link}}?page={{add .Page 1}}">{{lang "paginator.greater_than"}}</a></div>{{end}}
     7  {{if not .CurrentUser.Loggedin}}<link rel="canonical"href="//{{.Site.URL}}{{.Forum.Link}}{{if gt .Page 1}}?page={{.Page}}{{end}}">{{end}}
     8  
     9  	<div id="forum_head_block"class="rowblock rowhead topic_list_title_block{{if .CurrentUser.Loggedin}} has_opt{{end}}">
    10  		<div class="rowitem forum_title">
    11  			<h1 itemprop="name">{{.Title}}</h1>
    12  		</div>
    13  		{{if .CurrentUser.Loggedin}}
    14  		<div class="optbox">
    15  			{{if .CurrentUser.Perms.CreateTopic}}
    16  			<div class="opt dummy_opt"></div>
    17  			<div class="pre_opt auto_hide"></div>
    18  			<div class="opt create_topic_opt"title="{{lang "topic_list.create_topic_tooltip"}}"aria-label="{{lang "topic_list.create_topic_aria"}}"><a class="create_topic_link"href="/topics/create/{{.Forum.ID}}"></a></div>
    19  			{{/** TODO: Add a permissions check for this **/}}
    20  			<div class="opt mod_opt"title="{{lang "topic_list.moderate_tooltip"}}">
    21  				<a class="moderate_link"href="#"aria-label="{{lang "topic_list.moderate_aria"}}"></a>
    22  			</div>
    23  			{{else}}<div class="opt locked_opt"title="{{lang "forum_locked_tooltip"}}"aria-label="{{lang "forum_locked_aria"}}"><a></a></div>{{end}}
    24  		</div>
    25  		<div style="clear:both;"></div>
    26  	{{end}}
    27  	</div>
    28  	{{if .CurrentUser.Loggedin}}
    29  	{{template "topics_mod_floater.html" .}}
    30  	
    31  	{{if .CurrentUser.Perms.CreateTopic}}
    32  	<div id="forum_topic_create_form"class="rowblock topic_create_form quick_create_form auto_hide"aria-label="{{lang "quick_topic.aria"}}">
    33  		<form id="quick_post_form"enctype="multipart/form-data"action="/topic/create/submit/?s={{.CurrentUser.Session}}"method="post"></form>
    34  		<img class="little_row_avatar"src="{{.CurrentUser.MicroAvatar}}"height=64 alt="{{lang "quick_topic.avatar_alt"}}"title="{{lang "quick_topic.avatar_tooltip"}}">
    35  		<input form="quick_post_form"id="topic_board_input"name="board"value="{{.Forum.ID}}"type="hidden">
    36  		<div class="main_form">
    37  			<div class="topic_meta">
    38  				<div class="formrow topic_name_row real_first_child">
    39  					<div class="formitem">
    40  						<input form="quick_post_form"name="name"placeholder="{{lang "quick_topic.whatsup"}}"required>
    41  					</div>
    42  				</div>
    43  			</div>
    44  			{{template "topics_quick_topic.html" . }}
    45  		</div>
    46  	</div>
    47  	{{end}}
    48  	{{end}}
    49  	<div id="forum_topic_list"class="rowblock topic_list single_forum"aria-label="{{lang "forum_list_aria"}}">
    50  		{{range .ItemList}}<div class="topic_row{{if .Sticky}} topic_sticky{{else if .IsClosed}} topic_closed{{end}}{{if .CanMod}} can_mod{{end}}"data-tid="{{.ID}}">
    51  		<div class="rowitem topic_left passive datarow">
    52  			<span class="selector"></span>
    53  			<a href="{{.Creator.Link}}"><img src="{{.Creator.MicroAvatar}}"height=64 alt="Avatar"title="{{.Creator.Name}}'s Avatar"aria-hidden="true"></a>
    54  			<span class="topic_inner_left">
    55  				<a class="rowtopic"href="{{.Link}}"itemprop="itemListElement"title="{{.Title}}"><span>{{.Title}}</span></a>
    56  				<br><a class="rowsmall starter"href="{{.Creator.Link}}"title="{{.Creator.Name}}">{{.Creator.Name}}</a>
    57  				{{/** TODO: Avoid the double '|' when both .IsClosed and .Sticky are set to true. We could probably do this with CSS **/}}
    58  				{{if .IsClosed}}<span class="rowsmall topic_status_e topic_status_closed"title="{{lang "status.closed_tooltip"}}"> | &#x1F512;&#xFE0E</span>{{end}}
    59  				{{if .Sticky}}<span class="rowsmall topic_status_e topic_status_sticky"title="{{lang "status.pinned_tooltip"}}"> | &#x1F4CD;&#xFE0E</span>{{end}}
    60  			</span>
    61  			{{/** TODO: Phase this out of Cosora and remove it **/}}
    62  			<div class="topic_inner_right rowsmall">
    63  				<span class="replyCount">{{.PostCount}}</span><br>
    64  				<span class="likeCount">{{.LikeCount}}</span>
    65  			</div>
    66  		</div>
    67  		<div class="topic_middle">
    68  			<div class="topic_middle_inside rowsmall">
    69  				<span class="replyCount">{{.PostCount}}&nbsp;{{lang "topic_list.replies_suffix"}}</span>
    70  				<span class="likeCount">{{.LikeCount}}&nbsp;{{lang "topic_list.likes_suffix"}}</span>
    71  				<span class="viewCount">{{.ViewCount}}&nbsp;{{lang "topic_list.views_suffix"}}</span>
    72  			</div>
    73  		</div>
    74  		<div class="rowitem topic_right passive datarow">
    75  			<div class="topic_right_inside">
    76  				<a href="{{.LastUser.Link}}"><img src="{{.LastUser.MicroAvatar}}"height=64 alt="Avatar"title="{{.LastUser.Name}}'s Avatar"aria-hidden="true"></a>
    77  				<span>
    78  					<a href="{{.LastUser.Link}}"class="lastName"title="{{.LastUser.Name}}">{{.LastUser.Name}}</a><br>
    79  					<a href="{{.Link}}?page={{.LastPage}}{{if .LastReplyID}}#post-{{.LastReplyID}}{{end}}"class="rowsmall lastReplyAt"title="{{abstime .LastReplyAt}}">{{reltime .LastReplyAt}}</a>
    80  				</span>
    81  			</div>
    82  		</div>
    83  		</div>{{else}}<div class="rowitem passive rowmsg">{{lang "forum_no_topics"}}{{if .CurrentUser.Loggedin}}{{if .CurrentUser.Perms.CreateTopic}}&nbsp;<a href="/topics/create/{{.Forum.ID}}">{{lang "forum_start_one"}}</a>{{end}}{{end}}</div>{{end}}
    84  	</div>
    85  
    86  {{template "paginator.html" . }}
    87  </main>
    88  {{template "footer.html" . }}