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 {
|
type PostModel interface {
|
||||||
BaseModel
|
BaseModel
|
||||||
|
|
||||||
|
Brief() string
|
||||||
CSSClass() string
|
CSSClass() string
|
||||||
FrontendPubkey() string
|
FrontendPubkey() string
|
||||||
MessageID() string
|
MessageID() string
|
||||||
|
@ -305,6 +305,13 @@ func (self *post) Index() int {
|
|||||||
return self.index + 1
|
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 {
|
func (self *post) NumImages() int {
|
||||||
return len(self.Files)
|
return len(self.Files)
|
||||||
}
|
}
|
||||||
|
@ -24,16 +24,17 @@
|
|||||||
<meta property="og:site_name" content="changolia" />
|
<meta property="og:site_name" content="changolia" />
|
||||||
<meta property="og:type" content="website"/>
|
<meta property="og:type" content="website"/>
|
||||||
<meta property="og:title" content="{{board.Board}}"/>
|
<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}}
|
{{#sfw}}
|
||||||
<meta property="og:url" content="{{prefix}}t/{{thread.OP.PostHash}}/?lang={{i18n.Name}}&sfw=1"/>
|
<meta property="og:url" content="{{prefix}}t/{{thread.OP.PostHash}}/?lang={{i18n.Name}}&sfw=1"/>
|
||||||
{{/sfw}}
|
{{/sfw}}
|
||||||
{{^sfw}}
|
{{^sfw}}
|
||||||
<meta property="og:url" content="{{prefix}}t/{{thread.OP.PostHash}}/?lang={{i18n.Name}}"/>
|
<meta property="og:url" content="{{prefix}}t/{{thread.OP.PostHash}}/?lang={{i18n.Name}}"/>
|
||||||
{{/sfw}}
|
{{/sfw}}
|
||||||
<meta property="og:image"
|
{{#thread.OP.Attachments}}
|
||||||
content="{{prefix}}static/changolia-logo.png"/>
|
<meta property="og:image" content="{{Thumbnail}}" />
|
||||||
</head>
|
{{/thread.OP.Attachments}}
|
||||||
|
</head>
|
||||||
<body class="threadpage">
|
<body class="threadpage">
|
||||||
{{{thread.Navbar}}}
|
{{{thread.Navbar}}}
|
||||||
<hr />
|
<hr />
|
||||||
|
Reference in New Issue
Block a user