Remove content div wrappers. Use grid template columns for main to support stretch and breakout classes.

This commit is contained in:
Fredrik Jonsson 2023-11-10 14:52:09 +01:00
commit 4bb4c9dec1
12 changed files with 169 additions and 172 deletions

View file

@ -2,7 +2,5 @@
<header>
<h2 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
</header>
<div class="content">
<p>{{ .Summary }}</p>
</div>
</article>

View file

@ -3,7 +3,6 @@
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
</header>
<div class="content">
{{ .Content }}
</div>
</article>

View file

@ -4,11 +4,7 @@
<h1 class="title">{{ .Title }}</h1>
</header>
{{ with .Content -}}
<div class="content">
{{ . }}
</div>
{{ end -}}
{{ .Content }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}

View file

@ -6,15 +6,12 @@
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
<div class="content">
{{ .Content }}
</div>
<div class="content content--bottom">
{{ .Content }}
{{ if $.Param "relatedposts" | default false }}{{ partial "related.html" . }}{{ end -}}
{{ if ne .Lastmod .Date }}{{ partial "dates.html" . }}{{ end -}}
</div>
</article>
</main>
{{ end -}}

View file

@ -1,9 +1,7 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
<h2 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<h2 class="title mt--s{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
</header>
<div class="content">
<p>{{ .Summary }}</p>
</div>
</article>

View file

@ -2,11 +2,7 @@
{{ define "main" -}}
<main class="main layout__main">
{{ with .Content -}}
<div class="content">
{{ . }}
</div>
{{ end -}}
{{ .Content }}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
{{ $paginator := .Paginate $pages -}}

View file

@ -3,11 +3,7 @@
<h1 class="title">Micro posts</h1>
<p class="micro__follow"><a href="https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}">{{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }}</a></p>
{{ with .Content -}}
<div class="content">
{{ . }}
</div>
{{ end -}}
{{ .Content }}
{{ $paginator := .Paginate (.Pages) -}}
{{ range $paginator.Pages -}}

View file

@ -3,13 +3,10 @@
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
<header>
<h1 class="hidden">{{ .Title }}</h1>
<p>
{{ partial "author-date" . }}
</p>
<p>{{ partial "author-date" . }}</p>
</header>
<div class="content">
{{ .Content }}
</div>
</article>
</main>
{{ end -}}

View file

@ -1,11 +1,8 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<header>
<h2 class="hidden">{{ .Title }}</h2>
<p><a href="{{ .RelPermalink }}">
{{ partial "author-date" . }}
</a></p>
<p><a href="{{ .RelPermalink }}">{{ partial "author-date" . }}</a></p>
</header>
<div class="content">
{{ .Content }}
</div>
</article>

View file

@ -3,8 +3,8 @@
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
</header>
{{ partial "podcast.html" . -}}
<div class="content">
{{ .Content }}
</div>
</article>

View file

@ -6,10 +6,10 @@
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
</header>
{{ partial "podcast.html" . -}}
<div class="content">
{{ .Content }}
</div>
</article>
</main>
{{ end -}}

View file

@ -1,6 +1,4 @@
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
<h2 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a> <span class="meta">({{ .Data.Pages.Len }})</span></h2>
<div class="content">
<p>{{ .Description }}</p>
</div>
</article>