move shared post css into core.less

also changes less function article-title to have a bottom margin of
0.5em as it was being reset on both post views. this also brings
anonymous posts into a consistent style with the rest.
pull/190/head
Rob Loranger 5 years ago
parent d7258beacc
commit 4662ddd304
No known key found for this signature in database
GPG Key ID: D6F1633A4F0903B8
  1. 8
      less/core.less
  2. 2
      less/post-temp.less
  3. 22
      templates/chorus-collection-post.tmpl
  4. 18
      templates/collection-post.tmpl

@ -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 {

@ -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 {
display: block;
}
article time.dt.subtle {
color: #666;
margin-bottom: 1em;
}
body#post article h2#title{
margin-bottom: 0.5em;
}
</style>
{{if .Collection.RenderMathJax}} {{if .Collection.RenderMathJax}}
<!-- Add mathjax logic --> <!-- Add mathjax logic -->
{{template "mathjax" . }} {{template "mathjax" . }}
@ -68,7 +48,7 @@ body#post article h2#title{
<article id="post-body" class="{{.Font}} h-entry"> <article id="post-body" class="{{.Font}} h-entry">
{{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}} {{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}}
{{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}} {{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}}
{{if .ShowDates}}<time class="dt{{if .Title.String}} subtle{{end}}" datetime="{{.Created}}" pubdate itemprop="datePublished" content="{{.Created}}">{{.DisplayDate}}</time>{{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> <div class="e-content">{{.HTMLContent}}</div></article>
{{ if .Collection.ShowFooterBranding }} {{ if .Collection.ShowFooterBranding }}

@ -32,22 +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}}
{{/*below css duplicated in part in chorus-collection-post.tmpl*/}}
<style type="text/css">
body#post header {
padding: 1em 1rem;
}
article time.dt {
display: block;
}
article time.dt.subtle {
color: #666;
margin-bottom: 1em;
}
body#post article h2#title{
margin-bottom: 0.5em;
}
</style>
{{if .Collection.RenderMathJax}} {{if .Collection.RenderMathJax}}
<!-- Add mathjax logic --> <!-- Add mathjax logic -->
{{template "mathjax" . }} {{template "mathjax" . }}
@ -77,7 +61,7 @@ body#post article h2#title{
<article id="post-body" class="{{.Font}} h-entry {{if not .IsFound}}error-page{{end}}"> <article id="post-body" class="{{.Font}} h-entry {{if not .IsFound}}error-page{{end}}">
{{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}} {{if .IsScheduled}}<p class="badge">Scheduled</p>{{end}}
{{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}} {{if .Title.String}}<h2 id="title" class="p-name">{{.FormattedDisplayTitle}}</h2>{{end}}
{{if .ShowDates}}<time class="dt{{if .Title.String}} subtle{{end}}" datetime="{{.Created}}" pubdate itemprop="datePublished" content="{{.Created}}">{{.DisplayDate}}</time>{{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> <div class="e-content">{{.HTMLContent}}</div>
</article> </article>

Loading…
Cancel
Save