Redo the blog list layout to make it work a little better on narrow screens

This commit is contained in:
Eryn Wells 2022-10-30 11:30:30 -07:00
parent 8b4273fcae
commit e7b2cb493a
5 changed files with 70 additions and 64 deletions

View file

@ -1,8 +1,6 @@
<li>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "January" }}</time>
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "2" }}</time>
<div class="title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ partial "development/draft_tag.html" . }}
</div>
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ partial "development/draft_tag.html" . }}
</li>

View file

@ -3,18 +3,16 @@
{{ end }}
{{ define "main" }}
<section id="by-date">
{{- range .Pages.ByDate.GroupByDate "2006" -}}
<h6>{{ .Key | title }}</h6>
<ul class="post-list">
{{- range .Pages -}}
{{- if or (not .Draft) (not hugo.IsProduction) -}}
{{- .Render "li_grid_with_date" -}}
{{- end -}}
{{- range .Pages.ByDate.GroupByDate "2006" -}}
<h5>{{ .Key | title }}</h5>
<ul>
{{- range .Pages -}}
{{- if or (not .Draft) (not hugo.IsProduction) -}}
{{- .Render "li_grid_with_date" -}}
{{- end -}}
</ul>
{{- end -}}
</section>
</ul>
{{- end -}}
{{ end }}
{{ define "footer" }}

View file

@ -1,3 +1,3 @@
{{ if in (.Site.BaseURL | string) "localhost" }}
{{ if .Draft }}<span class="draft">draft</span>{{ end }}
{{ end }}
{{ if .Draft }}<span class="draft">d</span>{{ end }}
{{ end }}