rooms.gohtml (2104B)
1 {{ define "extra-head" }} 2 <style> 3 .unread_room { color: #2392da; text-decoration: none; } 4 .unread_room:hover { color: #004970; text-decoration: underline; } 5 .timestamp { 6 color: #aaa; 7 font-size: 11px; 8 } 9 </style> 10 {{ end }} 11 12 {{ define "title" }}dkf - rooms{{ end }} 13 14 {{ define "content" }} 15 16 <div class="container-fluid"> 17 <div class="pb-2 mt-4 mb-4 border-bottom"> 18 <div class="float-right"> 19 <a href="/chat/create-room" class="btn btn-success"> 20 <i class="fa fa-plus fa-fw"></i> Create room 21 </a> 22 </div> 23 <h2>Rooms</h2> 24 </div> 25 26 <table class="table table-striped table-sm table-novpadding table-dark"> 27 <thead> 28 <tr> 29 <th>Name</th> 30 <th>Owner</th> 31 <th class="text-center">Password</th> 32 <th class="text-center">Permanent</th> 33 </tr> 34 </thead> 35 <tbody> 36 {{ range .Data.Rooms }} 37 <tr> 38 <td><a href="/chat/{{ .Name }}"{{ if .IsUnread }} class="unread_room"{{ end }}>{{ .Name }}</a></td> 39 <td> 40 {{ if .OwnerUser }} 41 <a href="/u/{{ .OwnerUser.Username }}" {{ .OwnerUser.GenerateChatStyle | attr }}>{{ .OwnerUser.Username }}</a><br /> 42 <span class="timestamp">{{ .CreatedAt.Format "Jan 02, 2006 15:04:05" }}</span> 43 {{ else }} 44 <em>n/a</em> 45 {{ end }} 46 </td> 47 <td class="text-center align-middle"> 48 {{ (ne .Password "") | fmtBool }} 49 </td> 50 <td class="text-center align-middle"> 51 {{ not .IsEphemeral | fmtBool }} 52 </td> 53 </tr> 54 {{ else }} 55 <tr> 56 <td colspan="4"><em>No room to display</em></td> 57 </tr> 58 {{ end }} 59 </tbody> 60 </table> 61 </div> 62 63 {{ end }}