dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

home.gohtml (1431B)


      1 {{ define "title" }}dkf - club{{ end }}
      2 
      3 {{ define "sub-content" }}
      4 
      5 <div class="pb-2 mb-4 border-bottom">
      6     <div class="float-right">
      7         <a href="/club/new-thread" class="btn btn-success">
      8             <i class="fa fa-plus fa-fw"></i> New thread
      9         </a>
     10     </div>
     11     <h2>Club section</h2>
     12 </div>
     13 
     14 <p>Welcome to the club section</p>
     15 
     16 <table class="table table-striped">
     17     <tr>
     18         <th>Thread name</th>
     19         <th>Author</th>
     20         <th>Date</th>
     21         <th>Last Message</th>
     22     </tr>
     23     {{ range .Data.ForumThreads }}
     24         <tr>
     25             <td>
     26                 {{ if .IsUnread }}
     27                     <div style="color: green; width: 30px; display: inline-block;">&#9679;</div>
     28                 {{ else }}
     29                     <div style="color: green; width: 30px; display: inline-block;">&nbsp;</div>
     30                 {{ end }}
     31                 <a href="/club/threads/{{ .ID }}">{{ .Name }}</a>
     32             </td>
     33             <td><span style="color: {{ .AuthorChatColor }};">{{ .Author }}</span></td>
     34             <td>{{ .CreatedAt.Format "Jan 02, 2006 15:04:05" }}</td>
     35             <td>
     36                 <span style="color: {{ .LastMsgChatColor }};">{{ .LastMsgAuthor }}</span> -
     37                 {{ .LastMsgCreatedAt.Format "Jan 02, 2006 15:04:05" }}
     38             </td>
     39         </tr>
     40     {{ else }}
     41         <tr>
     42             <td><em>No thread to display</em></td>
     43         </tr>
     44     {{ end }}
     45 </table>
     46 
     47 {{ end }}