jlelse
/
Indieroad
Archived
1
Fork 0

Improve display of posts with no title

This commit is contained in:
Jan-Lukas Else 2019-11-19 09:22:33 +01:00
parent 4d3ec12f3d
commit 9f8f86dbc0
6 changed files with 20 additions and 16 deletions

View File

@ -489,11 +489,11 @@ select {
}
.post-title {
margin: 0;
margin-bottom: 10px;
}
.post-meta {
@extend .meta;
padding: 5px 0;
margin-top: 10px;
@include color-border(border-top, 1px, dotted, border);
@include color-border(border-bottom, 1px, dotted, border);
}

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }}</title>
<title>{{ block "title" . }}{{ if not .IsHome }}{{ with .Title }}{{ . }} - {{end}}{{ end }}{{ .Site.Title }}{{ end }}</title>
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
<meta name="theme-color" content="{{ .Param "colors.main" | default "#0275D8" }}">
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{else}}{{ .Params.Description }}{{end}}">

View File

@ -2,10 +2,12 @@
<main class="main h-entry">
<article>
<header class="main-header">
<h1 class="p-name post-title">{{ .Title }}</h1>
{{ with partial "post_meta.html" . -}}
{{ with .Title }}
<h1 class="p-name post-title">{{ . }}</h1>
{{ end }}
{{ with partial "post_meta.html" . }}
<div class="post-meta">{{ . }}</div>
{{- end }}
{{ end }}
</header>
<div class="e-content content clearfix">
{{ with .Params.audio }}

View File

@ -1,20 +1,18 @@
<article class="list-item h-entry">
<div class="list-header">
<a class="u-url" href="{{ .RelPermalink }}">
{{ if .Title }}
<a href="{{ .RelPermalink }}">
<h2 class="list-title p-name">{{ .Title }}</h2>
</a>
{{ with partial "post_meta.html" . -}}
{{ end }}
{{ with partial "post_meta.html" . }}
<div class="list-meta">{{ . }}</div>
{{- end }}
{{ end }}
</div>
<div class="list-excerpt p-summary">
{{ .Summary }}
</div>
{{- if .Site.Params.readmore }}
{{- if .Truncated }}
<div class="list-footer">
<a class="read-more" href="{{ .RelPermalink }}">{{ T "read_more" }}</a>
<a class="u-url read-more" href="{{ .RelPermalink }}">{{ T "read_more" }}</a>
</div>
{{- end }}
{{- end }}
</article>

View File

@ -2,10 +2,12 @@
<main class="main h-entry">
<article>
<header class="main-header">
<h1 class="p-name post-title">{{ .Title }}</h1>
{{ with partial "post_meta.html" . -}}
{{ with .Title }}
<h1 class="p-name post-title">{{ . }}</h1>
{{ end }}
{{ with partial "post_meta.html" . }}
<div class="post-meta">{{ . }}</div>
{{- end }}
{{ end }}
</header>
<div class="e-content content clearfix">
{{ .Content }}

View File

@ -1,8 +1,10 @@
<article class="list-item h-entry">
<div class="list-header">
{{ if .Title }}
<a href="{{ .Params.externalURL }}">
<h2 class="list-title p-name">{{ .Title }}</h2>
</a>
{{ end }}
{{ with partial "post_meta.html" . -}}
<div class="list-meta">{{ . }}</div>
{{- end }}