Compare commits
3 commits
develop
...
T669-date-
Author | SHA1 | Date | |
---|---|---|---|
|
4662ddd304 | ||
|
d7258beacc | ||
|
9c3bee8a7d |
5 changed files with 22 additions and 24 deletions
|
@ -86,6 +86,7 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
|
padding: 1em 1rem;
|
||||||
nav {
|
nav {
|
||||||
span, a {
|
span, a {
|
||||||
&.pinned {
|
&.pinned {
|
||||||
|
@ -102,6 +103,13 @@ body {
|
||||||
.owner-visible {
|
.owner-visible {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
time.dt-published {
|
||||||
|
display: block;
|
||||||
|
&.subtle {
|
||||||
|
color: #666;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&#post, &#collection, &#subpage {
|
&#post, &#collection, &#subpage {
|
||||||
|
|
|
@ -59,7 +59,7 @@ body#post article, pre, .hljs {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs {
|
.hljs {
|
||||||
|
|
2
posts.go
2
posts.go
|
@ -1380,12 +1380,14 @@ Are you sure it was ever here?`,
|
||||||
IsFound bool
|
IsFound bool
|
||||||
IsAdmin bool
|
IsAdmin bool
|
||||||
CanInvite bool
|
CanInvite bool
|
||||||
|
ShowDates bool
|
||||||
}{
|
}{
|
||||||
PublicPost: p,
|
PublicPost: p,
|
||||||
StaticPage: pageForReq(app, r),
|
StaticPage: pageForReq(app, r),
|
||||||
IsOwner: cr.isCollOwner,
|
IsOwner: cr.isCollOwner,
|
||||||
IsCustomDomain: cr.isCustomDomain,
|
IsCustomDomain: cr.isCustomDomain,
|
||||||
IsFound: postFound,
|
IsFound: postFound,
|
||||||
|
ShowDates: c.NewFormat().ShowDates(),
|
||||||
}
|
}
|
||||||
tp.IsAdmin = u != nil && u.IsAdmin()
|
tp.IsAdmin = u != nil && u.IsAdmin()
|
||||||
tp.CanInvite = canUserInvite(app.cfg, tp.IsAdmin)
|
tp.CanInvite = canUserInvite(app.cfg, tp.IsAdmin)
|
||||||
|
|
|
@ -30,26 +30,6 @@
|
||||||
{{range .Images}}<meta property="og:image" content="{{.}}" />{{else}}<meta property="og:image" content="{{.Collection.AvatarURL}}">{{end}}
|
{{range .Images}}<meta property="og:image" content="{{.}}" />{{else}}<meta property="og:image" content="{{.Collection.AvatarURL}}">{{end}}
|
||||||
<meta property="article:published_time" content="{{.Created8601}}">
|
<meta property="article:published_time" content="{{.Created8601}}">
|
||||||
{{if .Collection.StyleSheet}}<style type="text/css">{{.Collection.StyleSheetDisplay}}</style>{{end}}
|
{{if .Collection.StyleSheet}}<style type="text/css">{{.Collection.StyleSheetDisplay}}</style>{{end}}
|
||||||
<style type="text/css">
|
|
||||||
body footer {
|
|
||||||
max-width: 40rem;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
body#post header {
|
|
||||||
padding: 1em 1rem;
|
|
||||||
}
|
|
||||||
article time.dt-published {
|
|
||||||
display: block;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
body#post article h2#title{
|
|
||||||
margin-bottom: 0.5em;
|
|
||||||
}
|
|
||||||
article time.dt-published {
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
{{if .Collection.RenderMathJax}}
|
{{if .Collection.RenderMathJax}}
|
||||||
<!-- Add mathjax logic -->
|
<!-- Add mathjax logic -->
|
||||||
{{template "mathjax" . }}
|
{{template "mathjax" . }}
|
||||||
|
@ -65,7 +45,11 @@ article time.dt-published {
|
||||||
|
|
||||||
{{template "user-navigation" .}}
|
{{template "user-navigation" .}}
|
||||||
|
|
||||||
<article id="post-body" class="{{.Font}} h-entry">{{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}}{{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}}{{/* TODO: check format: if .Collection.Format.ShowDates*/}}<time class="dt-published" datetime="{{.Created}}" pubdate itemprop="datePublished" content="{{.Created}}">{{.DisplayDate}}</time><div class="e-content">{{.HTMLContent}}</div></article>
|
<article id="post-body" class="{{.Font}} h-entry">
|
||||||
|
{{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}}
|
||||||
|
{{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}}
|
||||||
|
{{if .ShowDates}}<time class="dt-published{{if .Title.String}} subtle{{end}}" datetime="{{.Created}}" pubdate itemprop="datePublished" content="{{.Created}}">{{.DisplayDate}}</time>{{end}}
|
||||||
|
<div class="e-content">{{.HTMLContent}}</div></article>
|
||||||
|
|
||||||
{{ if .Collection.ShowFooterBranding }}
|
{{ if .Collection.ShowFooterBranding }}
|
||||||
<footer dir="ltr">
|
<footer dir="ltr">
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
<meta property="article:published_time" content="{{.Created8601}}">
|
<meta property="article:published_time" content="{{.Created8601}}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{if .Collection.StyleSheet}}<style type="text/css">{{.Collection.StyleSheetDisplay}}</style>{{end}}
|
{{if .Collection.StyleSheet}}<style type="text/css">{{.Collection.StyleSheetDisplay}}</style>{{end}}
|
||||||
|
|
||||||
{{if .Collection.RenderMathJax}}
|
{{if .Collection.RenderMathJax}}
|
||||||
<!-- Add mathjax logic -->
|
<!-- Add mathjax logic -->
|
||||||
{{template "mathjax" . }}
|
{{template "mathjax" . }}
|
||||||
|
@ -59,7 +58,12 @@
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<article id="post-body" class="{{.Font}} h-entry {{if not .IsFound}}error-page{{end}}">{{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}}{{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}}<div class="e-content">{{.HTMLContent}}</div></article>
|
<article id="post-body" class="{{.Font}} h-entry {{if not .IsFound}}error-page{{end}}">
|
||||||
|
{{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}}
|
||||||
|
{{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}}
|
||||||
|
{{if .ShowDates}}<time class="dt-published{{if .Title.String}} subtle{{end}}" datetime="{{.Created}}" pubdate itemprop="datePublished" content="{{.Created}}">{{.DisplayDate}}</time>{{end}}
|
||||||
|
<div class="e-content">{{.HTMLContent}}</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
{{ if .Collection.ShowFooterBranding }}
|
{{ if .Collection.ShowFooterBranding }}
|
||||||
<footer dir="ltr"><hr><nav><p style="font-size: 0.9em">{{localhtml "published with write.as" .Language.String}}</p></nav></footer>
|
<footer dir="ltr"><hr><nav><p style="font-size: 0.9em">{{localhtml "published with write.as" .Language.String}}</p></nav></footer>
|
||||||
|
|
Loading…
Add table
Reference in a new issue