Merge branch 'master' of ssh://github.com/majestrate/nntpchan
This commit is contained in:
commit
91ced83c3a
@ -47,6 +47,7 @@ type AttachmentModel interface {
|
||||
type PostModel interface {
|
||||
BaseModel
|
||||
|
||||
Brief() string
|
||||
CSSClass() string
|
||||
FrontendPubkey() string
|
||||
MessageID() string
|
||||
|
@ -305,6 +305,13 @@ func (self *post) Index() int {
|
||||
return self.index + 1
|
||||
}
|
||||
|
||||
func (self *post) Brief() string {
|
||||
if len(self.PostMessage) > 140 {
|
||||
return self.PostMessage[:140]
|
||||
}
|
||||
return self.PostMessage
|
||||
}
|
||||
|
||||
func (self *post) NumImages() int {
|
||||
return len(self.Files)
|
||||
}
|
||||
|
@ -24,16 +24,17 @@
|
||||
<meta property="og:site_name" content="changolia" />
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:title" content="{{board.Board}}"/>
|
||||
<meta property="og:description" content="thread no. {{thread.OP.PostHash}} on changolia"/>
|
||||
<meta property="og:description" content="{{thread.OP.Brief}}"/>
|
||||
{{#sfw}}
|
||||
<meta property="og:url" content="{{prefix}}t/{{thread.OP.PostHash}}/?lang={{i18n.Name}}&sfw=1"/>
|
||||
{{/sfw}}
|
||||
{{^sfw}}
|
||||
<meta property="og:url" content="{{prefix}}t/{{thread.OP.PostHash}}/?lang={{i18n.Name}}"/>
|
||||
{{/sfw}}
|
||||
<meta property="og:image"
|
||||
content="{{prefix}}static/changolia-logo.png"/>
|
||||
</head>
|
||||
{{#thread.OP.Attachments}}
|
||||
<meta property="og:image" content="{{Thumbnail}}" />
|
||||
{{/thread.OP.Attachments}}
|
||||
</head>
|
||||
<body class="threadpage">
|
||||
{{{thread.Navbar}}}
|
||||
<hr />
|
||||
|
Reference in New Issue
Block a user