github.com/bitcubate/cryptojournal@v1.2.5-0.20171102134152-f578b3d788ab/src/stories/views/show.html.got (about) 1 <article class="narrow story"> 2 <h3> 3 <a href="/stories/{{.story.ID}}/upvote" rel="nofollow" method="post" class="vote {{if not .currentUser.CanUpvote }}disabled{{ end }}" rel=nofollow>▲</a> 4 <a href="{{.story.CanonicalURL}}" class="points">{{.story.Points}}</a> 5 <a href="/stories/{{.story.ID}}/downvote" rel="nofollow" method="post" class="vote {{if not .currentUser.CanDownvote }}disabled{{ end }}" rel=nofollow>▼</a> 6 <a href="{{.story.DestinationURL}}" class="name">{{.story.NameDisplay}}</a> 7 </h3> 8 9 <div class="metadata"> 10 <ul class="tags"> 11 {{ range .story.Tags }} 12 <li><a href="/stories?q=%23{{.}}">{{.}}</a></li> 13 {{ end }} 14 </ul> 15 <a href="{{.story.DestinationURL}}" class="domain">{{ .story.Domain }}</a> 16 {{ if exists .story.GodocURL }} 17 <a href="{{.story.GodocURL}}" class="domain docs">godoc.org</a> 18 {{ end }} 19 {{ if exists .story.VetURL }} 20 <a href="{{.story.VetURL}}" class="domain docs">goreportcard.com</a> 21 {{ end }} 22 <a href="/users/{{.story.UserID}}">posted by {{.story.UserName}}</a> {{timeago .story.CreatedAt }} 23 </div> 24 25 <div class="actions story_actions"> 26 {{ if .currentUser.Admin }} 27 <a href="/stories/{{.story.ID}}/update" rel="nofollow" class="button grey">edit</a> 28 {{ else if and .story.Editable (.story.OwnedBy .currentUser.ID) }} 29 <a href="/stories/{{.story.ID}}/update" rel="nofollow" class="button grey">edit</a> 30 {{end }} 31 {{ if .currentUser.CanFlag }} 32 <a href="/stories/{{.story.ID}}/flag" rel="nofollow" class="button grey flag" method="post">Flag</a> 33 {{ end }} 34 </div> 35 36 <div class="summary"> 37 {{ markup .story.Summary }} 38 </div> 39 40 {{ if .story.YouTube }} 41 <div class="video-player"> 42 <iframe width="100%" height="auto" src="{{ .story.YouTubeURL }}" frameborder="0" allowfullscreen></iframe> 43 </div> 44 {{ end }} 45 46 {{ if .currentUser.CanComment }} 47 {{ template "comments/views/form_embed.html.got" . }} 48 {{ end }} 49 50 <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp full-width" > 51 <thead> 52 <tr> 53 <th class="mdl-data-table__cell--non-numeric">User</th> 54 <th class="mdl-data-table__cell--non-numeric full-width">Comment</th> 55 </tr> 56 </thead> 57 <tbody> 58 {{ $0 := . }} 59 {{ range .comments }} 60 {{ set $0 "comment" . }} 61 {{ template "comments/views/comment.html.got" $0 }} 62 {{ end }} 63 </tbody> 64 </table> 65 66 67 {{ if not .currentUser.CanComment }} 68 <div class="register"> 69 <a href="/users/create" class="button">Register</a> to comment or vote on this story 70 </div> 71 {{ end }} 72 73 </article>